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

body {
  font-family: 'Quicksand', sans-serif;
  background: linear-gradient(180deg, #0a1628 0%, #0d2137 50%, #0a1628 100%);
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

#click-to-start {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0d0d1a 50%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  cursor: pointer;
}

#tap-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.8rem;
  color: #ffd700;
  letter-spacing: 0.3rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

#intro-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0d0d1a 50%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

#intro-sparkle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#intro-text {
  position: relative;
  z-index: 10;
  text-align: center;
  animation: introFadeIn 2s ease-out forwards;
}

#lionshare-text {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.4rem;
  text-shadow: 
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 40px rgba(255, 215, 0, 0.6),
    0 0 60px rgba(255, 215, 0, 0.4);
  margin-bottom: 20px;
  animation: textGlow 2s ease-in-out infinite;
}

#presents-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #ffd700;
  letter-spacing: 0.8rem;
  text-transform: uppercase;
  opacity: 0;
  animation: presentsFadeIn 1s ease-out 1s forwards;
}

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

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

@keyframes textGlow {
  0%, 100% {
    text-shadow: 
      0 0 20px rgba(255, 255, 255, 0.8),
      0 0 40px rgba(255, 215, 0, 0.6),
      0 0 60px rgba(255, 215, 0, 0.4);
  }
  50% {
    text-shadow: 
      0 0 30px rgba(255, 255, 255, 1),
      0 0 60px rgba(255, 215, 0, 0.8),
      0 0 80px rgba(255, 215, 0, 0.6);
  }
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.magical-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, #0d2845 0%, #071422 40%, #030a10 100%);
  z-index: 0;
}

#sparkle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#logo-reveal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
}

#company-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.4rem;
  color: #ffffff;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 1),
    0 0 20px rgba(255, 255, 255, 0.9),
    0 0 40px rgba(255, 255, 255, 0.8),
    0 0 80px rgba(255, 255, 255, 0.5),
    0 0 120px rgba(200, 220, 255, 0.4);
  animation: whiteGlowPulse 2s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.9);
}

@keyframes whiteGlowPulse {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(255, 255, 255, 1),
      0 0 20px rgba(255, 255, 255, 0.9),
      0 0 40px rgba(255, 255, 255, 0.8),
      0 0 80px rgba(255, 255, 255, 0.5);
  }
  50% {
    text-shadow: 
      0 0 15px rgba(255, 255, 255, 1),
      0 0 30px rgba(255, 255, 255, 1),
      0 0 60px rgba(255, 255, 255, 0.9),
      0 0 100px rgba(200, 220, 255, 0.6);
  }
}

#presents-text {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.4rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 15px;
  letter-spacing: 0.3rem;
  opacity: 0;
}

#hero-container {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeInScale 1.5s ease-out forwards;
}

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

#hero-image {
  max-width: 700px;
  width: 80vw;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 0 30px rgba(255, 200, 100, 0.4)) 
          drop-shadow(0 0 60px rgba(255, 180, 80, 0.2));
  animation: heroGlow 3s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% {
    filter: drop-shadow(0 0 30px rgba(255, 200, 100, 0.4)) 
            drop-shadow(0 0 60px rgba(255, 180, 80, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 50px rgba(255, 220, 120, 0.5)) 
            drop-shadow(0 0 80px rgba(255, 200, 100, 0.3));
  }
}

#enter-btn {
  display: block;
  margin: 30px auto 0 auto;
  z-index: 20;
  padding: 18px 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1rem;
  color: #1a1a2e;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ffd700 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 
    0 0 20px rgba(255, 215, 0, 0.5),
    0 0 40px rgba(255, 179, 71, 0.3),
    0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
  animation: fadeInUp 1s ease-out 0.5s forwards;
  opacity: 0;
}

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

#enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 
    0 0 30px rgba(255, 215, 0, 0.7),
    0 0 60px rgba(255, 179, 71, 0.4),
    0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-sparkle {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
  border-radius: 50%;
  transform: translateY(-50%);
  animation: sparkleFloat 2s ease-in-out infinite;
}

