/* Agentic Software Developer Course — Modern UI Refresh (2026-10-19) */
/* Fonts vendored locally for offline use (Padauk/Inter/Fira Code) */
@import url('../vendor/fonts/fonts-local.css');

:root {
  --font-sans: 'Inter', 'Padauk', 'Pyidaungsu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Modern palette — deep navy + violet/fuchsia/cyan */
  --bg: #070b16;
  --bg-card: #0d1424;
  --bg-elev: #141d33;
  --border: rgba(148, 163, 184, 0.14);
  --border-soft: rgba(148, 163, 184, 0.08);
  --primary: #8b5cf6;
  --primary-deep: #7c3aed;
  --primary-soft: rgba(139, 92, 246, 0.14);
  --fuchsia: #d946ef;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --text: #f1f5f9;
  --text-body: #dbe4f3;
  --text-muted: #9fb0c8;
  --text-faint: #6b7d99;

  /* legacy aliases */
  --primary-dark: #7c3aed;
  --bg-dark: #070b16;
  --card-dark: #0d1424;
  --border-dark: #1e2a44;
  --text-main: #f1f5f9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  /* Rich modern backdrop: deep navy with ambient violet/cyan glows */
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(56rem 30rem at 12% -6%, rgba(139, 92, 246, 0.13), transparent 62%),
    radial-gradient(48rem 26rem at 88% -4%, rgba(34, 211, 238, 0.09), transparent 62%),
    radial-gradient(44rem 30rem at 50% 112%, rgba(217, 70, 239, 0.06), transparent 60%) !important;
  background-attachment: fixed;
  color: var(--text);
  /* Burmese-script-friendly reading rhythm */
  line-height: 1.9;
  letter-spacing: 0; /* never negative: breaks Myanmar stacked rendering */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

/* Accessible keyboard focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.375rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0f1d;
}
::-webkit-scrollbar-thumb {
  background: #26334f;
  border-radius: 8px;
  border: 2px solid #0a0f1d;
}
::-webkit-scrollbar-thumb:hover {
  background: #35466a;
}

/* ---------- Modern utilities ---------- */

/* Gradient display text (hero titles, section headers) */
.grad-text {
  background: linear-gradient(100deg, #c4b5fd 0%, #f0abfc 48%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Modern gradient button */
.btn-modern {
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 55%, #d946ef 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(168, 85, 247, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-modern:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 32px -8px rgba(168, 85, 247, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-modern:active {
  transform: translateY(0);
}

/* Glassmorphism Cards */
.glass-card {
  background: linear-gradient(180deg, rgba(20, 29, 51, 0.72), rgba(13, 20, 36, 0.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -24px rgba(0, 0, 0, 0.7);
}

.glass-card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}
.glass-card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 22px 44px -18px rgba(139, 92, 246, 0.28);
}

/* Glowing text and borders */
.glow-accent {
  text-shadow: 0 0 22px rgba(34, 211, 238, 0.45);
}
.glow-primary {
  text-shadow: 0 0 22px rgba(139, 92, 246, 0.5);
}
.glow-border {
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.28);
}

/* ---------- Code Blocks ---------- */
pre, code {
  font-family: var(--font-mono);
}

pre {
  background: #05080f !important;
  border: 1px solid #1c2740;
  border-radius: 0.875rem;
  padding: 1.25rem;
  overflow-x: auto;
  position: relative;
  font-size: 0.85rem;
  line-height: 1.75;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.5);
}

:not(pre) > code {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  padding: 0.18rem 0.45rem;
  border-radius: 0.375rem;
  font-size: 0.88em;
  border: 1px solid rgba(139, 92, 246, 0.28);
  white-space: nowrap;
}

/* ---------- Lesson Content Typography (readability-first) ---------- */
.lesson-body {
  max-width: 76ch;
}

.lesson-body > div {
  background: linear-gradient(180deg, rgba(20, 29, 51, 0.82), rgba(12, 18, 34, 0.82)) !important;
  border-color: var(--border) !important;
  box-shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Main reading text: larger, airier, brighter — tuned for Myanmar script */
.lesson-body .leading-relaxed {
  font-size: 0.98rem !important;
  line-height: 2.05 !important;
  color: var(--text-body) !important;
}

.lesson-body h2 {
  font-size: 1.45rem;
  font-weight: 750;
  color: #f8fafc;
  margin-top: 0.25rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.7;
}

.lesson-body h3 {
  font-size: 1.22rem;
  font-weight: 700;
  color: #7dd3fc;
  margin-top: 1.75rem;
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.lesson-body h4 {
  font-size: 1.05rem;
  font-weight: 650;
  color: #e2e8f0;
  margin-top: 1.4rem;
  margin-bottom: 0.6rem;
  line-height: 1.8;
}

.lesson-body p {
  margin-bottom: 1.15rem;
  color: var(--text-body);
  line-height: 2.05;
}

.lesson-body ul, .lesson-body ol {
  margin-bottom: 1.3rem;
  padding-left: 1.6rem;
  color: var(--text-body);
}

.lesson-body li {
  margin-bottom: 0.65rem;
  line-height: 1.95;
  padding-left: 0.25rem;
}

.lesson-body li::marker {
  color: var(--primary);
  font-weight: 700;
}

.lesson-body strong {
  color: #f8fafc;
  font-weight: 650;
}

.lesson-body blockquote {
  border-left: 4px solid var(--primary);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.03));
  padding: 1.1rem 1.35rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 1.6rem 0;
  color: #e8edf7;
  line-height: 2;
}

.lesson-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.9rem;
  line-height: 1.9;
}

.lesson-body th {
  background: rgba(139, 92, 246, 0.12);
  color: #ede9fe;
  font-weight: 650;
  text-align: left;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
}

.lesson-body td {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-soft);
  color: var(--text-body);
}

.lesson-body tr:nth-child(even) td {
  background: rgba(148, 163, 184, 0.04);
}

/* ---------- Animations ---------- */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 2s infinite ease-in-out;
}

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

.lesson-body > div {
  animation: fadeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lesson-body > div:nth-child(2) { animation-delay: 0.06s; }
.lesson-body > div:nth-child(3) { animation-delay: 0.12s; }
.lesson-body > div:nth-child(4) { animation-delay: 0.18s; }
.lesson-body > div:nth-child(5) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .lesson-body > div {
    animation: none;
  }
  .animate-pulse-glow {
    animation: none;
  }
}

/* ---------- Certificate Styles ---------- */
.certificate-frame {
  background: radial-gradient(circle at 50% 50%, #141d33 0%, #070b16 100%);
  border: 8px double #7c3aed;
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.35), inset 0 0 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

.certificate-border-ornament {
  border: 1px solid rgba(196, 181, 253, 0.22);
  margin: 12px;
  height: calc(100% - 24px);
}

@media print {
  body * {
    visibility: hidden;
  }
  #certificateModal, #certificateModal * {
    visibility: visible;
  }
  #certificateModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: white !important;
    color: black !important;
  }
  .certificate-frame {
    background: white !important;
    color: black !important;
    border: 6px double #333 !important;
    box-shadow: none !important;
  }
  .no-print {
    display: none !important;
  }
}

/* ---------- Small screens: keep Burmese text comfortable ---------- */
@media (max-width: 640px) {
  body {
    line-height: 1.95;
  }
  .lesson-body .leading-relaxed {
    font-size: 0.94rem !important;
  }
  pre {
    font-size: 0.78rem;
    padding: 1rem;
  }
}
