/* =========================================
   German Modal Verbs – Components
   ========================================= */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: rgba(13, 115, 119, 0.06);
}

.btn-accent {
  background: var(--accent);
  color: #1f2937;
}

.btn-accent:hover {
  background: #e6951a;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-a1 { background: #dcfce7; color: #166534; }
.badge-a2 { background: #dbeafe; color: #1e40af; }
.badge-b1 { background: #fef3c7; color: #92400e; }
.badge-b2 { background: #fce7f3; color: #9d174d; }
.badge-c1 { background: #f3e8ff; color: #6b21a8; }

/* Progress */
.progress-wrap {
  margin: 0.75rem 0;
}

.progress-bar {
  width: 100%;
  height: 0.75rem;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  width: 0%;
  transition: width 0.5s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* Stars */
.stars {
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* Forms */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.15);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 320px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.info { background: var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

/* =========================================
   Learn Hub & Dedicated Learn Pages
   ========================================= */

/* Verb card hub on learn.html (no dropdowns) */
.verb-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.verb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.verb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.12), 0 6px 8px -3px rgba(0, 0, 0, 0.06);
}

.verb-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.25rem;
}

.verb-card-meaning {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-bottom: 0.75rem;
}

.verb-example {
  font-style: italic;
  color: var(--text);
  margin: 0 0 1rem;
  flex-grow: 1;
}

.verb-example span {
  color: var(--muted);
  font-style: normal;
  display: block;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.verb-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.level-pill:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Student path banner */
.student-path {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.student-path strong {
  color: var(--primary);
}

.student-path .arrow {
  color: var(--accent);
  font-weight: 700;
}

/* Dedicated learn page sections */
.learn-pattern .pattern-box {
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
}

.example-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.example-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.example-item em {
  font-size: 1.05rem;
  color: var(--text);
}

.example-en {
  color: var(--muted);
  font-size: 0.9rem;
  display: block;
  margin-top: 0.2rem;
}

.focus-form .changed-form {
  color: var(--primary);
}

.quick-check {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.quick-check summary {
  font-weight: 600;
  color: var(--primary);
}

.test-card {
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 100%);
  border-color: var(--secondary);
}

.test-card .card-title {
  color: var(--primary-dark);
}
