/* Component Styles for German A1 App */

/* Header & Top Bar */
.app-header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 16px;
  max-width: var(--max-width-desktop);
  margin: 0 auto;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  color: var(--accent-yellow);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  background: var(--surface-hover);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.nav-back-btn:hover {
  background: #333;
}

.header-auth-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface-hover);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Cards & Surfaces */
.card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.card-interactive {
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--accent-yellow);
  box-shadow: var(--shadow-md);
}

/* Progress Bar */
.progress-container {
  width: 100%;
  background: #2A2A2A;
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-yellow);
  width: 0%;
  transition: width 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  min-height: 44px;
}

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

.btn-primary:hover {
  background-color: #E6BE00;
}

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

.btn-secondary:hover {
  background-color: #333333;
}

.btn-danger {
  background-color: var(--accent-red);
  color: #FFFFFF;
}

/* Tabs */
.tabs-nav {
  display: flex;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.tabs-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tab-btn {
  padding: 14px 20px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-yellow);
  border-bottom-color: var(--accent-yellow);
}

/* Lesson Cards & Content */
.chapter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 20px;
}

.chapter-number {
  color: var(--accent-yellow);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chapter-title-de {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.chapter-title-bn {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Vocabulary List */
.vocab-card {
  background: var(--surface-color);
  border-left: 4px solid var(--accent-yellow);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.vocab-de {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-yellow);
}

.vocab-bn {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-top: 4px;
}

.vocab-example {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}

/* Grammar Block */
.grammar-block {
  background: var(--surface-color);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.grammar-title {
  font-size: 1.25rem;
  color: var(--accent-yellow);
  margin-bottom: 10px;
}

.grammar-explanation {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 14px;
  line-height: 1.7;
}

.example-box {
  background: #141414;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border-left: 3px solid var(--accent-yellow);
}

.example-de {
  font-weight: 600;
  color: var(--text-primary);
}

.example-bn {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Dialogue Bubble */
.dialogue-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialogue-bubble {
  background: var(--surface-color);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  max-width: 85%;
  border: 1px solid var(--border-color);
}

.dialogue-bubble.speaker-a {
  align-self: flex-start;
  border-left: 4px solid var(--accent-yellow);
}

.dialogue-bubble.speaker-b {
  align-self: flex-end;
  background: #252525;
  border-right: 4px solid var(--text-primary);
}

.dialogue-speaker {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-yellow);
  margin-bottom: 4px;
}

.dialogue-de {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dialogue-bn {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Exercises UI */
.exercise-card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-color);
}

.exercise-question {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.option-btn {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 1rem;
  transition: all 0.2s;
  min-height: 48px;
}

.option-btn:hover {
  background: #333333;
}

.option-btn.selected {
  border-color: var(--accent-yellow);
  background: #2A2500;
}

.option-btn.correct {
  background: #123815;
  border-color: var(--success-color);
  color: #81C784;
}

.option-btn.incorrect {
  background: #3B1215;
  border-color: var(--accent-red);
  color: #E57373;
}

.exercise-feedback {
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}

.feedback-correct {
  background: #123815;
  color: #81C784;
  border: 1px solid var(--success-color);
}

.feedback-incorrect {
  background: #3B1215;
  color: #E57373;
  border: 1px solid var(--accent-red);
}

.input-exercise {
  width: 100%;
  padding: 14px;
  background: #141414;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.input-exercise:focus {
  outline: none;
  border-color: var(--accent-yellow);
}

/* Site Footer */
.site-footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: 24px 16px;
  margin-top: auto;
  text-align: center;
}

.footer-container {
  max-width: var(--max-width-desktop);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-yellow);
}

.footer-copy {
  color: var(--text-disabled);
  font-size: 0.82rem;
}

/* Ad Placement Wrapper */
.ad-container {
  width: 100%;
  margin: 20px 0;
  padding: 12px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.ad-container ins.adsbygoogle {
  margin: 0 auto;
}
