/* Mom's Cozy Arcade Stylesheet */
:root {
  --bg-warm: #faf7f2;
  --bg-card: #ffffff;
  --text-main: #332d29;
  --text-muted: #796f68;
  --primary: #f43f5e;
  --primary-hover: #e11d48;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --secondary: #6366f1;
  --success: #10b981;
  --border-subtle: #ebdcd0;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-cozy: 0 10px 30px rgba(80, 50, 30, 0.07);
  --shadow-hover: 0 16px 36px rgba(80, 50, 30, 0.12);
  --font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-warm);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Confetti Layer */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* App Wrapper */
.arcade-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Header */
.arcade-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-subtle);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-icon {
  font-size: 2rem;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #a82d49;
  letter-spacing: -0.5px;
}

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

.stars-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  border: 2px solid #fde68a;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #b45309;
}

.star-icon {
  font-size: 1.3rem;
}

/* Cozy Buttons */
.cozy-btn {
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cozy-btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 2px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: #f7f3ed;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-pill {
  border-radius: 999px;
}

.sound-btn {
  background: #f3f0ea;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  padding: 8px 16px;
}

.sound-btn.muted {
  background: #fee2e2;
  color: #991b1b;
}

/* Main Body */
.arcade-main {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

/* Lobby Section */
.welcome-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #fef3c7 100%);
  border: 2px solid #fed7aa;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-cozy);
  text-align: center;
}

.welcome-text h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: #9f1239;
  margin-bottom: 10px;
}

.welcome-text p {
  font-size: 1.25rem;
  color: #78350f;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Game Selection Cards */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
  margin-bottom: 36px;
}

.game-card {
  background: var(--bg-card);
  border: 3px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-cozy);
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: #f43f5e;
}

.card-hero-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.game-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #ffe4e6;
  color: #e11d48;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}

.neon-badge {
  background: #cffafe;
  color: #0891b2;
}

.game-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #1e293b;
}

.game-card p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.neon-tag {
  background: #fdf2f8;
  color: #db2777;
}

.btn-card-play {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #ffffff;
  width: 100%;
  font-size: 1.25rem;
  padding: 16px;
  border-radius: var(--radius-md);
}

