/* ==========================================================================
   HOLLOW - Core Stylesheet
   Modern Dark Cyberpunk / Gaming Aesthetics with Smooth Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Orbitron:wght@600;800;900&display=swap');

:root {
  --bg-dark: #07080c;
  --bg-card: rgba(17, 20, 32, 0.88);
  --bg-card-solid: #111420;
  --bg-card-hover: rgba(26, 32, 51, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);

  --accent-cyan: #00f0ff;
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-logo: 'Orbitron', sans-serif;
  --font-heading: 'Fredoka', sans-serif;
  --font-body: 'Rubik', sans-serif;

  --board-size: 360px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Dynamic background ambient lighting */
body::before {
  content: "";
  position: fixed;
  top: -10vw;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(0, 240, 255, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -10vw;
  right: 15%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Website Background Image Layer (20% Opacity) */
.site-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZczphAnUFKRZf8WpbkIv-gwvsHrfAvIl4FIXmYrtBzPVDwR2pkzfqAwxA&s=10');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

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

/* ==========================================================================
   AD PLACEMENT CONTAINERS
   ========================================================================== */
.ad-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  position: relative;
  z-index: 10;
}

.top-ad-wrapper {
  margin-top: 6px;
  margin-bottom: 6px;
}

.bottom-ad-wrapper {
  margin-top: 14px;
  margin-bottom: 24px;
}

.social-bar-slot {
  width: 100%;
  margin-bottom: 14px;
  text-align: center;
}

.ad-box {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  background: rgba(18, 22, 34, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
  transition: border-color 0.3s ease;
  overflow: hidden;
}

.ad-box iframe {
  max-width: 100%;
}

.ad-box:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

.ad-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.ad-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Main Layout & Header
   ========================================================================== */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo & Header */
.game-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #d8b4fe;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.brand-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: #a855f7;
  border-radius: 50%;
  box-shadow: 0 0 8px #a855f7;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

.game-title {
  font-family: var(--font-logo);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-cyan) 60%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.4));
  margin-bottom: 8px;
}

.game-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  max-width: 580px;
  margin: 0 auto;
}

/* ==========================================================================
   Puzzle Container & Mini Game
   ========================================================================== */
.puzzle-section {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.puzzle-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
}

.puzzle-top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 4px;
}

.puzzle-instruction {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

.puzzle-controls {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.icon-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(0, 240, 255, 0.4);
}

/* The Puzzle Board Frame */
.puzzle-board-wrapper {
  position: relative;
  width: 100%;
  max-width: var(--board-size);
  aspect-ratio: 1 / 1;
  margin: 6px auto 20px;
  padding: 6px;
  background: #0d101a;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.puzzle-board-wrapper.completed {
  border-color: var(--accent-green);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), inset 0 0 15px rgba(16, 185, 129, 0.2);
}

.puzzle-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  border-radius: 12px;
  overflow: hidden;
  background: #08090f;
  position: relative;
}

/* Individual Slot */
.puzzle-slot {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #121522;
  transition: background-color 0.2s ease, transform 0.2s ease;
  user-select: none;
}

