/* TONE AI Premium 100/100 UI Design System */

:root {
  --bg-dark: #05040a;
  --bg-card: rgba(22, 15, 36, 0.42);
  --bg-card-hover: rgba(30, 21, 52, 0.65);
  --accent-purple: #8B5CF6;
  --accent-pink: #EC4899;
  --accent-cyan: #06B6D4;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-dim: #6B7280;
  --border-color: rgba(255, 255, 255, 0.06);
  --glow-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
  --font-main: 'Outfit', sans-serif;
  --font-logo: 'Space Grotesk', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #030206;
  font-family: var(--font-main);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  padding: 20px;
}

/* 1. Liquid Morphing Backdrop Backdrop */
.liquid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: #030206;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: floatMorphing 24s infinite alternate ease-in-out;
}

.blob-cyan {
  width: 450px;
  height: 450px;
  background: var(--accent-cyan);
  top: -10%;
  left: 5%;
  animation-duration: 20s;
}

.blob-purple {
  width: 550px;
  height: 550px;
  background: var(--accent-purple);
  bottom: -15%;
  right: 5%;
  animation-duration: 26s;
  animation-delay: -5s;
}

.blob-pink {
  width: 400px;
  height: 400px;
  background: var(--accent-pink);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes floatMorphing {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(60px, -40px) scale(1.18) rotate(180deg); }
  100% { transform: translate(-40px, 50px) scale(0.9) rotate(360deg); }
}

/* 2. Full-Screen App Container (Widescreen optimized) */
.app-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 32px;
}

/* 3. Branding Header */
.app-header {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto 24px auto;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-logo-svg {
  width: 40px;
  height: 40px;
  animation: pulseLogo 6s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(6deg); filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6)); }
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FFF 20%, var(--accent-purple) 65%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slogan-text {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  opacity: 0.9;
}

.status-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* 4. Main Workspace Layout */
.app-workspace-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  min-height: 0;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Left Column (Inputs) */
.input-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

.input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

.input-card:hover {
  border-color: rgba(139, 92, 246, 0.22);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
}

.card-glow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.input-card:hover .card-glow-overlay {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.icon-orb {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.card-icon {
  width: 16px;
  height: 16px;
}

.card-title {
  font-family: var(--font-logo);
  font-size: 0.98rem;
  font-weight: 700;
}

/* Hum-to-Hit Content Styling */
.acoustic-capture-box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  height: 86px;
  z-index: 2;
}

.canvas-container {
  flex: 1;
  height: 100%;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.04) 1px, transparent 1px);
  background-size: 13px 13px;
  pointer-events: none;
  z-index: 1;
}

.waveform-display {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.record-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.record-trigger {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.record-trigger:hover {
  transform: scale(1.05);
}

.btn-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--accent-pink);
  pointer-events: none;
  opacity: 0;
}

.record-trigger.recording .btn-ripple {
  border-color: var(--accent-cyan);
  animation: rippleAnimation 1.6s infinite ease-out;
}

@keyframes rippleAnimation {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.record-icon-inner {
  width: 16px;
  height: 16px;
  background: #FFF;
  border-radius: 50%;
  transition: all 0.25s ease;
  position: relative;
  z-index: 2;
}

.record-trigger.recording .record-icon-inner {
  border-radius: 3px;
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
}

.status-indicator {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
}

.status-indicator.recording-state {
  color: var(--accent-cyan);
}

/* Meme-to-Banger Upload Area */
.visual-upload-box {
  border: 2px dashed rgba(6, 182, 212, 0.22);
  border-radius: 14px;
  height: 86px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  z-index: 2;
}

.visual-upload-box:hover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.02);
}

.upload-placeholder {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.upload-icon-wrapper {
  width: 38px;
  height: 38px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-purple);
}

.upload-texts {
  display: flex;
  flex-direction: column;
}

.upload-primary-text {
  font-weight: 700;
  font-size: 0.88rem;
}

.upload-secondary-text {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.image-preview-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

.image-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  box-shadow: 0 0 8px var(--accent-cyan);
  display: none;
  pointer-events: none;
}

