/* Irregular Verbs Trainer specific styles */

/* ---------- Layout ---------- */
.ivt-section {
  padding: 2rem 0 1rem;
  max-width: 760px;
  margin: 0 auto;
}

.ivt-header .page-title {
  margin-bottom: 0.15rem;
}

.ivt-subtitle-title {
  font-size: 1.5rem !important;
  background: none !important;
  -webkit-text-fill-color: var(--text-secondary) !important;
  color: var(--text-secondary) !important;
  margin-bottom: 0.75rem;
}

/* ---------- Stats bar ---------- */
.ivt-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.ivt-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-secondary);
  padding: 0.6rem 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  min-width: 0;
}

.ivt-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ivt-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

/* ---------- Progress / lives ---------- */
.ivt-progress-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ivt-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ivt-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-full);
  transition: width 0.4s ease, background 0.4s ease;
}

.ivt-life {
  display: flex;
  gap: 0.35rem;
  font-size: 1.25rem;
}

.ivt-heart {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ivt-heart.lost {
  opacity: 0.2;
  transform: scale(0.8);
  filter: grayscale(1);
}

/* ---------- Card ---------- */
.ivt-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.5rem 1.75rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ivt-card.correct {
  animation: ivtCorrect 0.5s ease;
  border-color: var(--success-color);
}

.ivt-card.wrong {
  animation: ivtWrong 0.5s ease;
  border-color: var(--error-color);
}

@keyframes ivtCorrect {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes ivtWrong {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-8px);
  }

  40% {
    transform: translateX(8px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(5px);
  }
}

/* Card top */
.ivt-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.ivt-level-badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ivt-category-badge {
  background: rgba(124, 58, 237, 0.12);
  color: var(--secondary-color);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: auto;
}

[data-theme="dark"] .ivt-level-badge {
  color: #60a5fa;
}

[data-theme="dark"] .ivt-category-badge {
  color: #a78bfa;
}

.ivt-translation {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Base verb */
.ivt-base {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ivt-base-word {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: lowercase;
  letter-spacing: -0.02em;
}

.ivt-audio-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.ivt-audio-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ivt-audio-btn.playing {
  background: var(--primary-color);
  color: #fff;
}

.ivt-audio-icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* Forms */
.ivt-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ivt-form-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.ivt-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.ivt-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-transform: lowercase;
}

.ivt-input::placeholder {
  text-transform: none;
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.7;
}

.ivt-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ivt-input.correct {
  border-color: var(--success-color);
  background: rgba(16, 185, 129, 0.08);
}

.ivt-input.wrong {
  border-color: var(--error-color);
  background: rgba(239, 68, 68, 0.08);
}

.ivt-input:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.ivt-input-hint {
  font-size: 0.8rem;
  color: var(--primary-color);
  min-height: 1rem;
  font-weight: 600;
}

/* Feedback */
.ivt-feedback {
  text-align: center;
  min-height: 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.ivt-feedback.success {
  color: var(--success-color);
}

.ivt-feedback.error {
  color: var(--error-color);
}

.ivt-feedback.info {
  color: var(--primary-color);
}

/* Actions */
.ivt-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ivt-actions .btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
}

.ivt-secondary-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* Info section */
.ivt-info {
  padding: 3rem 0 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .ivt-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .ivt-base-word {
    font-size: 2.4rem;
  }

  .ivt-forms {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .ivt-input {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .ivt-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .ivt-stat-value {
    font-size: 1.05rem;
  }

  .ivt-card {
    padding: 1.15rem 1rem 1.4rem;
  }

  .ivt-base-word {
    font-size: 2rem;
  }

  .ivt-audio-btn {
    width: 38px;
    height: 38px;
  }

  .ivt-actions {
    flex-direction: column;
  }

  .ivt-actions .btn {
    width: 100%;
  }

  .ivt-secondary-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .ivt-card-top {
    gap: 0.5rem;
  }

  .ivt-category-badge {
    margin-left: 0;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .ivt-card,
  .ivt-card.correct,
  .ivt-card.wrong,
  .ivt-progress-fill,
  .ivt-input,
  .ivt-heart,
  .ivt-audio-btn {
    animation: none !important;
    transition: none !important;
  }
}