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

/* CSS Variables for theming */
:root {
  --bg-primary: #050505;
  --bg-secondary: #0b0b0b;
  --bg-tertiary: #111;
  --bg-card: #181818;
  --bg-hover: #222;
  --border-color: #333;
  --text-primary: #f7f7f7;
  --text-secondary: #e6ffe6;
  --text-muted: #888;
  --text-label: #ccc;
  --accent-primary: #00ff66;
  --accent-secondary: #00cc99;
  --accent-text: #020202;
  --accent-subtle: rgba(0, 255, 102, 0.05);
  --accent-border: rgba(0, 255, 102, 0.2);
  --accent-glow: rgba(0, 255, 102, 0.6);
  --tagline-color: #aaffcc;
}

/* Enterprise Light Theme */
body.enterprise-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #e2e8f0;
  --border-color: #cbd5e1;
  --text-primary: #1e293b;
  --text-secondary: #059669;
  --text-muted: #64748b;
  --text-label: #475569;
  --accent-primary: #059669;
  --accent-secondary: #10b981;
  --accent-text: #ffffff;
  --accent-subtle: rgba(5, 150, 105, 0.05);
  --accent-border: rgba(5, 150, 105, 0.2);
  --accent-glow: rgba(5, 150, 105, 0.3);
  --tagline-color: #059669;
}

/* Themed text and button classes */
.toad-ready-text {
  color: var(--accent-primary);
  font-weight: 500;
}

.accent-text {
  color: var(--accent-primary);
}

.primary-action-btn {
  background: var(--accent-primary);
  color: var(--accent-text);
}

/* Footer styling */
.site-footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-link {
  color: var(--accent-primary);
  text-decoration: none;
  margin: 0 15px;
}

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

/* Header buttons - themed for enterprise/consumer */
.header-btn {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  margin-right: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.header-btn-primary {
  background: var(--accent-primary);
  color: var(--accent-text);
  border: none;
}

.header-btn-primary:hover {
  filter: brightness(1.1);
}

.header-btn-secondary {
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  background: transparent;
}

.header-btn-secondary:hover {
  background: var(--bg-hover);
}

.header-btn-accent {
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  background: transparent;
}

.header-btn-accent:hover {
  background: var(--accent-subtle);
}

/* Tier badges */
.tier-badge {
  padding: 6px 14px;
  background: var(--accent-primary);
  border-radius: 6px;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
}

.enterprise-badge {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  flex-shrink: 0;
}

/* WELCOME SCREEN */

.welcome-screen {
  text-align: center;
  width: 100%;
}

.welcome-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo-button {
  border: none;
  background: none;
  border-radius: 999px;
  padding: 12px;
  cursor: pointer;
  box-shadow: 0 0 25px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.logo-button img {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  object-fit: cover;
}

.logo-button:hover {
  transform: scale(1.03);
  box-shadow: 0 0 35px var(--accent-glow);
}

.pro-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 6px;
  color: var(--accent-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-right: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pro-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 102, 0.3);
}

.welcome-tagline {
  font-size: 14px;
  color: var(--tagline-color);
}

.welcome-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.pricing-info {
  margin: 24px 0;
  padding: 20px;
  background: rgba(0, 255, 102, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 102, 0.2);
}

.pricing-info h3 {
  font-size: 18px;
  color: #00ff66;
  margin-bottom: 16px;
}

.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.tier {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px 12px;
  transition: all 0.2s ease;
}

.tier:hover {
  border-color: #00ff66;
  transform: translateY(-2px);
}

.tier-pro {
  border-color: rgba(0, 255, 102, 0.4);
}

.tier-unlimited {
  border-color: rgba(0, 255, 255, 0.4);
}

.tier-name {
  font-weight: 600;
  font-size: 14px;
  color: #00ff66;
  margin-bottom: 6px;
}

.tier-pro .tier-name {
  color: #00ff66;
}

.tier-unlimited .tier-name {
  color: #00ffff;
}

.tier-price {
  font-size: 20px;
  font-weight: 700;
  color: #f7f7f7;
  margin-bottom: 8px;
}

.tier-features {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
}

.benefits-hint {
  font-size: 13px;
  color: #00ff66;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .pricing-tiers {
    grid-template-columns: 1fr;
  }
}

