*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #ff1a1a;
  --yellow: #ffd500;
  --green: #00cc44;
  --blue: #1e90ff;
  --orange: #ff8800;
  --pink: #ff69b4;
  --white: #ffffff;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Special Elite', monospace;
}

.wall-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.wall-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
}

.wall-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: brightness(0.65) contrast(1.2) sepia(0.2);
}

.wall-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
}

.lights-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.light-bulb {
  position: absolute;
  width: 0px;
  height: 0px; 
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s ease-out, filter 0.15s;
  mix-blend-mode: hard-light;
}

.light-bulb.on {
  opacity: 1;
}

.light-bulb.red { box-shadow: 0 0 1vw 0.5vw rgba(255, 30, 30, 1), 0 0 3vw 1.5vw rgba(255, 0, 0, 0.6); }
.light-bulb.blue { box-shadow: 0 0 1vw 0.5vw rgba(100, 200, 255, 1), 0 0 3vw 1.5vw rgba(0, 150, 255, 0.6); }
.light-bulb.green { box-shadow: 0 0 1vw 0.5vw rgba(50, 255, 50, 1), 0 0 3vw 1.5vw rgba(0, 255, 0, 0.6); }
.light-bulb.yellow { box-shadow: 0 0 1vw 0.5vw rgba(255, 255, 100, 1), 0 0 3vw 1.5vw rgba(255, 255, 0, 0.6); }
.light-bulb.pink { box-shadow: 0 0 1vw 0.5vw rgba(255, 100, 255, 1), 0 0 3vw 1.5vw rgba(255, 50, 255, 0.6); }
.light-bulb.orange { box-shadow: 0 0 1vw 0.5vw rgba(255, 120, 30, 1), 0 0 3vw 1.5vw rgba(255, 100, 0, 0.6); }
.light-bulb.white { box-shadow: 0 0 1vw 0.5vw rgba(255, 255, 255, 1), 0 0 3vw 1.5vw rgba(255, 255, 255, 0.6); }

.bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9) 70%);
  pointer-events: none;
  z-index: 5;
}

.intro-screen {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 90%;
  max-width: 600px;
}

.intro-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.app-branding {
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.app-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 30, 30, 0.9);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin: 0;
  user-select: none;
  animation: demogorgon-flicker 4s infinite;
}

@keyframes demogorgon-flicker {
  0%   { opacity: 0.9; text-shadow: none; }
  2%   { opacity: 0.1; }
  4%   { opacity: 0.9; }
  8%   { opacity: 0.85; text-shadow: 0 0 4px rgba(255, 0, 0, 0.3); }
  9%   { opacity: 0.2; }
  11%  { opacity: 0.9; text-shadow: none; }
  30%  { opacity: 0.9; }
  32%  { opacity: 0.15; }
  33%  { opacity: 0.85; }
  35%  { opacity: 0.9; text-shadow: 0 0 6px rgba(255, 0, 0, 0.4); }
  36%  { opacity: 0.1; }
  37%  { opacity: 0.9; text-shadow: none; }
  60%  { opacity: 0.9; }
  61%  { opacity: 0.4; text-shadow: 0 0 2px rgba(255, 0, 0, 0.2); }
  62%  { opacity: 0.9; }
  100% { opacity: 0.9; text-shadow: none; }
}

@media (max-width: 600px) {
  .app-branding {
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
  }
  .app-logo {
    font-size: 0.85rem;
    letter-spacing: 4px;
  }
}

.intro-subtitle {
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  color: #ccc;
  margin: 0;
}

.begin-btn {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  font-family: 'Special Elite', monospace;
  font-size: 1.2rem;
  padding: 12px 30px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255,255,255,0.5);
  box-shadow: 0 0 10px rgba(255,255,255,0.2) inset;
  margin-top: 15px;
}

.begin-btn:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 15px rgba(255,255,255,0.5) inset, 0 0 20px rgba(255,30,30,0.5);
  border-color: #ff1a1a;
}

