:root {
    --bg: #0f0a1a;          /* deep night */
    --panel: #17132a;       /* card surface */
    --panel-2: #1f1a39;
    --text: #f6f3ff;
    --muted: #bfb6e9;
    --accent: #b08cff;      /* lavender pop */
    --accent-2: #ff9bd5;    /* candy pink */
    --accent-3: #ffd36e;    /* warm glow */
    --outline: #2a2350;
    --success: #73ffa1;
  
    --radius: 18px;
    --shadow: 0 20px 40px rgba(0,0,0,.6), 0 8px 16px rgba(0,0,0,.4);
    --glow: 0 0 30px rgba(176, 140, 255, 0.3);
  }
  
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: #000000;
    min-height: 100vh;
  }
  
  /* ===== NAV ===== */
  .nav {
    position: sticky; top: 0; z-index: 50;
    display: grid; grid-template-columns: auto 1fr auto auto auto;
    align-items: center; gap: 16px;
    padding: 14px 24px;
    backdrop-filter: blur(20px);
    background: linear-gradient(180deg, rgba(15,10,26,.95), rgba(15,10,26,.75));
    border-bottom: 2px solid var(--outline);
    box-shadow: var(--shadow);
  }
  
  /* ===== COUNTDOWN TIMER ===== */
  .countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a1432 0%, #2a2350 50%, #1a1432 100%);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 10px rgba(176, 140, 255, 0.3);
    transition: all 0.3s ease;
    width: fit-content;
    flex-shrink: 0;
  }
  
  .countdown-timer:hover {
    box-shadow: 
      0 6px 16px rgba(0, 0, 0, 0.5),
      0 0 12px rgba(176, 140, 255, 0.4);
    transform: translateY(-1px);
  }
  
  .timer-icon {
    font-size: 16px;
    animation: timer-pulse 2s ease-in-out infinite alternate;
  }
  
  .timer-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .timer-label {
    font-size: 10px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
  }
  
  .timer-display {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    line-height: 1;
  }
  
  @keyframes timer-pulse {
    0% {
      transform: scale(1);
      filter: brightness(1);
    }
    100% {
      transform: scale(1.1);
      filter: brightness(1.2);
    }
  }
  
  .logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
  .logo-emoji { font-size: 22px; }
  .logo-text {
    font-family: "Fredoka", system-ui, sans-serif;
    font-weight: 800; letter-spacing: .5px; color: var(--text);
    font-size: 20px;
  }
  .logo-text .dot { color: var(--accent); }
  
  .links { display: flex; gap: 18px; }
  .links a { color: var(--muted); text-decoration: none; font-weight: 700; }
  .links a:hover { color: var(--text); }
  
  .cta {
    border: 1px solid var(--outline);
    background: linear-gradient(180deg, #231a40, #17122d);
    color: var(--text); padding: 10px 14px; border-radius: 999px; font-weight: 700;
  }
  
  /* ===== HERO ===== */
  .container { width: min(1100px, 92%); margin: 0 auto; }
  .hero {
    display: grid; gap: 28px; grid-template-columns: 1.1fr .9fr;
    align-items: center; padding: 56px 0 22px;
  }
  .hero-copy h1 {
    font-family: "Fredoka"; font-weight: 800; font-size: clamp(32px, 6vw, 56px);
    line-height: 1.04; margin: 0 0 8px;
  }
  .grad {
    background: linear-gradient(90deg, #ff6b35, #ff8e53, #ffb366, #ff6b35);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: halloween-glow 3s ease-in-out infinite alternate;
  }
  @keyframes halloween-glow {
    0% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 107, 53, 0.5)); }
    100% { filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 142, 83, 0.8)) drop-shadow(0 0 25px rgba(255, 107, 53, 0.4)); }
  }
  .lead { color: var(--muted); font-size: 1.15rem; max-width: 48ch; }
  .hero-actions { display:flex; gap:12px; margin: 18px 0; }

  /* ===== CONTRACT ADDRESS SECTION ===== */
  .contract-section {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    transition: all 0.3s ease;
  }

  .contract-section:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
  }

  .contract-label {
    font-weight: 600;
    color: #ffb366;
    font-size: 1rem;
    min-width: 30px;
  }

  .contract-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    flex: 1;
    word-break: break-all;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .copy-btn {
    background: linear-gradient(90deg, #ff6b35, #ff8e53, #ffb366);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 40px;
  }

  .copy-btn:hover {
    background: linear-gradient(90deg, #ff8e53, #ffb366, #ff6b35);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
  }

  .copy-btn:active {
    transform: scale(0.95);
  }

  .copy-icon {
    font-size: 1.2rem;
    filter: brightness(1.2);
  }

  .copy-btn.copied {
    background: linear-gradient(90deg, #4CAF50, #66BB6A, #81C784);
  }

  /* ===== COPY POPUP ===== */
  .copy-popup {
    position: fixed;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 
      0 4px 15px rgba(255, 0, 0, 0.4),
      0 0 20px rgba(255, 0, 0, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid #ff4444;
    z-index: 10000;
    transform: translateX(-50%) translateY(20px) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
  }

  .copy-popup.show {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }

  .copy-popup.hide {
    transform: translateX(-50%) translateY(-20px) scale(0.8);
    opacity: 0;
  }

  .popup-bat {
    font-size: 1.2rem;
    margin-right: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
  }

  .copy-btn.copied .copy-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  }
  .badges { display:flex; gap:10px; list-style:none; padding:0; margin:12px 0 0; flex-wrap: wrap; }
  .badges li {
    border: 1px solid var(--outline); padding: 6px 10px; border-radius: 999px;
    background: #1a1433; color: #d8d1ff; font-weight: 700; font-size: .9rem;
  }
  
  .hero-art { position: relative; }
  .pip-hero {
    width: 100%; max-width: 460px; aspect-ratio: 1/1; object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--outline);
    background: radial-gradient(60% 60% at 50% 40%, #2a234f 0%, #18122e 60%);
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  .floating { position:absolute; width:12px; height:12px; border-radius:50%; filter: blur(0.5px); }
  .firefly { background: radial-gradient(circle, #fff 0 30%, rgba(255,255,255,.2) 60%, transparent 100%); }
  .f1 { right:12%; top:16%; animation: float 6s ease-in-out infinite, sparkle 2s ease-in-out infinite; }
  .f2 { right:2%; bottom:18%; animation: float 7.5s ease-in-out infinite, sparkle 2.3s ease-in-out infinite; }
  .f3 { left:6%; bottom:6%; animation: float 5.8s ease-in-out infinite, sparkle 1.8s ease-in-out infinite; }
  
  @keyframes float { 
    0%,100%{ transform: translateY(0) scale(1); opacity: 0.8; } 
    25%{ transform: translateY(-8px) scale(1.1); opacity: 1; }
    50%{ transform: translateY(-15px) scale(1); opacity: 0.9; }
    75%{ transform: translateY(-8px) scale(0.9); opacity: 1; }
  }
  @keyframes sparkle {
    0%, 100% { box-shadow: 0 0 18px 6px rgba(255,211,110,.65); }
    50% { box-shadow: 0 0 25px 10px rgba(255,155,213,.8), 0 0 35px 15px rgba(255,211,110,.4); }
  }
  
  /* ===== GLOBAL FIREFLIES ===== */
  .global-fireflies {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
  }
  
  .global-fireflies .firefly {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffb366 0 50%, rgba(255,142,83,.6) 80%, transparent 100%);
    filter: blur(0.5px);
    animation: fly-around 15s linear infinite, sparkle-global 3s ease-in-out infinite;
  }
  
  .global-fireflies .fly1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s, 0s;
    animation-duration: 20s, 2.5s;
  }
  
  .global-fireflies .fly2 {
    top: 60%;
    left: 80%;
    animation-delay: -5s, 1s;
    animation-duration: 18s, 3s;
  }
  
  .global-fireflies .fly3 {
    top: 80%;
    left: 30%;
    animation-delay: -10s, 2s;
    animation-duration: 22s, 2.8s;
  }
  
  .global-fireflies .fly4 {
    top: 40%;
    left: 70%;
    animation-delay: -3s, 0.5s;
    animation-duration: 16s, 3.2s;
  }
  
  .global-fireflies .fly5 {
    top: 10%;
    left: 50%;
    animation-delay: -8s, 1.5s;
    animation-duration: 25s, 2.7s;
  }
  
  .global-fireflies .fly6 {
    top: 70%;
    left: 20%;
    animation-delay: -12s, 2.5s;
    animation-duration: 19s, 3.1s;
  }
  
  @keyframes fly-around {
    0% { transform: translate(0, 0); }
    25% { transform: translate(50vw, -30vh); }
    50% { transform: translate(80vw, 20vh); }
    75% { transform: translate(30vw, 60vh); }
    100% { transform: translate(0, 0); }
  }
  
  @keyframes sparkle-global {
    0%, 100% { 
      box-shadow: 0 0 15px 6px rgba(255,179,102,.8);
      opacity: 0.9;
      transform: scale(1);
    }
    50% { 
      box-shadow: 0 0 25px 10px rgba(255,142,83,1), 0 0 35px 15px rgba(255,179,102,.7);
      opacity: 1;
      transform: scale(1.2);
    }
  }
  
  /* ===== SECTIONS, CARDS ===== */
  .section { padding: 72px 0 24px; }
  .section-head h2 {
    font-family: "Fredoka"; font-weight: 800; letter-spacing: .3px;
    font-size: clamp(26px, 4.5vw, 36px); margin: 0 0 6px;
  }
  .muted { color: var(--muted); }
  
  .grid.cards {
    display:grid; gap:16px; grid-template-columns: repeat(3, 1fr);
  }
  .card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--outline);
    border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow), var(--glow);
    border-color: var(--accent);
  }
  .card h3 { margin: 0 0 6px; font-family: "Fredoka"; }
  .card p { margin: 0 0 12px; color: #d9d2ff; }
  .card .more { color: var(--accent-3); text-decoration: none; font-weight: 800; }
  .card.small { padding: 16px; }
  .btn.mini { padding: 8px 12px; }
  
  .about { display: grid; gap: 20px; grid-template-columns: .8fr 1.2fr; align-items: center; }
  .about-art img {
    width: 100%; border-radius: var(--radius); border: 1px solid var(--outline); box-shadow: var(--shadow);
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  .facts { list-style: none; padding: 0; margin: 0 0 18px; }
  .facts li { margin: 6px 0; }
  
  /* ===== BEDROOM SECTION ===== */
  .bedroom-scene {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--outline);
    background: #000;
  }
  
  .bedroom-image {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
  }
  
  .bedroom-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--outline);
  }
  
  .bedroom-warning {
    color: var(--accent-3);
    font-weight: 700;
    margin: 0;
    font-size: 0.9rem;
  }
  
  
  /* ===== BUTTONS ===== */
  .btn {
    display:inline-flex; align-items:center; justify-content:center; gap:10px;
    font-weight: 800; text-decoration:none; border-radius: 12px; padding: 12px 16px; border: 0;
  }
  .primary {
    background: linear-gradient(90deg, #ff6b35, #ff8e53, #ffb366, #ff6b35);
    color: #1a102d;
    transition: all 0.3s ease;
  }
  .primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow), 0 0 30px rgba(255, 107, 53, 0.4);
    background: linear-gradient(90deg, #ff8e53, #ffb366, #ff6b35, #ff8e53);
  }
  .ghost { 
    background: transparent; color: var(--text); border: 1.5px solid var(--outline);
    transition: all 0.3s ease;
  }
  .ghost:hover {
    background: var(--accent);
    color: #1a102d;
    border-color: var(--accent);
    transform: translateY(-2px);
  }
  
  /* ===== FOOTER ===== */
  .footer { margin-top: 60px; padding: 26px 0 36px; border-top: 1px solid var(--outline); background: #0c0814; }
  .foot-grid { display:grid; gap: 12px; grid-template-columns: 1.4fr 1fr; align-items: start; }
  .foot-brand { text-align: center; grid-column: 1 / -1; }
  .foot-links { display:flex; gap:12px; flex-wrap: wrap; }
  .tiny { color: #a99fda; text-align: center; margin: 16px 0 0; }
  
  /* ===== REVEAL ANIM ===== */
  .reveal { opacity: 0; transform: translateY(10px); }
  .reveal.revealed { opacity: 1; transform: translateY(0); transition: 600ms cubic-bezier(.2,.7,.2,1); }
  
  /* ===== RESPONSIVE ===== */
  @media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; }
    .grid.cards { grid-template-columns: 1fr 1fr; }
    .about { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .grid.cards { grid-template-columns: 1fr; }
  }
  
  /* ===== Night Mode & Flashlight Effect ===== */
  body.night-mode {
    background: #000 !important;
    color: #fff !important;
  }
  
  body.night-mode .nav {
    background: rgba(0, 0, 0, 0.9) !important;
    border-bottom-color: #333;
  }
  
  body.night-mode .card,
  body.night-mode .game-wrap,
  body.night-mode .footer {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: #333 !important;
    filter: brightness(0.8);
  }
  
  body.night-mode .hero-copy,
  body.night-mode .section-head,
  body.night-mode .about-copy {
    filter: brightness(0.8);
  }
  
  body.night-mode .pip-hero {
    filter: brightness(0.6);
  }
  
  body.night-mode .floating.firefly {
    opacity: 0.1;
  }
  
  /* Make all text elements dim in night mode */
  body.night-mode h1,
  body.night-mode h2,
  body.night-mode h3,
  body.night-mode p,
  body.night-mode li,
  body.night-mode a,
  body.night-mode .btn,
  body.night-mode .badges li {
    filter: brightness(0.8);
  }
  
  /* Bedroom section night mode */
  body.night-mode .bedroom-scene {
    filter: brightness(0.3);
  }
  
  body.night-mode .bedroom-overlay {
    filter: brightness(0.8);
  }
  
  /* Flashlight cursor */
  body.night-mode {
    cursor: none !important;
  }
  
  body.night-mode::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
      radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        transparent 0px,
        transparent 80px,
        rgba(0, 0, 0, 0.7) 120px,
        rgba(0, 0, 0, 0.95) 200px,
        rgba(0, 0, 0, 0.95) 100%
      );
    pointer-events: none;
    z-index: 9998;
  }
  
  /* Custom flashlight cursor */
  body.night-mode * {
    cursor: none !important;
  }
  
  /* Flashlight cursor animation */
  @keyframes flashlight-pulse {
    0% { 
      filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 25px rgba(255, 255, 255, 0.4));
      transform: translate(-12px, -12px) scale(1);
    }
    100% { 
      filter: drop-shadow(0 0 20px rgba(255, 255, 255, 1)) drop-shadow(0 0 35px rgba(255, 255, 255, 0.6));
      transform: translate(-12px, -12px) scale(1.05);
    }
  }

  /* ===== HIDDEN WORDS TREASURE HUNT ===== */
  .hidden-word {
    position: absolute;
    color: rgba(255, 255, 255, 0.01);
    font-size: 3px;
    opacity: 0.03;
    pointer-events: auto !important;
    z-index: 99999 !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: none;
    cursor: pointer !important;
    transform: translate(-50%, -50%);
    white-space: nowrap;
  }

  /* Specific positioning for each word to prevent overlap */
  .hidden-word[data-word="MOUSE"] {
    top: 20px;
    left: 80%;
  }
  
  .hidden-word[data-word="SLOW"] {
    top: 60%;
    left: 10%;
  }
  
  .hidden-word[data-word="QUICK"] {
    top: 80%;
    left: 20%;
  }
  
  .hidden-word[data-word="PROUD"] {
    top: 30%;
    right: 10%;
  }
  
  .hidden-word[data-word="ALL"] {
    top: 70%;
    right: 20%;
  }


  .hidden-word:hover {
    color: rgba(176, 140, 255, 0.9) !important;
    font-size: 12px !important;
    opacity: 0.9 !important;
    text-shadow: 0 0 15px rgba(176, 140, 255, 1) !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(176, 140, 255, 0.15) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(176, 140, 255, 0.4) !important;
    box-shadow: 0 0 10px rgba(176, 140, 255, 0.5) !important;
  }


  /* ===== WORD ITEM STYLING ===== */
  .word-item.found {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }
  
  .word-item.not-found {
    color: #ffffff !important;
    opacity: 0.8;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
  }
  
  .word-item.found .word-order {
    color: #ffffff !important;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  }
  
  .word-item.not-found .word-order {
    color: #ffffff !important;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }

  /* ===== FLOATING WORDS COLLECTION TAB ===== */
  .words-collection-tab {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    font-family: "Fredoka", system-ui, sans-serif;
  }

  .tab-button {
    background: linear-gradient(135deg, #1a1432 0%, #2a2350 50%, #1a1432 100%);
    border: 2px solid var(--accent);
    border-radius: 0 15px 15px 0;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
      0 10px 20px rgba(0, 0, 0, 0.6),
      0 0 15px rgba(176, 140, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    position: relative;
  }

  .tab-button:hover {
    background: linear-gradient(135deg, #2a2350 0%, #1a1432 50%, #2a2350 100%);
    box-shadow: 
      0 15px 30px rgba(0, 0, 0, 0.8),
      0 0 25px rgba(176, 140, 255, 0.5);
    transform: translateX(5px);
  }

  .tab-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 8px rgba(176, 140, 255, 0.6));
  }

  .tab-text {
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
  }

  .tab-count {
    background: var(--accent);
    color: #000;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 50%;
    min-width: 20px;
    text-align: center;
    animation: count-pulse 2s ease-in-out infinite;
  }

  .tab-content {
    position: absolute;
    left: 100%;
    top: -2px;
    background: linear-gradient(135deg, #1a1432 0%, #2a2350 50%, #1a1432 100%);
    border: 2px solid var(--accent);
    border-left: none;
    border-radius: 0 15px 15px 0;
    padding: 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 
      0 20px 40px rgba(0, 0, 0, 0.8),
      0 0 30px rgba(176, 140, 255, 0.3);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .words-collection-tab.open .tab-content {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--outline);
  }

  .tab-header h3 {
    color: var(--text);
    font-weight: 700;
    font-size: 20px;
    margin: 0;
  }

  .tab-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
  }

  .tab-close:hover {
    color: var(--text);
    transform: scale(1.2);
  }

  .collection-counter {
    text-align: center;
    margin-bottom: 15px;
  }

  .found-count {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    font-family: "Fredoka", system-ui, sans-serif;
    text-shadow: 0 0 15px rgba(176, 140, 255, 0.6);
  }

  .total-count {
    font-size: 16px;
    color: var(--muted);
    font-weight: 600;
  }

  .collected-words {
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
  }

  .collected-words .no-words {
    text-align: center;
    color: var(--muted);
    font-style: italic;
    margin: 15px 0;
    font-size: 14px;
  }

  .word-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(176, 140, 255, 0.2);
    animation: word-appear 0.5s ease-out;
  }

  .word-item .word-order {
    background: var(--accent);
    color: #000;
    font-weight: 800;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
    font-family: "Fredoka", system-ui, sans-serif;
  }

  .word-item .word-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(176, 140, 255, 0.6));
  }

  .word-item .word-text {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
  }

  @keyframes count-pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 0 5px rgba(176, 140, 255, 0.4);
    }
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 10px rgba(176, 140, 255, 0.8);
    }
  }

  @keyframes word-appear {
    from {
      opacity: 0;
      transform: translateX(-15px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @media (max-width: 768px) {
    .words-collection-tab {
      left: 10px;
    }

    .tab-button {
      padding: 12px 16px;
      min-width: 100px;
    }

    .tab-content {
      min-width: 280px;
      max-width: 320px;
      padding: 15px;
    }

    .found-count {
      font-size: 24px;
    }

    .collected-words {
      max-height: 200px;
    }
  }

  