/* Empty missing slot styling */
.puzzle-slot.missing {
  background: radial-gradient(circle, #1a2035 0%, #0c0f1c 100%);
  border: 2px dashed rgba(0, 240, 255, 0.45);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.puzzle-slot.missing::after {
  content: "DROP HERE";
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(0, 240, 255, 0.6);
  margin-top: 4px;
  pointer-events: none;
}

.puzzle-slot.missing .slot-icon {
  font-size: 1.2rem;
  color: rgba(0, 240, 255, 0.7);
  animation: float-cue 2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes float-cue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.puzzle-slot.missing.drag-hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.4);
  transform: scale(0.97);
}

.puzzle-slot.missing.error-shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: var(--accent-red) !important;
  background: rgba(239, 68, 68, 0.2) !important;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* Tile Piece Component */
.puzzle-piece {
  width: 100%;
  height: 100%;
  background-image: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS4Q_xXgKI3l3ufoXTZS8lDVlAbyNx9roKB4ispsgeCzt0aBYdneIc1G9eA&s=10');
  background-size: 300% 300%;
  background-repeat: no-repeat;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Locked pieces already on board */
.puzzle-slot.locked .puzzle-piece {
  filter: brightness(0.95);
  pointer-events: none;
}

/* Newly completed snap animation */
.puzzle-slot.just-placed {
  animation: snap-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes snap-pop {
  0% { transform: scale(1.15); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Victory shine sweep */
.puzzle-board.completed-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-25deg);
  animation: victory-sweep 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes victory-sweep {
  100% { left: 150%; }
}

/* Missing Pieces Tray / Inventory */
.tray-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(13, 16, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.tray-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tray-title {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-badge {
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pieces-tray {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 90px;
  width: 100%;
}

/* Draggable item card in tray */
.tray-piece {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  border: 2px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 240, 255, 0.2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.tray-piece:active {
  cursor: grabbing;
}

.tray-piece:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--accent-cyan);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.4);
}

.tray-piece.is-dragged {
  opacity: 0.25;
  transform: scale(0.92);
}

/* Floating clone following pointer smoothly */
.drag-floating-piece {
  position: fixed;
  top: 0;
  left: 0;
  width: 86px;
  height: 86px;
  border-radius: 12px;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 255, 0.7);
  pointer-events: none;
  z-index: 100000;
  overflow: hidden;
  will-change: transform;
  transform: translate(-50%, -50%) scale(1.08);
  user-select: none;
  -webkit-user-select: none;
  transition: none !important;
}

/* Flying piece animation on click / auto-place */
.puzzle-flyer {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  border-radius: 12px;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.9), 0 12px 28px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
}

/* Selected piece state */
.tray-piece.selected {
  border-color: #facc15;
  box-shadow: 0 0 25px rgba(250, 204, 21, 0.7);
  animation: pulse-selected 1.5s infinite;
}

@keyframes pulse-selected {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.09); }
}

.tray-empty-hint {
  font-size: 0.88rem;
  color: var(--accent-green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

/* Toast alert message */
.game-toast {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.game-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.game-toast.info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.game-toast.success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.game-toast.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   CLAIM REWARD BUTTON (Locked & Unlocked)
   ========================================================================== */
.reward-action-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.claim-reward-btn {
  width: 100%;
  max-width: 380px;
  padding: 16px 28px;
  border-radius: 14px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: not-allowed;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Locked State */
.claim-reward-btn.locked {
  background: #1e2235;
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

/* Unlocked State */
.claim-reward-btn.unlocked {
  cursor: pointer;
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 50%, #a855f7 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.4), 0 0 30px rgba(168, 85, 247, 0.3);
  animation: pulse-reward 2s infinite;
}

.claim-reward-btn.unlocked:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 240, 255, 0.6), 0 0 40px rgba(168, 85, 247, 0.5);
}

.claim-reward-btn.unlocked:active {
  transform: translateY(0) scale(0.99);
}

@keyframes pulse-reward {
  0%, 100% {
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.4), 0 0 20px rgba(168, 85, 247, 0.3);
  }
  50% {
    box-shadow: 0 12px 35px rgba(0, 240, 255, 0.65), 0 0 35px rgba(168, 85, 247, 0.55);
  }
}

.claim-reward-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 10px;
  text-align: center;
}

/* ==========================================================================
   POPUP MODAL (Username/Age -> 4-Step Progress -> Skippable Ad)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.2);
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  position: relative;
}

.modal-brand-tag {
  font-family: var(--font-logo);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--text-main);
  font-weight: 700;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
}

/* Modal Screens Switcher */
.modal-screen {
  display: none;
  flex-direction: column;
}

.modal-screen.active {
  display: flex;
  animation: fadeInScreen 0.3s ease;
}

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

/* SCREEN 1: User & Age Input Form */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.modal-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: #090b12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
}

.modal-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  background: #0d101a;
}

.modal-input:focus + .input-icon,
.modal-input:focus ~ .input-icon {
  color: var(--accent-cyan);
}

.avatar-preview-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.avatar-img-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e2438;
  border: 2px solid var(--accent-cyan);
  object-fit: cover;
}

.avatar-preview-text .user-name-preview {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.avatar-preview-text .user-status-text {
  font-size: 0.75rem;
  color: var(--accent-green);
}

.modal-error-alert {
  font-size: 0.85rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
  display: none;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #07080c;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.4);
}

/* SCREEN 2: 4-Step Progress */
.progress-screen-header {
  text-align: center;
  margin-bottom: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #090b14;
  border-radius: 4px;
  overflow: hidden;
  margin: 14px 0 24px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* 4 Progress lines */
.step-lines-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.step-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.step-line.pending {
  opacity: 0.4;
}

.step-line.active {
  opacity: 1;
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.step-line.completed {
  opacity: 1;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.step-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: #1a1e2e;
  color: var(--text-dim);
  flex-shrink: 0;
}

.step-line.active .step-icon-wrap {
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
}

.step-line.completed .step-icon-wrap {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
}

.step-text-wrap {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.step-line.completed .step-title {
  color: #a7f3d0;
}

.step-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Send Button */
.btn-send {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: none; /* Shown after step 4 completes */
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* SCREEN 3: Skippable 10-Second 250*300 Ad Screen */
.ad-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ad-info-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.ad-info-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Exactly 250x300 or 300x250 Ad Container */
.skippable-ad-container {
  width: 300px;
  height: 250px;
  background: #0a0c14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto 18px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.ad-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 8px;
}

.ad-placeholder-inner .ad-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 4px;
}

.ad-placeholder-inner .ad-text {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.ad-placeholder-inner i {
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.15);
  margin-bottom: 4px;
}

/* Skip Button */
.btn-skip-ad {
  width: 100%;
  max-width: 300px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: not-allowed;
  background: #2a2f45;
  color: #7b839b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-skip-ad.active {
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
  animation: pulse-skip 1.6s infinite;
}

.btn-skip-ad.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

@keyframes pulse-skip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  width: 100%;
  padding: 30px 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 8px;
}

.footer-copy {
  font-size: 0.75rem;
  color: #475569;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --board-size: 300px;
  }

  .main-wrapper {
    padding: 12px 10px 40px;
  }

  .puzzle-section {
    padding: 18px 12px;
    border-radius: 18px;
  }

  .tray-piece {
    width: 76px;
    height: 76px;
  }

  .modal-dialog {
    border-radius: 20px;
  }

  .modal-body {
    padding: 18px 16px;
  }

  .skippable-ad-container {
    width: 300px;
    max-width: 100%;
    height: 250px;
  }
}
