/* Kids Story Time - Original App Styles */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #333;
  position: relative;
}

.app {
  min-height: 100vh;
  padding: 20px;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Match Library page container spacing */
.app-container {
  padding: 20px;
}

@media (max-width: 768px) {
  .app {
    padding: 10px 5px;  /* Reduced horizontal padding for mobile */
    padding-bottom: 100px; /* Extra bottom padding for mobile */
  }
}

@media (max-width: 480px) {
  .app {
    padding: 1px;  /* Ultra-minimal padding for maximum width usage */
    padding-bottom: 120px; /* Extra bottom padding to prevent cutoff */
    min-height: 100vh;
  }
}

.container {
  max-width: 1200px;  /* Increased from 900px to match Library page */
  margin: 0 auto;
  width: 100%;  /* Ensure full width usage */
}

/* Header */
.header-container {
  background: linear-gradient(135deg, rgba(230, 235, 255, 0.95), rgba(240, 230, 255, 0.95));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 15px;
  -webkit-border-radius: 15px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  margin-bottom: 30px;
  max-width: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@media (max-width: 768px) {
  .header-container {
    padding: 15px 10px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 12px 10px;
    margin-bottom: 8px;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    margin: 0 0 8px 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  flex-wrap: nowrap;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.logo-icon {
  min-width: 40px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FF6B9D, #4ECDC4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon span {
  color: white;
  font-size: 20px;
  font-weight: bold;
}

.logo-text {
  font-size: 28px;
  font-weight: bold;
  background: linear-gradient(135deg, #FF6B9D, #4ECDC4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-domain {
  font-size: 0.6em;
  font-weight: normal;
  color: #666;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.header-btn {
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: white;
  color: #667eea;
  border: 2px solid #e0e0e0;
  font-size: 14px;
}

.header-btn:hover {
  background: #f8f9ff;
  border-color: #667eea;
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.header-btn.primary-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
}

.header-btn.primary-btn:hover {
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.header-btn.achievement-btn {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: white;
  border: none;
}

.header-btn.achievement-btn:hover {
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.header-btn.trial-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: 2px solid #28a745;
  position: relative;
}

.trial-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: #333;
  color: white;
  font-size: 14px;
  border-radius: 8px;
  padding: 8px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 100;
}

.header-btn.trial-btn:hover .trial-tooltip {
  opacity: 1;
}

.tagline {
  text-align: center;
  margin-top: 15px;
  color: #666;
  font-size: 18px;
}

/* User Navigation */
.user-nav {
  background: white;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.nav-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.library-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.library-btn:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.user-email {
  color: #666;
  font-size: 0.95rem;
}

.logout-btn {
  background: #f5f5f5;
  color: #666;
}

.logout-btn:hover {
  background: #e0e0e0;
}

/* Account Section */
.account-section {
  background: white;
  border-radius: 15px;
  -webkit-border-radius: 15px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@media (max-width: 768px) {
  .account-section {
    padding: 25px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .account-section {
    padding: 20px 15px;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    margin: 0 0 20px 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

.account-section h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.account-section p {
  color: #666;
  margin-bottom: 20px;
}

.account-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.account-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.signup-btn:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.login-btn {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.login-btn:hover {
  background: #f8f9ff;
}

/* Main Content */
.main-content {
  background: white;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  border: 2px solid rgba(102, 126, 234, 0.3);
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

@media (max-width: 768px) {
  .main-content {
    padding: 25px 20px;
    border-radius: 15px;
    margin-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 18px 12px;
    border-radius: 12px !important;
    -webkit-border-radius: 12px !important;
    margin: 0 0 15px 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

.main-content h2 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 2rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 30px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-weight: 600;
  font-size: 1.1rem;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-select {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: white;
  color: #2d3748; /* Ensure text is visible */
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Form Select */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5em;
  padding-right: 3rem;
}

.form-select option {
  color: #2d3748;
  background: white;
  padding: 8px;
}

/* Beta Banner */
.beta-banner {
  background: linear-gradient(135deg, #ede9fe, #f3f0ff);
  color: #6d28d9;
  text-align: center;
  padding: 12px 20px;
  margin: 15px 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  border: 1px solid #ddd6fe;
}

.beta-title {
  font-weight: bold;
  font-size: 16px;
  color: #6d28d9;
}

.beta-subtitle {
  font-size: 14px;
  margin-top: 4px;
  color: #7c3aed;
  opacity: 0.95;
}

/* Name and Gender Row */
.name-gender-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.name-input {
  flex: 1;
}

.gender-buttons {
  display: flex;
  background: #f0f0f0;
  border-radius: 25px;
  padding: 3px;
  flex-shrink: 0;
}

.gender-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
}

.gender-btn.active,
.gender-btn.selected {
  background: #f8f4fb;
  border: 2px solid #8b5cf6;
  color: #6A4C93;
  box-shadow: 0 2px 4px rgba(106, 76, 147, 0.2);
}

.gender-btn.selected .icon {
  color: #6A4C93;
}

.gender-icon {
  font-size: 18px;
}

.gender-text {
  font-weight: 500;
}

/* Mobile adjustments for gender buttons */
@media (max-width: 768px) {
  .name-gender-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .name-input {
    width: 100%;
    flex: none;
  }
  
  .gender-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .gender-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .gender-btn {
    padding: 5px 10px;
    min-height: 32px;
    height: 32px;
  }
  
  .gender-text {
    display: none;
  }
  
  .gender-icon {
    font-size: 18px;
  }
  
  .gender-buttons {
    gap: 5px;
  }
}

.include-name-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
  font-weight: normal;
  margin-top: 10px;
}

.include-name-label input {
  margin-right: 8px;
  width: auto;
}

/* Prompt Container */
.prompt-container {
  position: relative;
}

.prompt-textarea {
  width: 100%;
  padding: 12px 60px 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  resize: vertical;
}

.voice-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.voice-btn:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  /* transform: scale(1.05); */
}

.voice-btn.recording {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: pulse-recording 1.5s infinite;
}

.voice-btn.recording:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 20px;
}

.voice-wave span {
  display: block;
  width: 3px;
  background: white;
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { height: 10px; animation-delay: 0s; }
.voice-wave span:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { height: 15px; animation-delay: 0.2s; }
.voice-wave span:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.voice-wave span:nth-child(5) { height: 10px; animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

.mic-icon {
  font-size: 18px;
}

.rec-label {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: -0.5px;
  color: white;
}

.info-btn {
  background: none;
  border: none;
  color: #007acc;
  font-size: 16px;
  margin-left: 5px;
  cursor: pointer;
}

/* Theme Subtitle */
.theme-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  margin-top: -5px;
}

/* Welcome Section */
.welcome-section {
  flex: 1;
}

.welcome-section h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.plan-status {
  color: #666;
  margin: 0;
}

.nav-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.upgrade-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.upgrade-btn:hover {
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* Feedback Section */
.feedback-section {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
}

.feedback-section h3 {
  color: #333;
  margin-bottom: 10px;
}

.feedback-section p {
  color: #666;
  margin-bottom: 15px;
}

.feedback-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.feedback-btn:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  color: white;
}

.footer a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}

.footer a:hover {
  text-decoration: underline;
}

/* Auth Error */
.auth-error {
  background: #fee;
  color: #c00;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

/* Theme Grid */
.theme-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.theme-option {
  padding: 6px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  min-height: 38px;
  justify-content: center;
  flex: 0 0 auto;
}

.theme-option:hover {
  border-color: #667eea;
  /* transform: translateY(-2px); */
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.theme-option.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
}

.theme-emoji {
  font-size: 1rem;
  display: inline-block;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .theme-emoji {
    font-size: 0.85rem;
  }
  
  .theme-label {
    font-size: 0.75rem;
  }
}

.theme-label {
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

/* Length Options */
.length-options {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.length-option {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
}

.length-option:hover {
  border-color: #667eea;
}

.length-option.selected {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Generate Button */
.generate-btn {
  width: 100%;
  padding: 18px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
  /* transform: translateY(-2px); */
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.generate-btn.generating {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.feature {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.feature h3 {
  color: white;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.feature p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

/* Auth Modal */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  transition: all 0.3s ease;
}

.auth-close:hover {
  color: #333;
  transform: rotate(90deg);
}

.auth-title {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
  font-size: 1.8rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-input {
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.auth-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-submit {
  padding: 14px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 48px;
}

@media (max-width: 480px) {
  .auth-submit {
    padding: 16px 30px;
    font-size: 1rem;
    min-height: 52px;
    width: 100%;
  }
}

.auth-submit:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.auth-switch button {
  background: none;
  border: none;
  color: #667eea;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.auth-switch button:hover {
  color: #764ba2;
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  color: #999;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e0e0e0;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.test-logins {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.test-login-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.test-free {
  background: #e0e0e0;
  color: #666;
}

.test-premium {
  background: #ff9800;
  color: white;
}

.test-family {
  background: #4caf50;
  color: white;
}

.test-login-btn:hover {
  /* transform: translateY(-2px); */
  opacity: 0.9;
}

/* Onboarding Modal */
.onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.onboarding-content {
  background: white;
  border-radius: 30px;
  padding: 50px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  position: relative;
}

.onboarding-title {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 20px;
}

.onboarding-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
}

.get-started-btn {
  padding: 16px 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.get-started-btn:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* More Menu Dropdown */
.more-menu-container {
  position: relative;
}

.more-btn {
  min-width: 80px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

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

.dropdown-menu button {
  width: 100%;
  padding: 12px 20px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-menu button:hover {
  background: #f8f9ff;
  color: #667eea;
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 5px 0;
}

/* ========================================
   GAMIFICATION SYSTEM - BEST PRACTICES
   ======================================== */

/* Star Bank (Currency System) */
.star-bank, .star-display.clickable {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ffd700, #ffb700);
  border-radius: 25px;
  font-weight: bold;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.star-bank:hover, .star-display.clickable:hover {
  /* transform: translateY(-2px) scale(1.02); */
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
  background: linear-gradient(135deg, #ffdb00, #ffc107);
}

/* Tooltip on hover */
.star-bank::after {
  content: '💰 Star Shop';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transition: transform 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}

.star-bank:hover::after {
  transform: translateX(-50%) scale(1);
}

/* Trophy Room (Achievement System) */
.trophy-room, .achievement-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  border-radius: 25px;
  font-weight: bold;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.trophy-room:hover, .achievement-btn:hover {
  /* transform: translateY(-2px) scale(1.02); */
  box-shadow: 0 4px 12px rgba(155, 89, 182, 0.5);
  background: linear-gradient(135deg, #a569bd, #9b59b6);
}

/* Trophy tooltip */
.trophy-room::after {
  content: '🏆 Badge Collection';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transition: transform 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}

.trophy-room:hover::after {
  transform: translateX(-50%) scale(1);
}

/* Icon animations */
.star-icon, .currency-icon {
  color: white;
  font-size: 1.2rem;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
  }
}

.trophy-icon {
  font-size: 1.2rem;
  animation: trophy-shine 3s ease-in-out infinite;
}

@keyframes trophy-shine {
  0%, 100% { 
    transform: translateY(0) rotate(0deg);
    filter: brightness(1);
  }
  50% { 
    transform: translateY(-2px) rotate(-5deg);
    filter: brightness(1.3);
  }
}

/* Values and labels */
.star-count, .currency-value {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.trophy-count, .achievement-count {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  opacity: 0.95;
}

/* Visual separation in header */
.gamification-separator {
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, transparent, #ddd, transparent);
  margin: 0 10px;
}

/* Clear labeling for mobile */
@media (max-width: 768px) {
  .star-bank::after,
  .trophy-room::after {
    display: none;
  }
  
  .star-bank, .trophy-room, .star-display.clickable, .achievement-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .star-bank, .trophy-room, .star-display.clickable, .achievement-btn {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 44px;
    flex: 1;
    justify-content: center;
  }
  
  .header-actions {
    width: 100%;
    gap: 8px;
  }
}

/* Backwards compatibility */
.star-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #fff8e1, #fff);
  border-radius: 20px;
  border: 2px solid #ffd700;
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0;
  }

  .header-container {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .header-content {
    /* Keep horizontal layout on mobile for single line */
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  .header-left {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    overflow: hidden;
  }

  .header-right {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  
  .dropdown-menu {
    right: 10px;
    left: 10px;
    width: auto;
  }
  
  .header-btn {
    font-size: 13px;
    padding: 8px 16px;
  }

  .logo-text {
    font-size: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
  }

  .main-content {
    padding: 25px 20px;
    border-radius: 15px;
  }

  .theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .user-nav {
    flex-direction: column;
    gap: 15px;
  }

  .welcome-section {
    text-align: center;
  }

  .nav-buttons {
    width: 100%;
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  /* Additional mobile styles - main container styles defined earlier */
  
  /* Ensure header stays on single line on mobile */
  .header-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }
  
  .header-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  
  .logo-text {
    font-size: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 150px !important;
  }
  
  .logo-icon {
    min-width: 35px !important;
    width: 35px !important;
    height: 35px !important;
  }
  
  .header-btn.login-btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
  
  .logo {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 0.95rem;
  }

  .main-content h2 {
    font-size: 1.5rem;
  }

  .theme-option {
    padding: 6px 8px;
    width: 100%;
    min-height: 40px;
    font-size: 0.8rem;
  }

  .theme-emoji {
    font-size: 0.9rem;
  }

  .length-options {
    flex-direction: column;
  }

  .length-option {
    width: 100%;
  }

  .generate-btn {
    font-size: 1.1rem;
    padding: 16px 30px;
  }

  .onboarding-content {
    padding: 30px 20px;
  }

  .onboarding-title {
    font-size: 2rem;
  }
}