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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #a8edea 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: #333;
}

/* === ДЕКОРАЦИИ === */
.sun-decoration {
  position: fixed;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #ffd700 0%, #ff8c00 70%, transparent 71%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.1); opacity: 1; }
}

.cloud {
  position: fixed;
  font-size: 3rem;
  opacity: 0.5;
  animation: float 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.cloud-1 { top: 10%; left: -100px; animation-duration: 25s; }
.cloud-2 { top: 25%; left: -100px; animation-duration: 30s; animation-delay: 5s; }
.cloud-3 { top: 5%; left: -100px; animation-duration: 22s; animation-delay: 12s; }

@keyframes float {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 200px)); }
}

/* === ЗАГОЛОВОК === */
.hero {
  text-align: center;
  padding: 40px 20px 20px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  color: #d35400;
  text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.2rem;
  color: #7f4a24;
  font-weight: 500;
}

.season-icons {
  font-size: 2rem;
  margin-top: 12px;
  letter-spacing: 12px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* === ТАБЫ === */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 2px solid rgba(211,84,0,0.2);
}

.tab {
  padding: 10px 18px;
  border: 2px solid #d35400;
  border-radius: 25px;
  background: white;
  color: #d35400;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.tab:hover {
  background: #fff3e6;
  transform: translateY(-2px);
}

.tab.active {
  background: #d35400;
  color: white;
  box-shadow: 0 4px 12px rgba(211,84,0,0.4);
}

/* === КОНТЕНТ === */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  text-align: center;
  color: #d35400;
  margin-bottom: 12px;
  font-size: 1.6rem;
}

.hint {
  text-align: center;
  color: #888;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* === КАРТОЧКИ СЛОВ === */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.vocab-card {
  background: white;
  border-radius: 16px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.vocab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  border-radius: 16px 16px 0 0;
}

.vocab-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 24px rgba(211,84,0,0.2);
}

.vocab-card.flipped {
  background: linear-gradient(135deg, #d35400, #e67e22);
  color: white;
}

.vocab-card .emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.vocab-card .english {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.vocab-card .russian {
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.vocab-card.flipped .russian {
  opacity: 1;
}

.vocab-card .tap-hint {
  font-size: 0.7rem;
  color: #bbb;
  margin-top: 6px;
}

.vocab-card.flipped .tap-hint {
  color: rgba(255,255,255,0.6);
}

/* === ФРАЗЫ === */
.phrases-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phrase-card {
  background: white;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s;
  flex-wrap: wrap;
}

.phrase-card:hover {
  transform: translateX(6px);
}

.phrase-en {
  font-size: 1.1rem;
  font-weight: 700;
  color: #d35400;
  flex: 1;
  min-width: 200px;
}

.phrase-ru {
  font-size: 0.95rem;
  color: #666;
  flex: 1;
  min-width: 200px;
  text-align: right;
}

.phrase-icon {
  font-size: 1.4rem;
}

/* === ВИКТОРИНА === */
.quiz-container {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  text-align: center;
}

.quiz-progress {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 16px;
}

.quiz-question {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 24px;
  min-height: 60px;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.quiz-option {
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  color: #333;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.quiz-option:hover {
  border-color: #d35400;
  background: #fff8f0;
}

.quiz-option.correct {
  border-color: #27ae60;
  background: #d5f5e3;
  color: #1a7a3a;
}

.quiz-option.wrong {
  border-color: #e74c3c;
  background: #fadbd8;
  color: #c0392b;
}

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

.quiz-feedback {
  min-height: 30px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-next {
  background: #d35400;
  color: white;
}

.btn-next:hover { background: #c0392b; }

.btn-restart {
  display: block;
  margin: 20px auto;
  background: #3498db;
  color: white;
}

.btn-restart:hover { background: #2980b9; }

.btn-check {
  display: block;
  margin: 20px auto;
  background: #27ae60;
  color: white;
}

.btn-check:hover { background: #229954; }

.quiz-result {
  background: linear-gradient(135deg, #d35400, #e67e22);
  color: white;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  font-size: 1.3rem;
  animation: fadeIn 0.5s;
}

.quiz-result .score-big {
  font-size: 3rem;
  font-weight: 800;
  display: block;
  margin: 10px 0;
}

/* === МЕМОРИ === */
.memory-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  color: #d35400;
  user-select: none;
}

.memory-card:hover {
  transform: scale(1.05);
}

.memory-card.flipped {
  background: white;
  color: #333;
}

.memory-card.matched {
  background: #d5f5e3;
  color: #27ae60;
  cursor: default;
  transform: scale(0.95);
}

.memory-card .card-front {
  font-size: 2rem;
}

.memory-card .card-text {
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.3;
}

/* === ЗАПОЛНИ ПРОПУСК === */
.fill-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fill-item {
  background: white;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  font-size: 1.1rem;
  line-height: 1.6;
  transition: border-color 0.3s;
  border: 2px solid transparent;
}

.fill-item.correct {
  border-color: #27ae60;
  background: #f0fff4;
}

.fill-item.wrong {
  border-color: #e74c3c;
  background: #fdf2f2;
}

.fill-input {
  border: none;
  border-bottom: 2px dashed #d35400;
  background: #fff8f0;
  padding: 4px 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #d35400;
  width: 140px;
  text-align: center;
  border-radius: 6px 6px 0 0;
  outline: none;
  transition: border-color 0.3s;
}

.fill-input:focus {
  border-bottom-color: #2980b9;
  background: #eaf6ff;
}

.fill-input.correct {
  border-bottom-color: #27ae60;
  background: #d5f5e3;
}

.fill-input.wrong {
  border-bottom-color: #e74c3c;
  background: #fadbd8;
}

.fill-score {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #27ae60;
  margin: 16px 0;
  animation: fadeIn 0.4s;
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 30px 20px;
  color: #7f4a24;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

/* === АДАПТИВ === */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.7rem; }
  .subtitle { font-size: 1rem; }
  .tab { padding: 8px 12px; font-size: 0.82rem; }
  .quiz-options { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); }
  .vocab-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