.chat-container {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 90%;
  max-width: 500px;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.chat-container.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

.chat-messages {
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 5px;
  padding: 10px;
}

.chat-messages::-webkit-scrollbar {
  width: 5px;
}
.chat-messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 50, 50, 0.5);
  border-radius: 5px;
}

.msg-bot {
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  color: #ff3a3a;
  text-shadow: 0 0 8px rgba(255,50,50,0.8);
  align-self: flex-start;
  background: rgba(10, 0, 0, 0.8);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 2px solid #ff1a1a;
  max-width: 90%;
  border-bottom-left-radius: 0;
}

.msg-user {
  font-family: 'Special Elite', monospace;
  font-size: 1rem;
  color: #aaccff;
  text-shadow: 0 0 5px rgba(100,200,255,0.6);
  align-self: flex-end;
  background: rgba(0, 5, 10, 0.8);
  padding: 8px 12px;
  border-radius: 8px;
  border-right: 2px solid #1e90ff;
  max-width: 80%;
  border-bottom-right-radius: 0;
}

.chat-prompt {
  font-family: 'Special Elite', monospace;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  letter-spacing: 1px;
  text-align: center;
  animation: pulse-opac 3s infinite;
}

@keyframes pulse-opac {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.4); }
}

.chat-input-wrapper {
  display: flex;
  width: 100%;
  position: relative;
}

.chat-input {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Special Elite', monospace;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(10, 10, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

.chat-input:focus {
  border-color: rgba(255, 50, 50, 0.6);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 0 20px rgba(255, 50, 50, 0.3);
}

.chat-send {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s, text-shadow 0.3s;
}

.chat-send:hover {
  color: rgba(255, 50, 50, 0.9);
  text-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
}

/* ===== FINAL REVEAL UI ===== */
.reveal-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 8vh;
  transition: opacity 1s ease, filter 1s ease;
}

.reveal-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: blur(6px) brightness(0.7);
  pointer-events: none;
}

.reveal-screen.hidden {
  opacity: 0;
  pointer-events: none;
  filter: blur(10px);
}

.reveal-card {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-areas: 
    "subtitle subtitle subtitle"
    "cover info actions";
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px 30px;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 30px;
  max-width: 850px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  text-align: left;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  animation: smoothReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1s;
  font-family: 'Inter', sans-serif;
  transition: opacity 1.2s, transform 1.2s, border-color 0.3s ease, background 0.3s ease;
}

.reveal-card-subtitle {
  grid-area: subtitle;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0;
  font-family: 'Inter', sans-serif;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 5px;
}

.reveal-left {
  grid-area: cover;
  flex-shrink: 0;
}

.reveal-text-group {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.reveal-actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.reveal-card:hover {
  background: rgba(15, 15, 15, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
}

@keyframes smoothReveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reveal-cover {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: block;
}

.reveal-title {
  font-size: 2.22rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Inter', sans-serif;
}

.reveal-artist {
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.reveal-vibe {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  margin: 4px 0 0 0;
  font-family: 'Inter', sans-serif;
}

.reveal-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1ED760; 
  color: #000000;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(29, 215, 96, 0.3);
  align-self: stretch;
  min-width: 0;
  transition: all 0.3s ease;
}

.reveal-btn:hover {
  background: #1fdf64;
  box-shadow: 0 10px 30px rgba(30, 215, 96, 0.4);
}

.reveal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  align-self: flex-start;
}

.reveal-btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 30px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.reveal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #1ED760;
}

.global-nametag {
  position: fixed;
  top: 40px;
  right: 40px;
  z-index: 1000;
  color: rgba(255, 30, 30, 0.9);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 5px 10px;
}

.global-nametag:hover {
  opacity: 1;
}

.discovery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 40px;
  animation: overlayFadeIn 0.4s ease forwards;
}

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

.discovery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.discovery-title {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: #ffffff;
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.close-btn:hover {
  opacity: 1;
}

.discovery-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding-right: 10px;
}

