:root {
  --bg-main: var(--tg-theme-bg-color, #0f1115);
  --bg-surface: var(--tg-theme-secondary-bg-color, #1a1d24);
  --bg-elevated: #21252e;
  --color-primary: #6366f1;
  --color-primary-strong: #7c3aed;
  --color-primary-glow: rgba(99, 102, 241, 0.5);
  --color-success: #10b981;
  --color-success-glow: rgba(16, 185, 129, 0.55);
  --color-danger: #ef4444;
  --color-danger-glow: rgba(239, 68, 68, 0.6);
  --color-gold: #f59e0b;
  --color-gold-glow: rgba(245, 158, 11, 0.6);
  --color-text: var(--tg-theme-text-color, #f5f7fb);
  --color-muted: rgba(160, 170, 190, 0.7);
  --color-border: rgba(255, 255, 255, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(16, 185, 129, 0.12), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(239, 68, 68, 0.12), transparent 35%),
    var(--bg-main);
  color: var(--color-text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 460px;
  margin: 0 auto;
  padding: 18px 16px 100px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 6px 0 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 22, 30, 0.7);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.brand-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--color-primary));
  box-shadow: 0 0 20px var(--color-primary-glow), 0 0 40px rgba(99, 102, 241, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.header-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.12), transparent 50%);
  opacity: 0.6;
  filter: blur(24px);
}

/* ===== TAB CONTENT ===== */
#tab-content {
  flex: 1;
  position: relative;
}

.tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 1;
  transform: translateY(0);
}

.section-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== GAME SWITCHER SUB-MENU ===== */
.game-switcher {
  display: flex;
  gap: 8px;
  background: rgba(20, 22, 30, 0.6);
  border-radius: var(--radius-lg);
  padding: 5px;
  border: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.game-switcher-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--color-muted);
  transition: all 0.3s ease;
  font-family: var(--font);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.game-switcher-btn:active {
  transform: scale(0.98);
}
.game-switcher-btn.active {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #fff;
  box-shadow: 0 4px 20px var(--color-primary-glow);
}
.game-switcher-btn.active .switcher-icon {
  filter: none;
  opacity: 1;
}

.switcher-icon {
  font-size: 18px;
  filter: grayscale(0.6);
  opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.game-content {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.game-content.active {
  display: flex;
}

/* ===== TAB BAR ===== */
#tab-bar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 400px;
  display: flex;
  background: rgba(20, 22, 30, 0.75);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 6px;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
  z-index: 100;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 6px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}
.tab-item:active { transform: scale(0.98); }

.tab-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: grayscale(0.6);
  opacity: 0.6;
}
.tab-item.active .tab-icon {
  transform: scale(1.15);
  filter: grayscale(0);
  opacity: 1;
}

.tab-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
}
.tab-item.active .tab-label {
  color: var(--color-primary);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 12px var(--color-primary-glow);
}

.glass-card {
  background: rgba(26, 29, 36, 0.82);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
}

/* ===== PROFILE CARD ===== */
#profile-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 24px var(--color-primary-glow), 0 0 40px rgba(99, 102, 241, 0.4);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.username {
  font-size: 17px;
  font-weight: 700;
}
.telegram-id {
  font-size: 12px;
  color: var(--color-muted);
}

.balances {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.balance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.balance-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-muted);
  font-weight: 600;
}

.balance-value {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.balance-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* ===== CONVERTER CARDS ===== */
.converter-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.converter-card h2 {
  font-size: 15px;
  font-weight: 600;
}

.rate-info {
  font-size: 12px;
  color: var(--color-muted);
  margin-bottom: 2px;
}

/* ===== FORM ELEMENTS ===== */
input[type="number"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  background: var(--bg-elevated);
  color: var(--color-text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: var(--font);
}
input[type="number"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}
input[type="number"]::placeholder {
  color: var(--color-muted);
  opacity: 0.5;
}

button {
  position: relative;
  overflow: hidden;
  font-family: var(--font);
}

.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 6px 26px var(--color-primary-glow);
  letter-spacing: 0.3px;
}
.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 12px var(--color-primary-glow);
}
.btn-primary:disabled {
  opacity: 0.35;
  transform: none;
  cursor: not-allowed;
  box-shadow: none;
}

.preview {
  font-size: 13px;
  color: var(--color-muted);
  min-height: 20px;
}

.bet-controller + .btn-primary,
.bet-controller + .btn-gradient,
.bet-controller + .btn-crash-action {
  padding: 18px;
  font-size: 18px;
  border-radius: var(--radius-lg);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* ===== BET CONTROLLER ===== */
.bet-controller {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bet-controller-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-muted);
}
.bet-controller-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bet-input-wrap {
  flex: 1 1 120px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(18, 20, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03);
  min-width: 80px;
}

