@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;800&display=swap');

:root {
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.3);
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --accent-color: #ff9800;
  --font-main: 'Nunito', sans-serif;
}

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

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-main);
  background-color: #121212;
  color: var(--text-primary);
  overflow: hidden; /* Prevent body scroll, everything is in the app container */
}

/* Dynamic Background */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.4);
  transform: scale(1.1); /* Prevent blur edges */
  z-index: -1;
  transition: background-image 1.5s ease-in-out;
}

/* Main App Layout */
.app-container {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
}

.app-container > * {
  min-width: 0;
}

/* Header & Story Carousel */
.top-bar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  min-width: 0; /* Prevent flex blowout */
  width: 100%;
}

.top-bar-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
}

.top-bar h1 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  text-align: center;
}

.badge-counter {
  position: absolute;
  right: 20px;
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
  color: #ffc107;
  padding: 8px 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-counter.celebrate {
  transform: scale(1.3) rotate(5deg);
  background: rgba(255, 193, 7, 0.4);
  box-shadow: 0 0 25px rgba(255, 193, 7, 0.8);
}

.carousel-container {
  display: flex;
  overflow-x: auto;
  width: 100%;
  max-width: 1200px;
  gap: 15px;
  padding: 10px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  min-width: 0; /* Prevent flex blowout */
}
.carousel-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.story-card {
  flex: 0 0 auto;
  width: 140px;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.story-card.active {
  transform: scale(1.05) translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
}

.story-card:hover {
  transform: translateY(-5px);
}

.story-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.story-card h3 {
  font-size: 0.9rem;
  margin: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Content Area: Split View */
.main-stage {
  display: flex;
  gap: 30px;
  min-height: 0;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  height: 100%; /* Important for flex */
}

.main-stage > * {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
}

/* Left: Animated Image Viewer */
.image-viewer {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  min-height: 0;
}

#story-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Don't crop the image */
  transition: opacity 1s ease-in-out;
}

/* Ken Burns Animation Class */
.ken-burns {
  animation: kenburns 15s infinite alternate ease-in-out;
}

@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* Right: Teleprompter / Subtitles */
.transcript-panel {
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0; /* Extremely important for grid shrinking */
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) transparent;
}

.transcript-panel::-webkit-scrollbar {
  width: 6px;
}
.transcript-panel::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 10px;
}

#story-title {
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--accent-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.story-text {
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap; /* Respect newlines */
}

/* Floating Audio Player Dock */
.audio-dock {
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  gap: 20px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, color 0.2s;
  padding: 10px;
  border-radius: 50%;
}

.btn-icon:hover {
  transform: scale(1.1);
  color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
}

.btn-icon.play-btn {
  background: var(--accent-color);
  color: #000;
  width: 60px;
  height: 60px;
}

.btn-icon.play-btn:hover {
  background: #ffb74d;
  transform: scale(1.1);
}

.btn-icon .material-icons {
  font-size: 32px;
}
.btn-icon.play-btn .material-icons {
  font-size: 40px;
}