.discovery-grid::-webkit-scrollbar {
  width: 6px;
}
.discovery-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.discovery-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.discovery-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(29, 215, 96, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.discovery-cover {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.discovery-info {
  flex: 1;
  min-width: 0;
}

.discovery-song-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discovery-song-artist {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 2px 0 0 0;
}

.discovery-link {
  color: #1ED760;
  padding: 8px;
  transition: transform 0.2s;
}

.discovery-link:hover {
  transform: scale(1.2);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Tablets / Small Desktops */
@media (max-width: 900px) {
  .reveal-card {
    max-width: 600px;
    gap: 20px;
  }
  .reveal-cover {
    width: 150px;
    height: 150px;
  }
  .reveal-title {
    font-size: 1.8rem;
  }
}

/* Mobile Devices */
@media (max-width: 600px) {
  /* Intro Screen */
  .intro-title {
    font-size: 1.8rem;
  }
  .intro-subtitle {
    font-size: 0.95rem;
  }
  .begin-btn {
    font-size: 1.1rem;
    padding: 10px 24px;
  }

  /* Chat UI - Move upward for mobile */
  .chat-container {
    bottom: 12%; 
    width: 95%;
  }
  .chat-messages {
    max-height: 200px;
  }
  .msg-bot {
    font-size: 1rem;
    padding: 8px 12px;
  }
  .msg-user {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
  .chat-input {
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  /* Reveal Card - Stack Column - Compact Mobile */
  .reveal-card {
    display: grid;
    grid-template-areas: 
      "subtitle"
      "cover"
      "info"
      "actions";
    grid-template-columns: 1fr;
    text-align: center;
    padding: 15px;
    gap: 10px;
    max-width: 240px;
    bottom: 12vh;
  }
  .reveal-card-subtitle {
    grid-area: subtitle;
    font-size: 0.55rem;
    margin-bottom: 5px;
  }
  .reveal-left {
    grid-area: cover;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .reveal-cover {
    width: 90px;
    height: 90px;
    border-radius: 8px;
  }
  .reveal-text-group {
    grid-area: info;
    align-items: center;
    margin-bottom: 5px;
    gap: 0;
  }
  .reveal-title {
    font-size: 0.9rem;
    line-height: 1.2;
    max-width: 100%;
  }
  .reveal-artist {
    font-size: 0.75rem;
  }
  .reveal-vibe {
    font-size: 0.6rem;
    margin-top: 2px;
  }
  .reveal-actions {
    grid-area: actions;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    margin-top: 5px;
  }
  .reveal-btn {
    font-size: 0.75rem;
    padding: 8px 12px;
    justify-content: center;
  }
  .reveal-btn svg {
    width: 14px;
    height: 14px;
  }
  .reveal-btn-secondary {
    width: 100%;
    font-size: 0.7rem;
    padding: 6px 10px;
    justify-content: center;
  }

  /* Discovery / Gallery */
  .discovery-overlay {
    padding: 20px;
  }
  .discovery-title {
    font-size: 1.1rem;
  }
  .discovery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .discovery-item {
    padding: 10px;
  }
  .discovery-cover {
    width: 48px;
    height: 48px;
  }
  .discovery-song-title {
    font-size: 0.85rem;
  }

  /* Wall Image Adjustments */
  .wall-img {
    object-position: center;
  }

  /* Nametag - Bottom right and tiny for mobile */
  .global-nametag {
    top: auto;
    bottom: 5px;
    right: 5px;
    transform: none;
    font-size: 0.65rem;
    white-space: nowrap;
    z-index: 1000;
  }
}

/* Very Small Screens */
@media (max-width: 360px) {
  .reveal-card {
    padding: 16px;
  }
  .reveal-cover {
    width: 120px;
    height: 120px;
  }
  .reveal-title {
    font-size: 1.3rem;
  }
}

.hidden {
  display: none !important;
}