.btn-sparkle.left { left: 15px; }
.btn-sparkle.right { right: 15px; animation-delay: 1s; }

@keyframes sparkleFloat {
  0%, 100% { opacity: 0.5; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

#main-sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

#main-app {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 25px;
  backdrop-filter: blur(10px);
}

.header-mascot {
  width: 120px;
  height: auto;
  border-radius: 15px;
  filter: drop-shadow(0 0 15px rgba(255, 200, 100, 0.3));
}

.header-text {
  flex: 1;
}

.app-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.tagline {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
}

#curator-section {
  margin-bottom: 35px;
}

#curator-speech-bubble {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 179, 71, 0.1) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 25px;
  border-radius: 20px;
  position: relative;
}

#curator-message {
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.95);
}

#voice-section {
  margin-bottom: 50px;
  text-align: center;
}

#search-container {
  display: flex;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto 20px;
}

#search-input {
  flex: 1;
  padding: 18px 28px;
  font-size: 1.1rem;
  font-family: 'Quicksand', sans-serif;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 35px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#search-input:focus {
  outline: none;
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.2);
}

#voice-btn {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
  color: #1a1a2e;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

#voice-btn svg {
  width: 28px;
  height: 28px;
}

#voice-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.6);
}

#voice-btn.pulse {
  animation: goldenPulse 2s infinite;
}

#voice-btn.recording {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  animation: recording 0.5s infinite alternate;
}

@keyframes goldenPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.5); }
  70% { box-shadow: 0 0 0 20px rgba(255, 215, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

@keyframes recording {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

#voice-status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

#story-flow-section h2 {
  text-align: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

#story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.story-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 179, 71, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s;
}

.story-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.1);
}

.story-card h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: #ffd700;
}

.story-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1.6;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag {
  padding: 6px 14px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #ffd700;
}

#story-player {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0d0d1a 50%, #000000 100%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#story-sparkle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#hero-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 20px;
  max-width: 900px;
  width: 100%;
}

#hero-image-container {
  width: 100%;
  max-width: 800px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.2);
  border: 3px solid rgba(255, 215, 0, 0.3);
  margin-bottom: 30px;
  animation: heroGlow 3s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.2); }
  100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 215, 0, 0.35); }
}

#hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

#hero-narration {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(26, 26, 62, 0.7) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 15px;
  padding: 25px 35px;
  max-width: 700px;
  text-align: center;
  backdrop-filter: blur(10px);
}

#hero-narration #scene-narration {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.4rem;
  line-height: 1.8;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#scene-overlay-hidden {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  padding: 25px 45px;
  border-radius: 20px;
  max-width: 85%;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

#scene-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  color: #ffd700;
  margin-bottom: 12px;
}

#scene-narration {
  font-size: 1.25rem;
  color: white;
  line-height: 1.7;
}

#player-controls {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.05);
}

#player-controls button {
  padding: 14px 35px;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-family: 'Quicksand', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

#prev-scene-btn, #next-scene-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#play-pause-btn {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #1a1a2e;
}

#close-player-btn {
  background: rgba(255, 100, 100, 0.8);
  color: white;
}

#player-controls button:hover:not(:disabled) {
  transform: scale(1.05);
}

#player-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 40, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 950;
}

.loading-spinner {
  width: 70px;
  height: 70px;
  border: 4px solid rgba(255, 215, 0, 0.2);
  border-top: 4px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#loading-message {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }
  
  .header-mascot {
    width: 100px;
  }
  
  .app-title {
    font-size: 1.8rem;
  }
  
  #company-logo {
    font-size: 1.8rem;
    letter-spacing: 0.2rem;
  }
  
  #hero-image {
    max-width: 95vw;
    max-height: 70vh;
  }
  
  #enter-btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    bottom: 5%;
  }
  
  #search-container {
    flex-direction: column;
    align-items: center;
  }
  
  #search-input {
    width: 100%;
  }
  
  #story-grid {
    grid-template-columns: 1fr;
  }
}