.bet-input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.bet-input-wrap .bet-controller-input {
  border: none;
  padding: 4px 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  width: 0;
  flex: 1;
}

.bet-currency {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--color-muted);
  flex-shrink: 0;
}
.bet-controller-input {
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  outline: none;
  background: var(--bg-elevated);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font);
}
.bet-controller-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.bet-ctrl-btn {
  padding: 10px 6px;
  min-width: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(26, 29, 36, 0.8);
  color: var(--color-text);
  transition: all 0.2s ease;
  text-align: center;
  font-family: var(--font);
  flex-shrink: 0;
}
.bet-ctrl-btn:active {
  transform: scale(0.98);
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-glow);
}
.bet-ctrl-btn.max-btn {
  color: var(--color-gold);
}
.bet-ctrl-btn.max-btn:active {
  background: var(--color-gold);
  color: #000;
  border-color: var(--color-gold);
}

/* ===== MINES GAME SECTION ===== */
#game-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .title-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.3));
}
.section-title h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

#game-config {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.35s ease;
}

.config-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.config-row label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
}

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.grid-btn,
.mine-btn {
  flex: 1;
  min-width: 52px;
  padding: 10px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--color-text);
  transition: all 0.2s ease;
  font-family: var(--font);
}
.grid-btn:active,
.mine-btn:active {
  transform: scale(0.98);
}
.grid-btn.selected,
.mine-btn.selected {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 18px var(--color-primary-glow);
}

.bet-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: border-color 0.25s ease;
}
.bet-wrap:focus-within {
  border-color: var(--color-primary);
}
.bet-currency {
  font-size: 18px;
  opacity: 0.6;
}
.bet-wrap input {
  border: none;
  background: transparent;
  padding: 14px 0;
  flex: 1;
  font-family: var(--font);
  color: var(--color-text);
  font-weight: 600;
  font-size: 16px;
  outline: none;
}
.bet-wrap input:focus {
  box-shadow: none;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  box-shadow: 0 6px 28px var(--color-primary-glow);
  transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.btn-gradient:active {
  transform: scale(0.98);
}

.btn-gradient.pulse-idle {
  animation: idlePulse 2s ease-in-out infinite;
}
@keyframes idlePulse {
  0%, 100% { box-shadow: 0 6px 26px var(--color-primary-glow); }
  50% { box-shadow: 0 8px 40px var(--color-primary-glow), 0 0 70px var(--color-primary-glow); }
}

/* ===== GAME BOARD ===== */
#game-board {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hidden {
  display: none !important;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

#board-grid {
  display: grid;
  gap: 6px;
  margin: 0 auto;
  width: 100%;
  perspective: 1200px;
  transition: transform 0.1s ease;
}
#board-grid.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10% { transform: translateX(-4px) rotate(-0.5deg); }
  20% { transform: translateX(4px) rotate(0.5deg); }
  30% { transform: translateX(-3px) rotate(-0.25deg); }
  40% { transform: translateX(3px) rotate(0.25deg); }
  50% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
  70% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

#board-grid.size-3x3 { grid-template-columns: repeat(3, 1fr); max-width: 300px; }
#board-grid.size-4x4 { grid-template-columns: repeat(4, 1fr); max-width: 340px; }
#board-grid.size-5x5 { grid-template-columns: repeat(5, 1fr); max-width: 360px; }

/* ===== CELLS ===== */
.cell {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  user-select: none;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  transform-style: preserve-3d;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.28), rgba(99, 102, 241, 0.1));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.cell:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-primary-glow);
}
.cell:active {
  transform: scale(0.98);
}

.cell .cell-front,
.cell .cell-back {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.cell .cell-front {
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.08));
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.cell .cell-front::after {
  content: '?';
  font-size: 20px;
  font-weight: 800;
  opacity: 0.25;
  color: var(--color-primary);
}
.cell .cell-back {
  transform: rotateY(180deg);
  background: transparent;
}

.cell.safe {
  animation: cellReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  cursor: default;
}
.cell.safe .cell-back {
  background: linear-gradient(145deg, var(--color-success), #059669);
  box-shadow: 0 0 24px var(--color-success-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.cell.safe .cell-back::after {
  content: '';
  width: 28px;
  height: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 72'><path fill='%23ffffff' d='M32 4l22 8v20c0 15-9.6 28.3-22 32-12.4-3.7-22-17-22-32V12l22-8z'/><path fill='%2300e676' opacity='0.45' d='M32 12l15 5v15c0 10.5-6.6 20-15 23.5C23.6 52 17 42.5 17 32V17l15-5z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7));
  animation: safePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cell.safe::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.55), transparent 70%);
  opacity: 0;
  animation: safeBurst 0.5s ease forwards;
  pointer-events: none;
}