.btn-neon-play {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.tracker-badge {
  background: #ede9fe;
  color: #7c3aed;
}

.tracker-tag {
  background: #f5f3ff;
  color: #6d28d9;
}

.btn-tracker-play {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  display: block;
  text-align: center;
  text-decoration: none;
}

.btn-tracker-play:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.card-tracker:hover {
  border-color: #8b5cf6;
}

.header-link-btn {
  background: #ffffff;
  color: #475569;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 16px;
  border: 2px solid var(--border-subtle);
  border-radius: 999px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-link-btn:hover {
  background: #f1f5f9;
  border-color: #8b5cf6;
  color: #6d28d9;
  transform: translateY(-1px);
}

.lobby-footer-note {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #a82d49;
  margin-top: auto;
  padding: 20px 0;
}

/* ========================================================
   GAME 1: PICTURE GRID PUZZLE STYLES
   ======================================================== */
.puzzle-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.puzzle-top-bar, .arrow-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.difficulty-picker, .helper-buttons, .arrow-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.pill-btn {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Album Tabs */
.album-tabs-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.album-tabs {
  display: flex;
  gap: 12px;
}

.album-tab {
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.album-tab.active {
  background: #fff1f2;
  border-color: var(--primary);
  color: var(--primary);
}

.tab-badge {
  background: #f1f5f9;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 999px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tab-badge.has-new {
  background: #ffe4e6;
  color: #e11d48;
  font-weight: 800;
}

.album-tab.active .tab-badge {
  background: #ffe4e6;
  color: var(--primary);
}

/* Thumbnails Bar */
.thumbnails-bar {
  overflow-x: auto;
  padding: 4px 0 10px;
}

.thumbnails-list {
  display: flex;
  gap: 14px;
  align-items: center;
}

.thumb-card {
  width: 100px;
  height: 90px;
  border-radius: var(--radius-sm);
  border: 3px solid var(--border-subtle);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
  background: #ffffff;
}

.thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-card.active {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.thumb-badge-done {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 2;
}

.thumb-badge-new {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #f43f5e;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  z-index: 2;
}

.upload-thumbnail-card {
  width: 110px;
  height: 90px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--primary);
  background: #fff1f2;
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px;
  text-align: center;
  flex-shrink: 0;
}

.upload-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

/* Main Puzzle Canvas Area */
.puzzle-play-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.puzzle-board-wrapper {
  position: relative;
  width: min(94vw, 680px);
  height: min(94vw, 680px);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0,0,0,0.15);
  background: #332d29;
  padding: 8px;
  box-sizing: border-box;
}

.puzzle-board {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 1fr);
  grid-template-rows: repeat(var(--grid-size), 1fr);
  gap: var(--grid-gap, 4px);
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.puzzle-board[data-grid="8"],
.puzzle-board[data-grid="10"] {
  --grid-gap: 2px;
}

.puzzle-tile {
  position: relative;
  background-repeat: no-repeat;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease;
  user-select: none;
  touch-action: none;
}

.puzzle-board[data-grid="8"] .puzzle-tile,
.puzzle-board[data-grid="10"] .puzzle-tile {
  border-radius: 3px;
}

.puzzle-tile:hover {
  filter: brightness(1.05);
}

/* Joined pieces corner rounding & gap bridging */
.puzzle-tile.conn-t { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.puzzle-tile.conn-b { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.puzzle-tile.conn-l { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.puzzle-tile.conn-r { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }

.puzzle-tile.conn-r {
  margin-right: calc(-1 * var(--grid-gap, 4px));
  z-index: 1;
}

.puzzle-tile.conn-b {
  margin-bottom: calc(-1 * var(--grid-gap, 4px));
  z-index: 1;
}

/* Group hover */
.puzzle-tile.group-hovered:not(.selected) {
  filter: brightness(1.08);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
  z-index: 6;
}

/* Group selection (perimeter outline) */
.puzzle-tile.selected {
  outline: none;
  box-sizing: border-box;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.85);
  z-index: 10;
  border: 3px solid #fbbf24;
}

.puzzle-tile.selected.conn-t { border-top: none; }
.puzzle-tile.selected.conn-b { border-bottom: none; }
.puzzle-tile.selected.conn-l { border-left: none; }
.puzzle-tile.selected.conn-r { border-right: none; }

.puzzle-board[data-grid="8"] .puzzle-tile.selected,
.puzzle-board[data-grid="10"] .puzzle-tile.selected {
  border-width: 2px;
}

.puzzle-tile.selected.is-anchor::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: #fbbf24;
  border-radius: 50%;
  box-shadow: 0 0 8px #fbbf24, 0 0 2px #ffffff;
  z-index: 12;
}

.puzzle-board[data-grid="8"] .puzzle-tile.selected.is-anchor::before,
.puzzle-board[data-grid="10"] .puzzle-tile.selected.is-anchor::before {
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
}

/* Multi-piece Group Size Badge */
.group-size-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
  color: #fde047;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(253, 224, 71, 0.4);
  user-select: none;
}

.puzzle-board[data-grid="8"] .group-size-badge,
.puzzle-board[data-grid="10"] .group-size-badge {
  font-size: 0.52rem;
  padding: 1px 4px;
  bottom: 2px;
  left: 2px;
}

/* Animations: Snap Pulse & Shake Invalid */
@keyframes snapPulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  35% {
    transform: scale(1.05);
    filter: brightness(1.35) drop-shadow(0 0 10px #10b981);
    z-index: 20;
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.puzzle-tile.just-snapped {
  animation: snapPulse 0.45s ease-out;
}

@keyframes shakeInvalid {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.puzzle-tile.shake-invalid {
  animation: shakeInvalid 0.35s ease-in-out;
}

.puzzle-tile.in-place .correct-indicator {
  display: block;
}

.correct-indicator {
  display: none;
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
}

.puzzle-board[data-grid="8"] .correct-indicator,
.puzzle-board[data-grid="10"] .correct-indicator {
  width: 13px;
  height: 13px;
  line-height: 13px;
  font-size: 0.55rem;
  bottom: 2px;
  right: 2px;
}

.tile-num {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.puzzle-board[data-grid="6"] .tile-num {
  font-size: 0.75rem;
  padding: 1px 5px;
  top: 4px;
  left: 4px;
}

.puzzle-board[data-grid="8"] .tile-num,
.puzzle-board[data-grid="10"] .tile-num {
  font-size: 0.58rem;
  padding: 1px 3px;
  top: 2px;
  left: 2px;
  border-radius: 2px;
}

/* Peek Reference Overlay */
.puzzle-peek-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 50;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
}

.puzzle-peek-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.peek-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Win Overlay */
.puzzle-win-card, .arrow-win-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 4px solid #f43f5e;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  z-index: 60;
  width: 90%;
  max-width: 420px;
}

.win-sparkle {
  font-size: 2rem;
  margin-bottom: 10px;
}

.puzzle-win-card h2, .arrow-win-overlay h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #9f1239;
  margin-bottom: 8px;
}

.puzzle-win-card p, .arrow-win-overlay p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.win-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.puzzle-status-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.upload-dropzone {
  border: 3px dashed var(--primary);
  background: #fff1f2;
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  margin: 20px 0;
  transition: all 0.2s;
}

.upload-dropzone:hover {
  background: #ffe4e6;
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.upload-status {
  font-weight: 700;
  margin-top: 10px;
  text-align: center;
}

/* ========================================================
   GAME 2: ARROW ESCAPE STYLES
   ======================================================== */
.arrow-view-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.level-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-badge {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0284c7;
}

.remaining-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

.arrow-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pill-group {
  display: flex;
  gap: 10px;
}

.level-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.level-quick-btn {
  font-family: var(--font-family);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.level-quick-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.endless-size-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}

/* Arrow SVG Board */
.arrow-canvas-wrapper {
  position: relative;
  width: min(92vw, 640px);
  height: min(92vw, 640px);
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(10, 10, 25, 0.3);
  background: #14141e;
  border: 4px solid #232338;
}

.arrow-board-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.arrow-group {
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.35s ease;
}

.arrow-group:hover path {
  filter: brightness(1.2);
}

/* Flight Animations */
.arrow-group.fly-right {
  transform: translateX(600px);
  opacity: 0;
}

.arrow-group.fly-left {
  transform: translateX(-600px);
  opacity: 0;
}

.arrow-group.fly-up {
  transform: translateY(-600px);
  opacity: 0;
}

.arrow-group.fly-down {
  transform: translateY(600px);
  opacity: 0;
}

/* Blocked Wiggle Animation */
@keyframes blockedShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 0); }
  40% { transform: translate(8px, 0); }
  60% { transform: translate(-6px, 0); }
  80% { transform: translate(6px, 0); }
  100% { transform: translate(0, 0); }
}

.arrow-group.blocked-wiggle {
  animation: blockedShake 0.35s ease-in-out;
}

/* Blocker Highlight */
@keyframes blockerPulse {
  0% { filter: brightness(1); }
  50% { filter: brightness(2) drop-shadow(0 0 12px #ef4444); }
  100% { filter: brightness(1); }
}

.arrow-group.blocker-highlight {
  animation: blockerPulse 0.4s ease;
}

/* Hint Pulse */
@keyframes hintGlow {
  0% { filter: brightness(1); }
  50% { filter: brightness(2.2) drop-shadow(0 0 20px #fbbf24); }
  100% { filter: brightness(1); }
}

.arrow-group.hint-pulse {
  animation: hintGlow 0.8s ease 2;
}

.arrow-footer-tip {
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .welcome-banner {
    padding: 24px 16px;
  }
  .welcome-text h1 {
    font-size: 1.6rem;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   Game 3: Picture Blast Solitaire Styles
   ======================================================== */

/* Lobby Card 3 */
.card-blast {
  border-color: #fde68a;
  background: radial-gradient(circle at top right, #fffbeb, #ffffff);
}

.card-blast:hover {
  border-color: #f59e0b;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.18);
}

.blast-badge {
  background: #fef3c7;
  color: #b45309;
}

.blast-tag {
  background: #ecfdf5;
  color: #047857;
}

.btn-blast-play {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.btn-blast-play:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
}

/* /* Picture Blast Felt Table (Matching Mom's iPad screen) */
.blast-felt-table {
  background: radial-gradient(circle at 50% 25%, #15803d 0%, #166534 50%, #052e16 100%);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.6), var(--shadow-cozy);
  border-radius: var(--radius-lg);
  border: 4px solid #166534;
  padding: 16px 14px 28px;
  color: #ffffff;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  min-height: 820px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

/* Top Navigation Bar & Golden Progress Bar */
.blast-felt-table .blast-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.blast-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-badges-btn {
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toggle-badges-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
}

.toggle-badges-btn.active {
  background: linear-gradient(135deg, #fef08a, #fde047) !important;
  color: #854d0e !important;
  border-color: #facc15 !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.blast-level-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 420px;
  margin: 0 14px;
}

.blast-level-pill {
  background: linear-gradient(135deg, #fef08a, #fde047);
  color: #854d0e;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.blast-mode-pill {
  background: rgba(255, 255, 255, 0.16);
  color: #fef08a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(254, 240, 138, 0.35);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blast-progress-track {
  position: relative;
  flex: 1;
  height: 24px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

.blast-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 60%, #fde047 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

.blast-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  white-space: nowrap;
}

/* 6 Top Reserve Stacks (Directly aligned above the 6 columns!) */
.blast-reserves-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.reserve-stack-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.reserve-down-arrow {
  font-size: 10px;
  color: #86efac;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  margin-top: 3px;
  line-height: 1;
}

.reserve-stack-col.empty-stack .reserve-down-arrow {
  color: rgba(255, 255, 255, 0.15);
}

.reserve-card-visual {
  width: 100%;
  max-width: 78px;
  height: 46px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #1d4ed8 100%);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 3px, transparent 0, transparent 8px),
                    repeating-linear-gradient(-45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 3px, transparent 0, transparent 8px);
  border: 2px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), 0 2px 0 #1e3a8a, inset 0 0 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.reserve-stack-col.empty-stack .reserve-card-visual {
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.reserve-stack-col.empty-stack .reserve-card-badge {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

.reserve-card-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-weight: 800;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Main 6-Column Board Grid */
.blast-board-wrapper {
  width: 100%;
  background: rgba(4, 30, 14, 0.85);
  border: 3px solid #166534;
  border-radius: 16px;
  padding: 8px;
  box-shadow: inset 0 4px 18px rgba(0, 0, 0, 0.7);
  margin-bottom: 14px;
  box-sizing: border-box;
}

.blast-board-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 6), 1fr);
  grid-auto-rows: 88px;
  gap: 6px;
  width: 100%;
  min-height: 540px;
  position: relative;
}

.grid-slot-cell {
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  min-height: 88px;
  cursor: pointer;
  transition: background 0.15s;
}

.grid-slot-cell:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Full-Bleed Photographic Card Tiles */
.blast-card-piece {
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  background-color: #1e293b;
  z-index: 5;
}

.blast-card-piece:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
  z-index: 10;
}

.blast-card-piece.selected-card {
  outline: 3.5px solid #fbbf24;
  box-shadow: 0 0 22px #fbbf24, 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  transform: translateY(-4px) scale(1.04) !important;
  z-index: 50;
}

.blast-card-piece.dragging {
  opacity: 0.35;
  transform: scale(0.95);
}

.touch-drag-clone {
  pointer-events: none !important;
  user-select: none !important;
  transition: none !important;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.9) !important;
}

.card-art-fullbleed {
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border-radius: 9px;
  overflow: hidden;
}

.card-glass-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
}

.card-slice-indicator {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fef08a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  border: 1px solid rgba(254, 240, 138, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* Hide location badges when toggled OFF */
.hide-location-badges .card-slice-indicator {
  display: none !important;
}

.card-art-fallback {
  width: 100%;
  height: 100%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px;
  text-align: center;
}

/* Animations: Hint Pulsing & Blasting */
@keyframes hintPulsing {
  0% { box-shadow: 0 0 0 3px #fbbf24, 0 0 12px #f59e0b; transform: scale(1.02); }
  50% { box-shadow: 0 0 0 5px #fef08a, 0 0 24px #fbbf24; transform: scale(1.06); }
  100% { box-shadow: 0 0 0 3px #fbbf24, 0 0 12px #f59e0b; transform: scale(1.02); }
}

.blast-card-piece.hint-pulsing {
  animation: hintPulsing 0.6s infinite alternate !important;
  z-index: 100 !important;
}

@keyframes blastPop {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.12); filter: brightness(1.6) drop-shadow(0 0 16px #fbbf24); }
  100% { transform: scale(0.2); opacity: 0; }
}

.blast-card-piece.blasting-card {
  animation: blastPop 0.5s ease forwards !important;
  z-index: 999 !important;
}

.blast-card-piece.revealing-match {
  opacity: 0.05 !important;
  transition: opacity 0.2s ease;
}

@keyframes cardFallDown {
  0% { transform: translateY(-70px) scale(0.92); opacity: 0.3; }
  65% { transform: translateY(4px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.blast-card-piece.card-falling-down {
  animation: cardFallDown 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.15) forwards;
  z-index: 20;
}

/* Full Picture Complete Reveal (2-second admire display) */
.completed-picture-reveal {
  position: relative;
  z-index: 150;
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  box-shadow: 0 0 0 3.5px #fbbf24, 0 0 32px rgba(251, 191, 36, 0.9), 0 12px 28px rgba(0, 0, 0, 0.5);
  animation: revealAppear 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.25) forwards;
  pointer-events: none;
}

@keyframes revealAppear {
  0% { transform: scale(0.88); opacity: 0; filter: brightness(1.4); }
  60% { transform: scale(1.03); opacity: 1; filter: brightness(1.15); }
  100% { transform: scale(1); opacity: 1; filter: brightness(1); }
}

.reveal-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.reveal-shine {
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  animation: revealShineSweep 1.2s 0.25s ease-in-out infinite;
  pointer-events: none;
}

@keyframes revealShineSweep {
  0% { left: -150%; }
  60% { left: 150%; }
  100% { left: 150%; }
}

.reveal-badge {
  background: rgba(15, 23, 42, 0.88);
  color: #fde047;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 10px;
  border: 1.5px solid #fbbf24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: badgePulse 1s ease-in-out infinite alternate;
}

@keyframes badgePulse {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.04); }
}

.completed-picture-reveal.blast-pop-out {
  animation: revealPopOut 0.4s ease forwards !important;
}

@keyframes revealPopOut {
  0% { transform: scale(1); filter: brightness(1); opacity: 1; }
  35% { transform: scale(1.12); filter: brightness(1.7) drop-shadow(0 0 24px #fbbf24); opacity: 1; }
  100% { transform: scale(0.15) rotate(4deg); opacity: 0; filter: brightness(2); }
}

/* Particle explosion */
.blast-particle {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  animation: particleFly 0.65s ease-out forwards;
}

@keyframes particleFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Bottom Boosters Toolbar (Circular gold buttons matching Mom's photo!) */
.blast-boosters-bar {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.booster-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s;
}

.booster-btn:hover {
  transform: translateY(-3px) scale(1.06);
}

.booster-btn:active {
  transform: translateY(1px) scale(0.95);
}

.booster-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 55%, #d97706 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.booster-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Win Celebration Modal */
.win-modal-card {
  text-align: center;
  padding: 32px 24px;
}

.win-sparkle-stars {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.win-modal-card h2 {
  font-size: 1.8rem;
  color: #15803d;
  margin-bottom: 10px;
}

.win-modal-card p {
  font-size: 1.15rem;
  color: #334155;
  margin-bottom: 22px;
}

.modal-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
}0;
  padding: 16px;
}

.blast-cozy-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  border: 3.5px solid #fbbf24;
  animation: dialogBounceIn 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  color: var(--text-main);
}

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

.dialog-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

.dialog-icon.celebration-bounce {
  animation: iconBounce 1s infinite alternate;
}

@keyframes iconBounce {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.1); }
}

.blast-cozy-dialog h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
}

.blast-cozy-dialog p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-btn {
  padding: 14px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dialog-undo-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.dialog-shuffle-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.dialog-return-btn {
  background: #f1f5f9;
  color: #475569;
}

.dialog-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* Win Dialog */
.win-dialog {
  border-color: #10b981;
}

.win-stars-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 3rem;
  margin-bottom: 16px;
  animation: starSpin 0.6s ease-out;
}

@keyframes starSpin {
  0% { transform: scale(0.2) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.win-stats-badge {
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 10px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
  display: inline-block;
}

.btn-next-level {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 1.25rem;
  padding: 16px;
}

.btn-replay-level {
  background: #f8fafc;
  color: #475569;
  border: 2px solid #cbd5e1;
}

/* Responsive adjustments for iPad & smaller screens */
@media (max-width: 820px) {
  .blast-columns-row,
  .blast-reserves-row {
    gap: 10px;
  }
  .blast-card,
  .col-slot-base,
  .col-cards-cascade {
    width: 96px;
    height: 128px;
  }
  .blast-tray-slot {
    width: 96px;
    height: 128px;
  }
  .reserve-card-back {
    width: 70px;
    height: 42px;
  }
}

@media (max-width: 580px) {
  .blast-columns-row,
  .blast-reserves-row {
    gap: 6px;
  }
  .blast-card,
  .col-slot-base,
  .col-cards-cascade {
    width: 66px;
    height: 90px;
  }
  .blast-tray-slot {
    width: 70px;
    height: 96px;
  }
  .blast-tray-slots {
    gap: 8px;
  }
  .reserve-card-back {
    width: 54px;
    height: 34px;
  }
  .booster-circle-icon {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
  .booster-label {
    font-size: 0.9rem;
  }
  .blast-level-title {
    font-size: 1.3rem;
  }
}

/* Theme & Color Moods Picker Modal */
.theme-modal-card {
  max-width: 820px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.theme-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 14px;
}

.theme-modal-header h2 {
  font-size: 1.5rem;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-modal-section {
  margin-top: 18px;
}

.theme-modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.theme-modal-section h3 {
  font-size: 1.05rem;
  color: #475569;
  margin: 0 0 10px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}

.theme-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
}

.theme-cat-tab:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.theme-cat-tab.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.theme-packs-grid,
.color-suites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.theme-card-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
}

.theme-card-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.theme-card-option.active {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.theme-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 4px;
}

.theme-card-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.theme-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
  flex: 1;
}

.theme-card-check {
  font-size: 0.9rem;
  color: #d97706;
  font-weight: 800;
}

.theme-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
  margin-bottom: 6px;
}

.color-swatches-row {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}

.color-swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  display: inline-block;
}

.theme-picker-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4) !important;
}

.theme-picker-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
}
