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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #050505;
  color: #f7f7f7;
  display: flex;
  flex-direction: column;
}

.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 rgba(0, 255, 102, 0.6);
  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 rgba(0, 255, 102, 0.9);
}

.pro-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, #00ff66, #00cc99);
  border-radius: 6px;
  color: #020202;
  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: #aaffcc;
}

.welcome-hint {
  font-size: 12px;
  color: #888;
}

.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 #222;
  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: #e6ffe6;
}

.tagline {
  font-size: 12px;
  color: #aaffcc;
}

.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: #00ff66;
}

label {
  font-size: 12px;
  color: #ccc;
}

select,
input[type="text"] {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #333;
  background: #111;
  color: #f7f7f7;
  outline: none;
}

select:focus,
input[type="text"]:focus {
  border-color: #00ff66;
}

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

#start-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  background: #00ff66;
  color: #020202;
  font-weight: 600;
  cursor: pointer;
}

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

.chat-section {
  border-radius: 8px;
  border: 1px solid #222;
  background: #0b0b0b;
  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: #00ff66;
  color: #020202;
}

.message.ai {
  margin-right: auto;
  background: #181818;
  border: 1px solid #333;
}

.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: #00ff66;
  color: #020202;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

#mic-btn {
  background: #222;
  color: #aaffcc;
}

#mic-btn.listening {
  background: #00ff66;
  color: #020202;
}

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

.hint {
  margin-top: 4px;
  font-size: 11px;
  color: #888;
}

/* 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: #00ff66;
  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 rgba(0, 255, 102, 0.2);
  border-top-color: #00ff66;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.analysis-loading p {
  color: #aaa;
  font-size: 16px;
}

.score-card {
  background: rgba(0, 255, 102, 0.05);
  border: 2px solid #00ff66;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
}

.score-card h3 {
  color: #00ff66;
  font-size: 18px;
  margin-bottom: 15px;
}

.score-display {
  font-size: 72px;
  font-weight: bold;
  color: #00ff66;
  line-height: 1;
  margin-bottom: 5px;
}

.score-label {
  color: #888;
  font-size: 14px;
}

.score-explanation {
  margin-top: 15px;
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}

.feedback-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #222;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
}

.feedback-section h3 {
  color: #00ff66;
  font-size: 18px;
  margin-bottom: 15px;
}

.feedback-content {
  color: #ccc;
  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: #00ff66;
  color: #020202;
}

.primary-btn:hover {
  background: #00cc52;
  transform: translateY(-2px);
}

.secondary-btn {
  background: #222;
  color: #f7f7f7;
  border: 1px solid #444;
}

.secondary-btn:hover {
  background: #333;
  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; }