/* MAIN APP SCREEN */

.hidden {
  display: none;
}

.app-screen {
  width: 100%;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.app-header h2 {
  font-size: 20px;
  color: var(--text-secondary);
}

.tagline {
  font-size: 12px;
  color: var(--tagline-color);
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group.full-width {
  grid-column: 1 / 5;
}

.control-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

label {
  font-size: 12px;
  color: var(--text-label);
}

select,
input[type="text"] {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  outline: none;
}

select:focus,
input[type="text"]:focus {
  border-color: var(--accent-primary);
}

.start-section {
  margin-bottom: 10px;
}

#start-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  background: var(--accent-primary);
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}

#start-btn:hover {
  filter: brightness(1.1);
}

.chat-section {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 12px;
  height: 420px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.message {
  margin-bottom: 10px;
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.message.user {
  margin-left: auto;
  background: var(--accent-primary);
  color: var(--accent-text);
}

.message.ai {
  margin-right: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.message .meta {
  font-size: 10px;
  opacity: 0.7;
  margin-bottom: 2px;
}

.toad-welcome {
  max-width: 95% !important;
}

.toad-welcome ol {
  line-height: 1.6;
}

.toad-welcome ol li {
  margin-bottom: 8px;
}

.input-section {
  margin-top: 8px;
}

.input-row {
  display: grid;
  grid-template-columns: 40px 1fr 80px;
  gap: 8px;
  align-items: center;
}

#user-input {
  width: 100%;
}

#send-btn,
#mic-btn {
  border: none;
  border-radius: 4px;
  background: var(--accent-primary);
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

#mic-btn {
  background: var(--bg-hover);
  color: var(--tagline-color);
}

#mic-btn.listening {
  background: var(--accent-primary);
  color: var(--accent-text);
}

#send-btn:hover,
#mic-btn:hover {
  filter: brightness(1.1);
}

.hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* End Conversation Button */

.end-conversation-row {
  margin-top: 12px;
  text-align: center;
}

.end-btn {
  padding: 10px 24px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.end-btn:hover {
  background: #cc3333;
  transform: translateY(-1px);
}

/* Feedback Screen */

.feedback-screen {
  width: 100%;
  padding: 20px;
}

.feedback-container {
  max-width: 800px;
  margin: 0 auto;
}

.feedback-container h2 {
  color: var(--accent-primary);
  font-size: 28px;
  margin-bottom: 30px;
  text-align: center;
}

.analysis-loading {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--accent-border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.analysis-loading p {
  color: var(--text-muted);
  font-size: 16px;
}

.score-card {
  background: var(--accent-subtle);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
}

.score-card h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.score-display {
  font-size: 72px;
  font-weight: bold;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 5px;
}

.score-label {
  color: var(--text-muted);
  font-size: 14px;
}

.score-explanation {
  margin-top: 15px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.feedback-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
}

.feedback-section h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 600;
}

.feedback-content {
  color: var(--text-label);
  line-height: 1.7;
  font-size: 15px;
}

.feedback-content ul {
  margin-left: 20px;
  margin-top: 10px;
}

.feedback-content li {
  margin-bottom: 8px;
}

.feedback-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
}

