:root {
    --bg: #000000;          /* pure black for spooky effect */
    --panel: #0a0a0a;       /* very dark panels */
    --text: #ffffff;
    --muted: #cccccc;
    --accent: #ff6b6b;      /* red accent for spooky vibes */
    --accent-2: #ff9f43;    /* orange accent */
    --accent-3: #ffd93d;    /* yellow accent */
    --outline: #333333;
    --success: #73ffa1;
  
    --radius: 18px;
    --shadow: 0 20px 40px rgba(0,0,0,.8), 0 8px 16px rgba(0,0,0,.6);
    --glow: 0 0 30px rgba(255, 107, 107, 0.4);
  }
  
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
  
  body.bedroom-page {
    font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: #000000;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  
  /* ===== NAV ===== */
  .nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: grid; grid-template-columns: auto 1fr auto auto auto;
    align-items: center; gap: 16px;
    padding: 14px 24px;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.95);
    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: 2px solid var(--accent);
    background: linear-gradient(180deg, #ff6b35, #ff8e53);
    color: #000; padding: 12px 18px; border-radius: 999px; font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
    text-shadow: none;
  }
  
  .cta:hover {
    background: linear-gradient(180deg, #ff8e53, #ffb366);
    border-color: #ffb366;
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    transform: translateY(-2px);
  }
  
  /* ===== BEDROOM MAIN ===== */
  .bedroom-main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 0;
    position: relative;
  }
  
  .bedroom-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    overflow: hidden;
    background-image: url('./assets/bedroompngnew.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .bedroom-image {
    display: none;
  }
  
  /* ===== HIDDEN FIREPLACE SECRET ===== */
  .fireplace-secret {
    position: absolute;
    bottom: 15%;
    left: 34%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
  }
  
  .secret-firefly {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #ffb366 0 50%, rgba(255,142,83,.6) 80%, transparent 100%);
    filter: blur(0.5px);
    box-shadow: 
      0 0 20px rgba(255, 179, 102, 0.9),
      0 0 40px rgba(255, 179, 102, 0.6),
      0 0 60px rgba(255, 179, 102, 0.3);
    animation: firefly-secret-glow 2s ease-in-out infinite alternate;
    transition: all 0.3s ease;
  }
  
  .fireplace-secret:hover .secret-firefly {
    transform: scale(1.2);
    box-shadow: 
      0 0 30px rgba(255, 179, 102, 1),
      0 0 60px rgba(255, 179, 102, 0.8),
      0 0 90px rgba(255, 179, 102, 0.5);
    animation-duration: 1s;
  }
  
  .fireplace-secret:active .secret-firefly {
    transform: scale(1.3);
    box-shadow: 
      0 0 40px rgba(255, 179, 102, 1),
      0 0 80px rgba(255, 179, 102, 0.9),
      0 0 120px rgba(255, 179, 102, 0.6);
  }
  
  @keyframes firefly-secret-glow {
    0% {
      filter: brightness(0.8);
      box-shadow: 
        0 0 15px rgba(255, 179, 102, 0.7),
        0 0 30px rgba(255, 179, 102, 0.4),
        0 0 45px rgba(255, 179, 102, 0.2);
    }
    100% {
      filter: brightness(1.4);
      box-shadow: 
        0 0 25px rgba(255, 179, 102, 1),
        0 0 50px rgba(255, 179, 102, 0.8),
        0 0 75px rgba(255, 179, 102, 0.5);
    }
  }
  
  .bedroom-overlay {
    position: absolute;
    top: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.95);
    padding: 20px 24px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    max-width: 400px;
    box-shadow: 
      0 0 30px rgba(255, 107, 107, 0.8),
      0 0 60px rgba(255, 107, 107, 0.5),
      0 0 100px rgba(255, 107, 107, 0.3),
      inset 0 0 20px rgba(255, 107, 107, 0.2);
    filter: brightness(1.3);
    animation: glow-pulse 3s ease-in-out infinite alternate;
  }
  
  @keyframes glow-pulse {
    0% {
      box-shadow: 
        0 0 30px rgba(255, 107, 107, 0.8),
        0 0 60px rgba(255, 107, 107, 0.5),
        0 0 100px rgba(255, 107, 107, 0.3),
        inset 0 0 20px rgba(255, 107, 107, 0.2);
    }
    100% {
      box-shadow: 
        0 0 40px rgba(255, 107, 107, 1),
        0 0 80px rgba(255, 107, 107, 0.7),
        0 0 120px rgba(255, 107, 107, 0.5),
        inset 0 0 30px rgba(255, 107, 107, 0.4);
    }
  }
  
  .bedroom-overlay h1 {
    font-family: "Fredoka", system-ui, sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    margin: 0 0 12px;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
  }
  
  .bedroom-overlay p {
    margin: 8px 0;
    color: var(--muted);
    font-size: 1.1rem;
  }
  
  .instruction {
    color: var(--accent-3) !important;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.3);
  }

  /* ===== 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: 99999;
    font-family: "Fredoka", system-ui, sans-serif;
    pointer-events: auto !important;
  }

  .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 !important;
    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;
    pointer-events: auto !important;
    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);
    }
  }
  
  /* ===== LIGHTS ON MODE ===== */
  body.lights-on .bedroom-container {
    filter: brightness(1);
  }
  
  body.lights-on .bedroom-overlay {
    background: rgba(0, 0, 0, 0.7);
    filter: brightness(1);
  }
  
  /* ===== FLASHLIGHT MODE - KEEP OVERLAY NORMAL ===== */
  body.flashlight-mode .bedroom-overlay {
    filter: brightness(1) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: #fff !important;
    box-shadow: 
      0 4px 20px rgba(0, 0, 0, 0.5),
      0 2px 10px rgba(0, 0, 0, 0.3) !important;
  }
  
  /* ===== FLASHLIGHT EFFECTS ===== */
  .flashlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
      circle 138px at 50% 50%,
      transparent 0%,
      transparent 50%,
      rgba(0, 0, 0, 0.4) 75%,
      rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
    z-index: 5;
  }
  
  .flashlight-cursor {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    animation: flashlight-pulse 2s ease-in-out infinite alternate;
    display: block;
    transition: none;
  }
  
  @keyframes flashlight-pulse {
    0% {
      filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) brightness(1);
    }
    100% {
      filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1)) brightness(1.2);
    }
  }
  
  /* Hide cursor in flashlight mode */
  body.bedroom-page {
    cursor: none !important;
  }
  
  /* Allow cursor on words collection tab */
  .words-collection-tab {
    cursor: auto !important;
  }
  
  .words-collection-tab * {
    cursor: pointer !important;
  }
  
  /* Keep bedroom overlay text always visible */
  .bedroom-overlay {
    filter: brightness(1) !important;
    z-index: 1001 !important;
  }
  
  /* ===== HIDDEN WORDS ===== */
  .hidden-word {
    position: fixed;
    color: rgba(255, 255, 255, 0.02);
    font-size: 4px;
    opacity: 0.05;
    pointer-events: auto !important;
    z-index: 99999 !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: all 0.3s ease;
    cursor: pointer !important;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .hidden-word.flashlight-near {
    color: rgba(255, 255, 255, 0.25) !important;
    font-size: 7px !important;
    opacity: 0.4 !important;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
  }

  
  .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: none !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;
  }
  
  
  /* ===== RESPONSIVE ===== */
  @media (max-width: 768px) {
    .bedroom-main {
      margin-top: 70px;
      min-height: calc(100vh - 70px);
    }
    
    .bedroom-container {
      height: calc(100vh - 70px);
    }
    
    .bedroom-overlay {
      top: 20px;
      left: 20px;
      right: 20px;
      max-width: none;
      padding: 16px 20px;
    }
    
    .bedroom-overlay h1 {
      font-size: 2rem;
    }
    
    .nav {
      padding: 12px 16px;
    }
    
    .links {
      gap: 12px;
    }
  }
