/* German A1 Flashcards - Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  min-height: 100vh;
  color: #1a1a2e;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  padding: 20px 0;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  background: linear-gradient(90deg, #7c3aed, #059669);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.stat {
  background: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  text-align: center;
  min-width: 80px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-num {
  font-size: 1.6rem;
  font-weight: bold;
  color: #059669;
}

.stat-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #fff;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tab:hover {
  background: #f1f5f9;
  color: #7c3aed;
}

.tab.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Progress Bar */
.progress {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #10b981);
  transition: width 0.3s ease;
  border-radius: 3px;
}

/* Flashcard */
.card {
  background: #fff;
  border-radius: 24px;
  padding: 40px 30px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.card.flipped .front {
  display: none;
}

.card.flipped .back {
  display: flex;
}

.front {
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  display: flex;
}

.back {
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  display: none;
}

/* Word Display */
.word {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: -0.5px;
  color: #1a1a2e;
}

.article {
  font-size: 1.3rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.article.der {
  color: #60a5fa;
}

.article.die {
  color: #f472b6;
}

.article.das {
  color: #4ade80;
}

.meaning {
  font-size: 2.2rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 20px;
}

.example {
  font-size: 1rem;
  font-style: italic;
  color: #64748b;
  line-height: 1.5;
  max-width: 90%;
  text-align: center;
}

.pronunciation {
  font-size: 1.2rem;
  font-style: italic;
  color: #94a3b8;
  margin-top: 10px;
}

/* Card Labels */
.type {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #ede9fe;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.streak {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.hint {
  color: #94a3b8;
  font-size: 0.9rem;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
}

/* Buttons */
.buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 80px;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-interval {
  display: block;
  font-size: 0.7rem;
  font-weight: normal;
  opacity: 0.8;
  margin-top: 2px;
}

.btn-again {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-hard {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}

.btn-good {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.btn-easy {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

/* Article Quiz */
.quiz-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 25px;
}

.quiz-btn {
  padding: 18px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 1.3rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-btn:hover {
  background: #f8fafc;
}

.quiz-btn.der {
  border-color: #60a5fa;
}

.quiz-btn.der:hover {
  background: rgba(96, 165, 250, 0.2);
}

.quiz-btn.die {
  border-color: #f472b6;
}

.quiz-btn.die:hover {
  background: rgba(244, 114, 182, 0.2);
}

.quiz-btn.das {
  border-color: #4ade80;
}

.quiz-btn.das:hover {
  background: rgba(74, 222, 128, 0.2);
}

.quiz-btn.correct {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.3) !important;
  animation: pulse-green 0.3s ease;
}

.quiz-btn.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.3) !important;
  animation: shake 0.3s ease;
}

.quiz-btn:disabled {
  cursor: default;
}

@keyframes pulse-green {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Browse View */
.search {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1a1a2e;
  font-size: 1rem;
  margin-bottom: 15px;
  transition: border-color 0.2s ease;
}

.search:focus {
  outline: none;
  border-color: #8b5cf6;
}

.search::placeholder {
  color: #94a3b8;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter:hover {
  border-color: #8b5cf6;
  color: #7c3aed;
}

.filter.active {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: #fff;
}

.word-list {
  max-height: 500px;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.word-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.word-item:hover {
  background: #f8fafc;
}

.word-item .german {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1a1a2e;
}

.word-item .german .art {
  color: #64748b;
  font-weight: normal;
  margin-right: 4px;
}

.word-item .english {
  color: #64748b;
  font-size: 0.9rem;
}

/* Empty State */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* Settings */
.settings {
  margin-top: 40px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.settings h3 {
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 0.9rem;
}

.setting-row:last-child {
  border-bottom: none;
}

.reset-btn {
  padding: 6px 12px;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.toggle {
  width: 50px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle.active {
  background: #8b5cf6;
}

.toggle::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle.active::after {
  transform: translateX(22px);
}

/* Scrollbar */
.word-list::-webkit-scrollbar {
  width: 8px;
}

.word-list::-webkit-scrollbar-track {
  background: transparent;
}

.word-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.word-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .word {
    font-size: 2.2rem;
  }

  .card {
    padding: 25px 20px;
    min-height: 250px;
  }

  .quiz-options {
    gap: 8px;
  }

  .quiz-btn {
    padding: 14px 8px;
    font-size: 1.1rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-width: 70px;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    padding: 10px 16px;
  }
}

/* Hide view helper */
.hidden {
  display: none !important;
}