.scanner-bar.scanning {
  display: block;
  animation: scanImage 2s infinite ease-in-out;
}

/* Right Output Column */
.output-column {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  position: relative;
  min-height: 0;
}

/* Awaiting Input Placeholder State */
.awaiting-input-placeholder {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 215px;
  height: 380px;
  border: 1.5px dashed rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  padding: 16px;
}

.placeholder-art-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.placeholder-art-icon {
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.18);
  stroke-dasharray: 4 4;
  animation: rotatePlaceholder 24s infinite linear;
}

@keyframes rotatePlaceholder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pulse-glow-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px dashed rgba(139, 92, 246, 0.2);
  animation: rotatePlaceholder 16s infinite linear reverse;
}

.placeholder-text {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.placeholder-subtext {
  font-size: 0.76rem;
  color: var(--text-secondary);
  max-width: 220px;
  line-height: 1.35;
}

/* Reel Preview Simulator Container */
.output-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  width: 100%;
  min-height: 0;
}

.reel-mockup-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.reel-simulator {
  height: 100%;
  max-height: 380px; /* Secure height bounds */
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
}

#reel-export-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.reel-playback-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #FFF;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  opacity: 0.9;
  z-index: 20;
}

.reel-playback-toggle:hover {
  background: rgba(139, 92, 246, 0.35);
  transform: translate(-50%, -50%) scale(1.05);
  color: var(--accent-cyan);
}

.play-icon {
  width: 18px;
  height: 18px;
}

/* Bottom Action Buttons */
.output-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
  border: none;
  color: #FFF;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--glow-shadow);
  transition: all 0.25s ease;
}

.action-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(236, 72, 153, 0.45);
}

.action-btn-secondary {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.action-btn-secondary:hover {
  border-color: var(--accent-purple);
  color: #FFF;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* 5. Global Loader Screen Overlay */
.processing-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 4, 10, 0.95);
  backdrop-filter: blur(20px);
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.processing-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: floatAmbient 6s infinite alternate ease-in-out;
}

.processing-spinner {
  width: 66px;
  height: 66px;
  position: relative;
  margin-bottom: 18px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.spinner-ring.inner {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border-top-color: var(--accent-pink);
  animation: spinInverse 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinInverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

.processing-title {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.processing-subtitle {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.progress-bar-container {
  width: 100%;
  max-width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
  border-radius: 10px;
  transition: width 0.25s ease;
}

/* ==============================================
   6. Mobile Screens Optimization (State Transitions)
   ============================================== */
@media (max-width: 768px) {
  body {
    padding: 0;
    overflow: hidden; /* Lock scroll strictly */
  }

  .app-container {
    width: 100vw;
    height: 100vh;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    border: none;
    padding: 18px;
    background: rgba(5, 4, 10, 0.9);
  }

  .app-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  #global-status-badge {
    display: none !important;
  }

  .header-auth-btn, .header-avatar-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .auth-icon {
    width: 15px !important;
    height: 15px !important;
  }

  .header-user-avatar {
    width: 100% !important;
    height: 100% !important;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .app-workspace-grid {
    grid-template-columns: 1fr;
    height: calc(100% - 70px);
    position: relative;
  }

  /* State driven views for mobile: hide columns completely */
  .app-container.state-input .input-column {
    display: flex;
  }
  .app-container.state-input .output-column {
    display: none !important;
  }

  .app-container.state-output .input-column {
    display: none !important;
  }
  .app-container.state-output .output-column {
    display: flex;
    height: 100%;
  }

  .input-column {
    justify-content: center;
    gap: 16px;
  }

  .input-column::-webkit-scrollbar {
    display: none; /* Hide scrollbar on mobile input column */
  }

  .input-card {
    flex: 1; /* evenly split inputs vertically */
    max-height: 45%;
    justify-content: center;
    padding: 14px;
  }

  .acoustic-capture-box, .visual-upload-box {
    height: 80px;
  }

  .output-column {
    height: 100%;
    border: none;
    background: transparent;
    padding: 0;
  }

  .output-container {
    height: 100%;
  }

  .reel-simulator {
    max-height: calc(100vh - 200px); /* Fill phone screen comfortably */
  }
}

/* --- Google Authentication & Login Wall Styles --- */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-auth-btn, .header-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.header-auth-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(236, 72, 153, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.header-auth-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.25));
  border-color: rgba(236, 72, 153, 0.8);
  color: #FFF;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4), 0 0 30px rgba(139, 92, 246, 0.2);
  transform: scale(1.06) translateY(-1px);
}

.auth-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.header-auth-btn:hover .auth-icon {
  transform: scale(1.1);
}

.header-avatar-btn {
  background: rgba(22, 15, 36, 0.5);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.header-avatar-btn:hover {
  border-color: rgba(236, 72, 153, 0.7);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4), 0 0 25px rgba(139, 92, 246, 0.2);
  transform: scale(1.06) translateY(-1px);
}

.header-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.header-avatar-btn:hover .header-user-avatar {
  transform: scale(1.04);
}

/* Auth Modal Overlay */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 8, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.auth-modal {
  background: rgba(12, 8, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), var(--glow-shadow);
  border-radius: 28px;
  width: 100%;
  max-width: 460px;
  padding: 44px 32px 36px 32px;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  transform: translateY(20px);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

.modal-bg-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14) 0%, transparent 70%);
  top: -120px;
  left: -120px;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

@keyframes slideUp {
  to { transform: translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transform: scale(1.06) rotate(90deg);
}

.modal-close-btn svg {
  width: 14px;
  height: 14px;
}

.modal-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 1;
}

.modal-logo-glow-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
}