.progress-container {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-color);
  width: 0%;
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* Call to Action Panel */
.cta-panel {
  margin-top: 40px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-panel h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3rem;
  color: var(--accent-color);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.cta-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.cta-btn .material-icons {
  font-size: 1.2rem;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  filter: brightness(1.2);
}

.cta-btn.ms-btn { background: linear-gradient(135deg, #0078d7, #005a9e); }
.cta-btn.android-btn { background: linear-gradient(135deg, #3ddc84, #1b8a4f); color: #000; border: none; }
.cta-btn.apple-btn { background: linear-gradient(135deg, #333333, #000000); }
.cta-btn.ebook-btn { background: linear-gradient(135deg, #ea4c89, #b51756); }
.cta-btn.gbooks-btn { background: linear-gradient(135deg, #4285F4, #0f52ba); }
.cta-btn.shopify-btn { background: linear-gradient(135deg, #96bf48, #5e8e3e); }
.cta-btn.print-btn { background: linear-gradient(135deg, #2f4f4f, #1b2e2e); }
.cta-btn.podcast-btn { background: linear-gradient(135deg, #a644ff, #5e17eb); }
.cta-btn.youtube-btn { background: linear-gradient(135deg, #ff0000, #cc0000); }

/* Responsive Design */
/* Responsive Design */
@media (max-width: 1050px) {
  .main-stage {
    flex-direction: column;
    gap: 15px;
  }
  .image-viewer {
    flex: 0 0 40vh;
  }
  .app-container {
    padding: 10px;
    gap: 10px;
  }
  .audio-dock {
    border-radius: 24px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
  }
  .top-bar h1 {
    font-size: 1.6rem;
  }
  .badge-counter {
    position: static;
    margin-top: 5px;
  }
  .story-text {
    font-size: 1.3rem;
  }
  .transcript-panel {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  body {
    overflow-y: auto;
  }
  .app-container {
    height: auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .main-stage {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .image-viewer {
    height: 40vh;
    min-height: 250px;
    flex-shrink: 0;
  }
  .top-bar h1 {
    font-size: 1.3rem;
  }
  .story-card {
    width: 110px;
  }
  .story-card img {
    height: 80px;
  }
  .transcript-panel {
    overflow-y: visible;
    height: auto;
    margin-bottom: 120px; /* Leave space for audio dock */
    padding: 15px;
    border-radius: 16px;
  }
  #story-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  .story-text {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  .audio-dock {
    position: fixed;
    bottom: 20px;
    left: 10px;
    right: 10px;
    width: auto;
    padding: 10px;
    z-index: 1000;
  }
  .btn-icon.play-btn {
    width: 50px;
    height: 50px;
  }
  .btn-icon.play-btn .material-icons {
    font-size: 32px;
  }
}

/* Quiz Styles */
.quiz-container {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--accent-color);
  border-radius: 16px;
  padding: 20px;
  animation: slideUp 0.5s ease-out;
}

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

.quiz-container h3 {
  margin-top: 0;
  color: #fff;
  font-size: 1.4rem;
  text-align: center;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.quiz-option-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.quiz-option-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.quiz-option-btn.correct {
  background: rgba(76, 175, 80, 0.6);
  border-color: #4CAF50;
}

.quiz-option-btn.incorrect {
  background: rgba(244, 67, 54, 0.6);
  border-color: #F44336;
}

.quiz-feedback {
  margin-top: 15px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  min-height: 25px;
}

.language-filter {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 5px 10px;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.language-filter option {
  background: #333;
  color: white;
}

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

.quiz-progress {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  color: #ddd;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.next-question-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffc107;
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.next-question-btn:hover {
  background: #ffd54f;
  transform: scale(1.05);
}

.next-question-btn .material-icons {
  font-size: 1.2rem;
}

.story-sentence {
  transition: background-color 0.2s, color 0.2s;
  border-radius: 4px;
  padding: 0 2px;
}

.story-sentence.highlighted {
  background-color: rgba(255, 193, 7, 0.4);
  color: #fff;
}

/* Constellation Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}
.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}
.constellation-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    padding-top: 50px;
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2010;
}
.close-modal:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}
.constellation-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.sky-container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    position: relative;
    padding: 20px;
}
.star-map {
    width: 100%;
    height: 100%;
}
.star-line {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    transition: all 1.5s ease-in-out;
}
.star-line.active {
    stroke: rgba(255, 215, 0, 0.8);
    stroke-width: 3;
    stroke-dasharray: none;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}
.star {
    fill: rgba(255, 255, 255, 0.2);
    transition: all 1s ease-in-out;
}
.star.active {
    fill: #FFF;
    filter: drop-shadow(0 0 8px #FFD700) drop-shadow(0 0 15px #FFD700);
    animation: twinkle 2s infinite alternate;
}
.constellation-name {
    fill: white;
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: bold;
    text-anchor: middle;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    text-shadow: 0 0 10px #FFD700;
}
.constellation.active .constellation-name {
    opacity: 1;
}

@keyframes twinkle {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 1; }
}

.badge-counter {
    cursor: pointer;
    transition: transform 0.2s;
}
.badge-counter:hover {
    transform: scale(1.05);
}

.badge-counter {
    flex-direction: column;
    gap: 2px;
}
.badge-main {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tap-hint {
    font-size: 0.75rem;
    color: rgba(255, 193, 7, 0.9);
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse-hint 2s infinite ease-in-out;
}
@keyframes pulse-hint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 5px rgba(255, 193, 7, 0.8); }
}

/* Auth Styles */
.auth-header-btn {
    background: linear-gradient(135deg, #FF6B6B, #C44536);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 10px;
}
.auth-header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

.auth-modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    color: #333;
    backdrop-filter: blur(10px);
}
.auth-modal-content .close-modal {
    color: #333;
    background: #f0f0f0;
    top: 15px;
    right: 15px;
}
.auth-modal-content h2 {
    color: #1a1a2e;
    margin-bottom: 5px;
}
.auth-modal-content p {
    color: #666;
    margin-bottom: 20px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.auth-form input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.auth-form input:focus {
    border-color: #a644ff;
}
.auth-submit-btn {
    background: linear-gradient(135deg, #a644ff, #5e17eb);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}
.auth-submit-btn:hover {
    transform: scale(1.02);
}
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}
.auth-divider span {
    padding: 0 10px;
}
.auth-google-btn {
    background: white;
    color: #444;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}
.auth-google-btn:hover {
    background: #f9f9f9;
}
.auth-toggle-text {
    margin-top: 10px;
    font-size: 0.9rem;
}
.auth-toggle-text a {
    color: #a644ff;
    text-decoration: none;
    font-weight: bold;
}
.auth-error {
    color: #ff3333 !important;
    font-size: 0.85rem;
    margin: 0 !important;
    min-height: 20px;
}

/* Wind-Down Breathing Modal */
.breathing-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #2a0845 0%, #6441A5 100%);
    color: white;
}
.breathing-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px 0;
}
.breathing-circle {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breathing-circle.inhale {
    transform: scale(2);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 100px rgba(255, 255, 255, 0.8);
}
.breathing-circle.exhale {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
}
.breathing-text {
    z-index: 10;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.skip-breathing-btn {
    margin-top: 30px;
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.skip-breathing-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.wind-down-btn {
    background: rgba(100, 65, 165, 0.2);
    border: 1px solid rgba(100, 65, 165, 0.5);
    color: #6441A5;
}

/* Premium Paywall Styles */
.premium-header-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 6px rgba(255, 215, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: 10px;
}
.premium-header-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.4);
}

.paywall-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}
.paywall-content .close-modal {
    color: #333;
    background: #f0f0f0;
}
.paywall-header {
    margin-bottom: 20px;
}
.paywall-header .star-icon {
    font-size: 48px;
    color: #FFD700;
    margin-bottom: 10px;
}
.paywall-header h2 {
    color: #1a1a2e;
    font-size: 2rem;
    margin: 0;
}
.paywall-desc {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}
.premium-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}
.premium-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 15px;
}
.premium-features li .check {
    color: #4CAF50;
    font-size: 1.5rem;
}
.upgrade-btn {
    background: linear-gradient(135deg, #a644ff, #5e17eb);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(94, 23, 235, 0.4);
}
.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(94, 23, 235, 0.6);
}
.locked-story {
    opacity: 0.6;
    position: relative;
}
.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    z-index: 2;
}
.locked-overlay .material-icons {
    font-size: 3rem;
    color: #333;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Background Music Controls */
.bg-music-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.bg-volume-slider {
    width: 60px;
    accent-color: #fca311;
}

@media (max-width: 768px) {
    .bg-music-controls {
        position: absolute;
        right: 15px;
        bottom: calc(100% + 15px);
        flex-direction: column;
        background: rgba(0,0,0,0.7);
        padding: 10px;
        border-radius: 20px;
    }
    .bg-volume-slider {
        writing-mode: vertical-rl;
        direction: rtl;
        height: 60px;
        width: 20px;
    }
}

/* Record Feature Styles */
.record-btn {
    transition: all 0.3s ease;
}
.record-btn.recording {
    color: #ff4757;
    animation: pulse-record 1.5s infinite;
}

@keyframes pulse-record {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.toggle-voice-btn {
    transition: all 0.3s ease;
}
.toggle-voice-btn.active {
    color: #2ed573;
}