@keyframes safeBurst {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 0.9; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1.4); }
}
@keyframes safePop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.cell.mine {
  animation: cellReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  cursor: default;
}
.cell.mine .cell-back {
  background: linear-gradient(145deg, var(--color-danger), #dc2626);
  box-shadow: 0 0 24px var(--color-danger-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.cell.mine .cell-back::after {
  content: '💥';
  font-size: 24px;
}

/* ── Full Board Reveal – Premium Cell States ── */

/* Freeze the board when the round ends */
#board-grid.game-over {
  pointer-events: none;
}

/* State 1: Cleared Square – user's successful path */
.cell.cell-cleared .cell-back {
  background: linear-gradient(145deg, var(--color-success), #059669);
  box-shadow: 0 0 24px var(--color-success-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.cell.cell-cleared .cell-back::after {
  content: '';
  width: 28px;
  height: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.7));
}

/* State 2: Exploded Mine – the cell the user hit (instant flip, no delay) */
.cell.cell-mine-exploded {
  cursor: default;
  transform: rotateY(180deg);
}
.cell.cell-mine-exploded .cell-back {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.8), 0 0 60px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: mineGlitch 0.5s ease 0.3s 3;
}
.cell.cell-mine-exploded .cell-back::after {
  content: '💥';
  font-size: 26px;
  animation: minePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mineGlitch {
  0%, 100% { transform: rotateY(180deg) translateX(0); }
  20% { transform: rotateY(180deg) translateX(-3px) skewX(2deg); }
  40% { transform: rotateY(180deg) translateX(3px) skewX(-2deg); }
  60% { transform: rotateY(180deg) translateX(-1px) skewX(1deg); }
  80% { transform: rotateY(180deg) translateX(1px) skewX(-1deg); }
}
@keyframes minePop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.4) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* State 3: Missed Mines – translucent, faded */
.cell.cell-mine-hidden {
  cursor: default;
  animation: cellReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.cell.cell-mine-hidden .cell-back {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.15);
  box-shadow: none;
}
.cell.cell-mine-hidden .cell-back::after {
  content: '💣';
  font-size: 20px;
  opacity: 0.4;
  filter: grayscale(0.5);
}

/* State 4: Empty Unrevealed Squares – dark/dimmed */
.cell.cell-safe-unrevealed {
  cursor: default;
  animation: cellReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.cell.cell-safe-unrevealed .cell-back {
  background: linear-gradient(145deg, rgba(35, 40, 52, 0.9), rgba(22, 27, 38, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: none;
}
.cell.cell-safe-unrevealed .cell-back::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cell.flipped {
  pointer-events: none;
}

@keyframes cellReveal {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(90deg) scale(1.06); }
  100% { transform: rotateY(180deg) scale(1); }
}

/* ===== GAME STATUS ===== */
#game-status {
  background: rgba(26, 29, 36, 0.82);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeSlideUp 0.35s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.status-row span:first-child {
  color: var(--color-muted);
  font-weight: 500;
}
.status-row span:last-child {
  font-weight: 700;
  font-size: 18px;
}

#multiplier-display {
  color: var(--color-success);
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 0 20px var(--color-success-glow);
}

#potential-win {
  color: var(--color-primary);
  font-size: 18px;
}

.btn-cashout {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--color-success), #059669) !important;
  box-shadow: 0 4px 20px var(--color-success-glow) !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.btn-cashout:disabled {
  opacity: 0.35 !important;
  box-shadow: none !important;
}

/* ===== NOTIFICATION ===== */
.notification {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  max-width: 380px;
  width: calc(100% - 32px);
  z-index: 200;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
}
.notification.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}
.notification.success {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}
.notification.error {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

/* ===== WIN MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
}
.modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--color-border);
  animation: modalPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@keyframes modalPop {
  0% { transform: scale(0.5) translateY(40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-icon {
  font-size: 52px;
  margin-bottom: 4px;
  animation: modalBounce 0.8s ease infinite alternate;
}

@keyframes modalBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.modal-amount {
  font-size: 52px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-success), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: modalScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-sub {
  font-size: 14px;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-detail {
  font-size: 13px;
  color: var(--color-muted);
  opacity: 0.6;
  margin-top: 4px;
}

.modal-btn {
  margin-top: 12px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-primary), #a855f7);
  color: #fff;
  box-shadow: 0 4px 20px var(--color-primary-glow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  font-family: var(--font);
}
.modal-btn:active {
  transform: scale(0.98);
}

/* ===== CRASH SECTION ===== */
#crash-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#crash-graph-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

#crash-graph-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 1;
}

#crash-graph-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.18), transparent 55%);
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

#crash-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 3;
}