.modal-logo-svg {
  width: 58px;
  height: 58px;
  animation: floatLogo 6s infinite alternate ease-in-out;
  position: relative;
  z-index: 2;
}

.logo-pulse-ring {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1.5px dashed rgba(6, 182, 212, 0.25);
  animation: rotatePlaceholder 18s infinite linear;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatLogo {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-6px) scale(1.03); filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5)); }
}

.modal-title {
  font-family: var(--font-logo);
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1.25;
  background: linear-gradient(135deg, #FFF 30%, var(--accent-purple) 75%, var(--accent-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-description {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  z-index: 1;
  max-width: 360px;
}

/* Playful Perks Cards styles */
.modal-perks {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
  margin: 4px 0;
}

.perk-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: default;
}

.perk-card:hover {
  background: rgba(30, 21, 52, 0.45);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 15px rgba(139, 92, 246, 0.1);
}

.perk-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.perk-card:hover .perk-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.perk-acoustic .perk-icon-wrapper {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.15);
}

.perk-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perk-title {
  font-family: var(--font-logo);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.perk-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.modal-actions {
  width: 100%;
  z-index: 1;
}

.google-signin-btn {
  width: 100%;
  background: #FFFFFF;
  border: none;
  color: #1F2937;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 15px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-signin-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25), 0 0 15px rgba(6, 182, 212, 0.35);
  background: #F9FAFB;
}

.google-signin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 5px 0;
  z-index: 2;
}

.google-icon {
  width: 18px;
  height: 18px;
}

.modal-footer-text {
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1.4;
  z-index: 1;
}

@media (max-height: 600px), (max-width: 480px) {
  .auth-modal-overlay {
    align-items: flex-start; /* allows clean scrolling from top on short screens */
  }
  
  .auth-modal {
    margin-top: 15px;
    margin-bottom: 30px;
    padding: 24px 20px 38px 20px;
    gap: 14px;
    border-radius: 20px;
  }
  
  .modal-logo-svg {
    width: 44px;
    height: 44px;
  }
  
  .logo-pulse-ring {
    width: 58px;
    height: 58px;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
  
  .modal-description {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0;
  }
  
  .modal-perks {
    gap: 8px;
  }
  
  .perk-card {
    padding: 10px 14px;
    gap: 12px;
    border-radius: 12px;
  }
  
  .perk-icon-wrapper {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 8px;
  }
  
  .perk-title {
    font-size: 0.82rem;
  }
  
  .perk-desc {
    font-size: 0.68rem;
    line-height: 1.25;
  }
  
  .google-signin-btn {
    padding: 12px 16px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
}

/* --- Paywall & Credits Capsule Styles --- */

.auth-header-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-buy-credits-btn {
  background: transparent;
  border: none;
  padding: 0;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.2));
  flex-shrink: 0;
}

