/* Extracted site styles from single-file HTML */
body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fafafa;
  color: #2c3e50;
  line-height: 1.6;
}

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

.app-container {
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* Landing Page */
.landing-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.landing-page h1 {
  font-size: 48px;
  font-weight: 600;
  margin: 0 0 24px 0;
  color: #1a1a1a;
  line-height: 1.2;
}

.landing-page p {
  font-size: 18px;
  color: #5a6c7d;
  margin: 0 0 16px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 32px;
  transition: background 0.2s;
}

.cta-button:hover {
  background: #2980b9;
}

/* Navigation */
.nav-bar {
  background: white;
  border-bottom: 1px solid #e1e8ed;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
}

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

.nav-button {
  background: none;
  border: 1px solid #d1d9e0;
  color: #5a6c7d;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  margin-top: 32px;
  transition: all 0.2s;
}

.nav-button:hover {
  background: #f5f8fa;
  border-color: #3498db;
  color: #3498db;
}

.nav-button.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

/* Input Page */
.input-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h2 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

.page-header p {
  font-size: 16px;
  color: #5a6c7d;
  margin: 0;
}

.input-form {
  background: white;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  background: #fafafa;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #3498db;
  background: white;
}

.add-button {
  width: 100%;
  background: #3498db;
  color: white;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.add-button:hover {
  background: #2980b9;
}

.add-button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.word-list {
  background: white;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  overflow: hidden;
}

.word-item {
  padding: 20px 24px;
  border-bottom: 1px solid #e1e8ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.word-item:last-child {
  border-bottom: none;
}

.word-pair {
  flex: 1;
}

.word-pair-text {
  font-size: 16px;
  color: #2c3e50;
}

.word-pair-lang {
  font-size: 12px;
  color: #95a5a6;
  margin-top: 4px;
}

.delete-button {
  background: none;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.delete-button:hover {
  background: #e74c3c;
  color: white;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #95a5a6;
}

/* Review Page */
.review-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 24px;
}

.review-card {
  background: white;
  padding: 64px 48px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  text-align: center;
  margin-bottom: 32px;
}

.review-prompt {
  font-size: 14px;
  color: #95a5a6;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.review-word {
  font-size: 42px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 48px;
  min-height: 56px;
}

.answer-input {
  width: 100%;
  padding: 16px;
  font-size: 24px;
  text-align: center;
  border: 2px solid #d1d9e0;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 24px;
}

.answer-input:focus {
  outline: none;
  border-color: #3498db;
  background: white;
}

.reveal-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.reveal-button:hover {
  background: #2980b9;
}

.answer-revealed {
  margin-top: 24px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.auto-check-result {
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.auto-check-result.correct {
  background: #e8f8f5;
  color: #27ae60;
  border: 2px solid #27ae60;
}

.auto-check-result.close {
  background: #fef5e7;
  color: #f39c12;
  border: 2px solid #f39c12;
}

.auto-check-result.wrong {
  background: #fee;
  color: #e74c3c;
  border: 2px solid #e74c3c;
}

.answer-comparison {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.answer-row {
  padding: 12px;
  border-radius: 6px;
  background: white;
}

.answer-label {
  font-size: 12px;
  color: #95a5a6;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.answer-text {
  font-size: 18px;
  color: #2c3e50;
  font-weight: 500;
}

.correct-answer {
  font-size: 28px;
  font-weight: 600;
  color: #27ae60;
  margin-bottom: 32px;
}

.feedback-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.feedback-button {
  flex: 1;
  max-width: 200px;
  padding: 16px 24px;
  border: 2px solid #d1d9e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.feedback-button:hover {
  border-color: #3498db;
  background: #f0f8ff;
}

.feedback-button.incorrect {
  border-color: #e74c3c;
  color: #e74c3c;
}

.feedback-button.incorrect:hover {
  background: #fee;
  border-color: #c0392b;
}

.feedback-button.hesitant {
  border-color: #f39c12;
  color: #f39c12;
}

.feedback-button.hesitant:hover {
  background: #fef5e7;
  border-color: #e67e22;
}

.feedback-button.instant {
  border-color: #27ae60;
  color: #27ae60;
}

.feedback-button.instant:hover {
  background: #e8f8f5;
  border-color: #229954;
}

.feedback-button.recommended {
  border-width: 3px;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.no-reviews {
  text-align: center;
  padding: 64px 24px;
  color: #95a6a6;
}

/* Progress Page */
.progress-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.stat-card {
  background: white;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
  text-align: center;
}

.stat-value {
  font-size: 48px;
  font-weight: 600;
  color: #3498db;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #5a6c7d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-description {
  font-size: 12px;
  color: #95a5a6;
  margin-top: 8px;
  line-height: 1.4;
}

.explanation-section {
  background: white;
  padding: 40px;
  border-radius: 12px;
  border: 1px solid #e1e8ed;
}

.explanation-section h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 24px 0;
}

.mastery-levels {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mastery-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.mastery-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

.mastery-icon.recognition {
  background: #fef5e7;
  color: #f39c12;
}

.mastery-icon.comprehension {
  background: #e8f8f5;
  color: #27ae60;
}

.mastery-icon.active {
  background: #ebf5fb;
  color: #3498db;
}

.mastery-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 8px 0;
}

.mastery-content p {
  font-size: 14px;
  color: #5a6c7d;
  margin: 0;
  line-height: 1.6;
}

.loading {
  text-align: center;
  padding: 32px;
  color: #95a5a6;
}

@media (max-width: 768px) {
  .landing-page h1 {
    font-size: 36px;
  }

  .landing-page p {
    font-size: 16px;
  }

  .review-card {
    padding: 48px 24px;
  }

  .review-word {
    font-size: 32px;
  }

  .feedback-buttons {
    flex-direction: column;
  }

  .feedback-button {
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* small view transition rule */
@view-transition { navigation: auto; }

/* Login screen */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
}
.login-card {
  width: 420px;
  max-width: calc(100% - 48px);
  background: var(--card-color, #ffffff);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  text-align: left;
}

#signUpBtn {
  margin-right: 25px;
}
.login-card h2 { margin: 0 0 6px 0; font-size: 20px; }
.login-card .muted { color: #95a6a6; margin: 0 0 16px 0; }
.login-card .form-group { margin-bottom: 12px; }
.login-card .form-group label { font-size: 13px; color: #2c3e50; display:block; margin-bottom:6px; }
.login-card .form-group input { width:100%; padding:10px 12px; border-radius:8px; border:1px solid #d1d9e0; }
.login-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:14px; }
.login-actions .nav-button { background: none; border: 1px solid #d1d9e0; color: #5a6c7d; padding: 16px 48px; border-radius: 8px; font-size: 18px; }
.login-actions .cta-button, .login-actions .nav-button { min-width: 160px; }

