/*
  Luminous Learning V1
  Stitch layout translated to local HTML5 + Tailwind-friendly components.
*/

:root {
  --color-primary: #3498db;
  --color-primary-deep: #006397;
  --color-secondary: #f1c40f;
  --color-tertiary: #e67e22;
  --color-success: #27ae60;
  --color-error: #ba1a1a;
  --surface: #f7f9ff;
  --surface-low: #edf4ff;
  --surface-card: #ffffff;
  --surface-blue: #e3efff;
  --surface-blue-strong: #d1e4fb;
  --text: #091d2e;
  --muted: #3f4850;
  --line: #bfc7d2;
  --shadow: 0 12px 30px rgba(0, 99, 151, 0.15);
  --shadow-soft: 0 4px 12px rgba(0, 99, 151, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(52, 152, 219, 0.18), transparent 32rem),
    linear-gradient(180deg, #f7f9ff 0%, #edf4ff 100%);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(52, 152, 219, 0.45);
  outline-offset: 3px;
}

.font-display {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.font-label {
  font-family: "Lexend", system-ui, sans-serif;
}

.app-shell {
  width: min(100% - 32px, 1140px);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(191, 199, 210, 0.7);
  background: rgba(247, 249, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.friendly-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-card);
  box-shadow: var(--shadow-soft);
}

.interactive-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.interactive-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(52, 152, 219, 0.65);
  box-shadow: var(--shadow);
}

.interactive-card:active,
.active-press:active {
  transform: translateY(2px) scale(0.98);
}

.card-accent::after {
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--color-secondary);
  content: "";
}

.gradient-primary {
  background: linear-gradient(180deg, #52aee9 0%, var(--color-primary) 100%);
}

.gradient-sun {
  background: linear-gradient(180deg, #ffe27a 0%, var(--color-secondary) 100%);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.badge-primary {
  background: var(--color-primary);
  color: white;
}

.badge-sun {
  background: #fed023;
  color: #574500;
}

.btn-primary,
.btn-secondary,
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Lexend", system-ui, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn-primary {
  background: linear-gradient(180deg, #52aee9 0%, var(--color-primary) 100%);
  color: white;
  box-shadow: 0 10px 20px rgba(52, 152, 219, 0.22);
}

.btn-secondary {
  border: 2px solid #fed023;
  background: white;
  color: var(--text);
}

.btn-icon {
  width: 44px;
  padding: 0;
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-icon:hover {
  transform: translateY(-2px);
}

.hero-panel {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #e3efff 58%, #ffeeb0 100%);
  box-shadow: var(--shadow);
}

.unit-art {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 20px;
  background: var(--surface-blue);
}

.unit-art img,
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 4px solid #fed023;
}

.bottom-nav {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 24px rgba(0, 99, 151, 0.12);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 62px;
  border-radius: 20px;
  color: var(--muted);
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 12px;
  text-decoration: none;
}

.bottom-nav a.active {
  background: #fed023;
  color: #574500;
}

.progress-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9eaff;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fed023 0%, #ffb783 100%);
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 10px 12px;
  cursor: pointer;
}

.choice:hover {
  background: var(--surface-low);
}

.feedback {
  display: none;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  font-weight: 800;
}

.feedback.show {
  display: block;
}

.feedback.success {
  background: #dff7e9;
  color: #0b6b35;
}

.feedback.error {
  background: #ffdad6;
  color: #93000a;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1140px);
  }

  .hero-panel {
    border-radius: 22px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .bottom-nav {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }
}