.header-buy-credits-btn:hover {
  transform: scale(1.08) rotate(5deg);
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5)) drop-shadow(0 0 12px rgba(236, 72, 153, 0.3));
}

.credits-btn-icon {
  width: 100%;
  height: 100%;
}

/* Paywall Modal Overlay */
.paywall-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 8, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 10px;
  overflow-y: auto;
}

.paywall-modal-container {
  background: linear-gradient(145deg, rgba(20, 12, 38, 0.88), rgba(6, 4, 15, 0.96));
  border: 1px solid rgba(139, 92, 246, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.15);
  border-radius: 24px;
  width: 100%;
  max-width: 780px;
  padding: 35px;
  position: relative;
  animation: modalEntry 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
  margin: auto;
}

.paywall-horizontal-card {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: stretch;
  justify-content: space-between;
  text-align: left;
}

.paywall-left-panel {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.paywall-right-panel {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 310px;
}

.paywall-badge {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: var(--accent-pink);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

.paywall-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  background: linear-gradient(to right, #FFF, #E2D8FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.paywall-intro-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Tabbed Switcher Layout */
.paywall-tabs-container {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 30px;
  margin: 20px 0;
  width: fit-content;
}

.paywall-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  white-space: nowrap;
}

.paywall-tab-btn:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.03);
}

.paywall-tab-btn.active {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  color: #FFF;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Paywall Simulation Container */
.paywall-sim-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(6, 182, 212, 0.25);
  padding: 8px 14px;
  border-radius: 12px;
  width: fit-content;
}

.sim-lbl {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.sim-btn {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-main);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* Active Pricing Details Card */
.active-plan-card {
  width: 100%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.paywall-detail-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 30px 25px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  text-align: center;
}

.paywall-detail-card.popular {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(236, 72, 153, 0.06));
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.15);
}

.popular-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-pink);
  color: #FFF;
  font-family: var(--font-main);
  font-size: 0.58rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

.detail-badge {
  font-family: var(--font-main);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

.detail-tagline {
  font-family: var(--font-main);
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFF;
  margin: 0 0 14px 0;
}

.detail-price-section {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-credits {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #FFF;
}

.credits-sub {
  font-size: 0.95rem;
  font-family: var(--font-main);
  font-weight: 500;
  color: var(--text-secondary);
}

.detail-divider {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.2);
}

.detail-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-pink);
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.detail-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 24px 0;
  min-height: 48px;
}

.detail-buy-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFF;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.detail-buy-btn:hover {
  background: #FFF;
  color: #000;
  border-color: #FFF;
  transform: scale(1.02);
}

.paywall-detail-card.popular .detail-buy-btn {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-violet));
  border: none;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.paywall-detail-card.popular .detail-buy-btn:hover {
  background: linear-gradient(135deg, #FFF, #FFF);
  color: #000;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.modal-footer-text {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.25);
  margin: 15px 0 0 0;
  text-align: center;
}

/* --- Mobile Stack View Overrides (Vertical Card Layout) --- */
@media (max-width: 768px) {
  .paywall-horizontal-card {
    flex-direction: column !important;
    gap: 15px;
  }
  
  .paywall-left-panel {
    text-align: center !important;
  }
  
  .paywall-badge, .paywall-tabs-container, .paywall-sim-box {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .paywall-sim-box {
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }

  .paywall-modal-container {
    padding: 16px 20px;
    max-width: 350px;
    margin: 10px auto;
    border-radius: 16px;
  }
  
  .paywall-title {
    font-size: 1.35rem;
  }
  
  .paywall-right-panel {
    min-height: 250px;
  }
  
  .paywall-detail-card {
    padding: 18px;
  }
  
  .detail-desc {
    min-height: auto;
    margin-bottom: 15px;
  }

  .header-buy-credits-btn {
    width: 30px;
    height: 30px;
  }
}