.primary-btn, .secondary-btn {
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.primary-btn {
  background: var(--accent-primary);
  color: var(--accent-text);
}

.primary-btn:hover {
  filter: brightness(0.9);
  transform: translateY(-2px);
}

.secondary-btn {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.secondary-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Responsive */

@media (max-width: 768px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .control-group.full-width {
    grid-column: 1 / 3;
  }
  .feedback-actions {
    flex-direction: column;
  }
  .primary-btn, .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .pro-btn {
    font-size: 11px;
    padding: 5px 10px;
    white-space: nowrap;
  }
  
  header .header-nav {
    gap: 4px;
  }
  
  header .header-nav a {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  /* Mobile-friendly touch targets */
  input, select, button, textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    min-height: 44px; /* Apple's recommended touch target */
  }
  
  .app-container {
    padding: 12px;
  }
  
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .auth-buttons {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .controls {
    gap: 12px;
  }
  
  .control-group label {
    font-size: 14px;
  }
  
  #user-input {
    font-size: 16px;
    padding: 12px;
  }
  
  #send-btn, #mic-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
  }
  
  .chat-message {
    font-size: 15px;
    padding: 12px 16px;
  }
  
  .logo-button img {
    width: 120px;
    height: 120px;
  }
  
  .welcome-tagline {
    font-size: 16px;
  }
  
  .welcome-hint {
    font-size: 14px;
  }
}

/* Toad Meter Styles */
.toad-meter-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(0, 255, 102, 0.05), rgba(0, 200, 100, 0.02));
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 12px;
  margin-bottom: 12px;
}

.toad-meter-container {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toad-meter-glow {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #4CAF50;
  opacity: 0.6;
  animation: toadGlow 2s ease-in-out infinite;
}

@keyframes toadGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.toad-meter-face {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toad-meter-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toad-meter-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.toad-meter-label {
  font-size: 14px;
  font-weight: 600;
  color: #4CAF50;
}

.toad-meter-score {
  font-size: 24px;
  font-weight: 700;
  color: #f7f7f7;
}

/* Toad Meter color states */
.toad-meter-excellent .toad-meter-glow { background: #4CAF50; }
.toad-meter-excellent .toad-meter-label { color: #4CAF50; }

.toad-meter-good .toad-meter-glow { background: #FFD700; }
.toad-meter-good .toad-meter-label { color: #FFD700; }

.toad-meter-fair .toad-meter-glow { background: #FF8C00; }
.toad-meter-fair .toad-meter-label { color: #FF8C00; }

.toad-meter-poor .toad-meter-glow { background: #FF4444; }
.toad-meter-poor .toad-meter-label { color: #FF4444; }

/* Comparison Pages */
.comparison-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.comparison-page .hero-section {
  text-align: center;
  padding: 3rem 0;
}

.comparison-page .hero-section h1 {
  font-size: 2.5rem;
  color: #1e293b;
  margin-bottom: 1rem;
}

.comparison-page .hero-subtitle {
  font-size: 1.25rem;
  color: #64748b;
}

.comparison-page .intro-text {
  font-size: 1.1rem;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.comparison-table-container {
  overflow-x: auto;
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
  background: #f8fafc;
  color: #1e293b;
  font-weight: 600;
}

.comparison-table th:first-child {
  width: 25%;
}

.comparison-table td {
  color: #475569;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: #f8fafc;
}

.comparison-sections {
  margin: 3rem 0;
}

.comparison-section {
  margin-bottom: 2.5rem;
}

.comparison-section h2 {
  color: #1e293b;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.comparison-section p {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.comparison-section ul,
.comparison-section ol {
  margin-left: 1.5rem;
  color: #475569;
  line-height: 1.8;
}

.comparison-section li {
  margin-bottom: 0.5rem;
}

.comparison-page .cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-radius: 12px;
  margin: 3rem 0;
}

.comparison-page .cta-section h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.comparison-page .cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.5rem;
}

.comparison-page .faq-section {
  margin: 3rem 0;
}

.comparison-page .faq-section h2 {
  color: #1e293b;
  margin-bottom: 1.5rem;
}

.comparison-page .faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-page .faq-item h3 {
  color: #1e293b;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.comparison-page .faq-item p {
  color: #64748b;
  line-height: 1.7;
}

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.comparison-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comparison-card h2 {
  color: #1e293b;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.comparison-card p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Landing page nav and footer for comparison pages */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.landing-nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #059669;
  text-decoration: none;
}

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-nav .nav-links a {
  color: #475569;
  text-decoration: none;
}

.landing-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 2rem;
  text-align: center;
}

.landing-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.landing-footer .footer-links a {
  color: #64748b;
  text-decoration: none;
}

.landing-footer p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #059669;
  color: #059669;
}

.btn-secondary:hover {
  background: rgba(5, 150, 105, 0.1);
}