#crash-multiplier-display {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 38px;
  font-weight: 900;
  color: var(--color-success);
  text-shadow: 0 0 30px var(--color-success-glow), 0 0 60px rgba(16, 185, 129, 0.2);
  transition: color 0.3s ease, text-shadow 0.3s ease;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

#crash-multiplier-display.danger {
  color: var(--color-danger);
  text-shadow: 0 0 30px var(--color-danger-glow), 0 0 60px rgba(239, 68, 68, 0.2);
}
#crash-multiplier-display.gold {
  color: var(--color-gold);
  text-shadow: 0 0 30px var(--color-gold-glow), 0 0 60px rgba(245, 158, 11, 0.2);
}

#crash-rocket {
  position: absolute;
  font-size: 28px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.8));
  will-change: left, bottom;
}

/* Crash glitch overlay */
.crash-glitch {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.crash-glitch.active {
  opacity: 1;
}
.crash-glitch-text {
  font-size: 48px;
  font-weight: 900;
  color: var(--color-danger);
  text-shadow: 0 0 40px var(--color-danger-glow), 0 0 80px rgba(239, 68, 68, 0.3);
  animation: glitch 0.4s infinite;
  letter-spacing: 4px;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, -1px); }
  80% { transform: translate(2px, 1px); }
  100% { transform: translate(0); }
}

.crash-phase {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeSlideUp 0.35s ease;
}
.crash-phase.hidden { display: none; }

.btn-crash-action {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong)) !important;
  box-shadow: 0 6px 26px var(--color-primary-glow) !important;
  font-size: 18px !important;
  padding: 16px !important;
}

.btn-crash-cashout {
  background: linear-gradient(135deg, var(--color-gold), #d97706) !important;
  box-shadow: 0 4px 24px var(--color-gold-glow) !important;
  font-size: 20px !important;
  padding: 18px !important;
  animation: cashoutPulse 1.5s ease-in-out infinite;
}

@keyframes cashoutPulse {
  0%, 100% { box-shadow: 0 4px 24px var(--color-gold-glow); }
  50% { box-shadow: 0 6px 32px var(--color-gold-glow), 0 0 48px rgba(245, 158, 11, 0.15); }
}
.btn-crash-cashout:active {
  transform: scale(0.98) !important;
}

#crash-result {
  align-items: center;
  text-align: center;
  padding: 12px 0;
}

#crash-result-text {
  font-size: 18px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-md);
}
#crash-result-text.crash-lost {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.1);
}
#crash-result-text.crash-won {
  color: var(--color-gold);
  background: rgba(245, 158, 11, 0.1);
}

#crash-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-muted);
}

#crash-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
}

.crash-history-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  animation: fadeSlideUp 0.3s ease;
}
.crash-history-pill.crash-pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.crash-history-pill.crash-pill-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

#crash-graph-wrap.shake {
  animation: shake 0.5s ease;
}

/* ===== WHEEL OF FORTUNE ===== */
#wheel-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 8px auto;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.wheel-rotator {
  width: 100%;
  height: 100%;
  transition: transform 5s cubic-bezier(0.12, 0.75, 0.2, 1);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.wheel-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: var(--color-gold);
  z-index: 10;
  filter: drop-shadow(0 0 12px var(--color-gold-glow)) drop-shadow(0 0 24px rgba(245, 158, 11, 0.3));
  line-height: 1;
  pointer-events: none;
  animation: pointerBounce 1.5s ease-in-out infinite;
}

@keyframes pointerBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

.wheel-hub-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary), #2a1f6e);
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px var(--color-primary-glow), inset 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 5;
  pointer-events: none;
}

.wheel-hub-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--color-primary));
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
}

/* Wheel outer glow ring */
.wheel-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-primary) 0deg,
    var(--color-primary-strong) 51deg,
    var(--color-success) 103deg,
    var(--color-gold) 154deg,
    var(--color-danger) 205deg,
    var(--color-primary) 257deg,
    var(--color-primary-strong) 308deg,
    var(--color-primary) 360deg
  );
  opacity: 0.15;
  filter: blur(8px);
  z-index: -1;
  animation: wheelGlow 4s ease-in-out infinite alternate;
}

