:root {
  --primary: #1e3a8a;
  --primary-light: #eff6ff;
  --secondary: #0d9488;
  --secondary-light: #f0fdfa;
  --accent: #f59e0b;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-main: #fcfbf9;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --formal-color: #2563eb;
  --informal-color: #d97706;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  padding: 2rem 1rem;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

header {
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 1.9rem;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

h2 {
  font-size: 1.4rem;
  color: #111827;
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h3 {
  font-size: 1.15rem;
  color: #374151;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Callout Box */
.callout {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.callout.tip {
  background: var(--secondary-light);
  border-left-color: var(--secondary);
}

.callout-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #1e293b;
}

/* Comparison Grid (Formal vs Informal) */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (max-width: 640px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.card.formal {
  border-top: 4px solid var(--formal-color);
}

.card.informal {
  border-top: 4px solid var(--informal-color);
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.formal .card-tag { color: var(--formal-color); }
.informal .card-tag { color: var(--informal-color); }

/* Phrase Box */
.phrase-box {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.telugu-text {
  font-size: 1.35rem;
  font-weight: 600;
  color: #0f172a;
}

.hindi-pron {
  font-size: 1.15rem;
  font-weight: 600;
  color: #b91c1c; /* Crimson red for high visibility Hindi pronunciation */
  margin: 0.2rem 0;
}

.hindi-meaning {
  font-size: 0.95rem;
  color: #334155;
}

.english-trans {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Vocabulary Table */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.vocab-table th, .vocab-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}

.vocab-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.vocab-table tr:nth-child(even) {
  background: #f8fafc;
}

/* Interactive Quiz Widget */
.quiz-widget {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.quiz-question {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-btn {
  background: #ffffff;
  border: 1.5px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.quiz-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.quiz-btn.correct {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
  font-weight: 600;
}

.quiz-btn.incorrect {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.quiz-feedback.show {
  display: block;
}

/* Practice Dialogue Section */
.dialogue-container {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bubble {
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  max-width: 85%;
  position: relative;
}

.bubble.speaker-a {
  background: #eff6ff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid #bfdbfe;
}

.bubble.speaker-b {
  background: #f0fdf4;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  border: 1px solid #bbf7d0;
}

.speaker-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.speaker-a .speaker-label { color: #1d4ed8; }
.speaker-b .speaker-label { color: #15803d; }

/* Navigation Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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