@keyframes wheelGlow {
  0% { opacity: 0.1; filter: blur(8px); }
  100% { opacity: 0.25; filter: blur(12px); }
}

.wheel-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wheel-prizes-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-muted);
}

.wheel-prizes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.wheel-prize-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wheel-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(18, 20, 26, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 600;
}

.wheel-status-icon {
  font-size: 18px;
}

#wheel-status-text {
  flex: 1;
  color: var(--color-text);
}

.wheel-countdown {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wheel-countdown.hidden {
  display: none;
}

#wheel-timer {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px var(--color-gold-glow);
  letter-spacing: 2px;
}

#wheel-timer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
}

/* Wheel result modal */
.wheel-modal-content {
  position: relative;
  overflow: hidden;
}

.wheel-modal-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.wheel-modal-glow.active {
  opacity: 1;
  animation: modalGlowPulse 1.5s ease-in-out infinite;
}

@keyframes modalGlowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
}

.wheel-modal-icon {
  font-size: 56px;
  margin-bottom: 4px;
  z-index: 1;
  animation: modalBounce 0.8s ease infinite alternate;
}

.wheel-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  z-index: 1;
}

.wheel-modal-prize {
  font-size: 36px;
  font-weight: 900;
  z-index: 1;
  animation: modalScale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wheel-modal-sub {
  font-size: 13px;
  color: var(--color-muted);
  font-weight: 500;
  z-index: 1;
}

#wheel-spin-btn:disabled {
  opacity: 0.35;
  transform: none;
  cursor: not-allowed;
  box-shadow: none;
  animation: none;
}

@keyframes wheelSpinPulse {
  0%, 100% { box-shadow: 0 6px 26px var(--color-primary-glow); }
  50% { box-shadow: 0 8px 40px var(--color-primary-glow), 0 0 70px var(--color-primary-glow); }
}

#wheel-spin-btn.spin-ready {
  background: linear-gradient(135deg, var(--color-success), #059669) !important;
  box-shadow: 0 6px 26px var(--color-success-glow) !important;
  animation: wheelSpinPulse 2s ease-in-out infinite;
}

#wheel-spin-btn.spin-paid {
  background: linear-gradient(135deg, var(--color-gold), #d97706) !important;
  box-shadow: 0 6px 26px var(--color-gold-glow) !important;
}

#wheel-spin-btn.spin-locked {
  background: linear-gradient(135deg, #4b5563, #374151) !important;
  box-shadow: none !important;
  animation: none !important;
}

/* ===== TIER INFO ROW (Win Limit Display) ===== */
.tier-info-row {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gold);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  text-align: center;
  letter-spacing: 0.3px;
}

/* ===== TURBO BADGE ===== */
.turbo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.6), 0 0 32px rgba(168, 85, 247, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.4);
  animation: turboPulse 2s ease-in-out infinite;
  margin-left: 6px;
  vertical-align: middle;
}

#turbo-badge-header {
  font-size: 9px;
  padding: 2px 8px;
}

@keyframes turboPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.6), 0 0 32px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 24px rgba(168, 85, 247, 0.8), 0 0 48px rgba(168, 85, 247, 0.4); }
}

/* ===== EXCHANGE LIMITS BAR ===== */
.exchange-limits-bar {
  margin-top: 12px;
  padding: 12px;
  background: rgba(18, 20, 26, 0.7);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.exchange-limits-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.exchange-limits-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.exchange-limits-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #a855f7);
  border-radius: 4px;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px var(--color-primary-glow);
}

.exchange-limits-text {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  margin-top: 6px;
  text-align: center;
}

/* ===== TURBO PROMO & BUY BUTTONS ===== */
.btn-turbo-promo {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(124, 58, 237, 0.1));
  color: #c084fc;
  transition: all 0.2s ease;
  font-family: var(--font);
  letter-spacing: 0.3px;
}
.btn-turbo-promo:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.2));
}
.btn-turbo-promo:hover {
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-turbo-buy {
  background: linear-gradient(135deg, #a855f7, #7c3aed) !important;
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5) !important;
  animation: turboPulse 2s ease-in-out infinite;
}
.btn-turbo-buy:disabled {
  opacity: 0.35;
  animation: none;
}

@media (max-width: 420px) {
  #app {
    padding: 14px 12px 100px;
  }

  .brand-title {
    font-size: 14px;
  }

  .bet-controller-row {
    flex-wrap: wrap;
  }

  .bet-ctrl-btn {
    flex: 1 1 56px;
    min-width: 44px;
  }

  .bet-input-wrap {
    flex: 1 1 100%;
    min-width: 0;
  }
}
