/* ============== AWS SAA-C03 Master Prep — Main Styles ============== */
:root {
  --aws-orange: #FF9900;
  --aws-orange-dark: #EC7211;
  --aws-navy: #232F3E;
  --aws-navy-light: #37475A;
  --aws-blue: #146EB4;
  --aws-blue-dark: #0E5A94;
  --aws-green: #1D8102;
  --aws-red: #D13212;
  --aws-yellow: #F2C94C;

  --bg: #F8F9FB;
  --bg-card: #FFFFFF;
  --bg-elev: #FFFFFF;
  --text: #1A1F2B;
  --text-muted: #5A6478;
  --text-light: #8A93A6;
  --border: #E3E6EE;
  --border-strong: #C5CCDB;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 14px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all .2s ease;
}

[data-theme="dark"] {
  --bg: #0E141B;
  --bg-card: #161E2A;
  --bg-elev: #1F2937;
  --text: #ECEEF3;
  --text-muted: #9BA5B8;
  --text-light: #6B7589;
  --border: #2A3441;
  --border-strong: #3E4A5C;
  --shadow: 0 4px 14px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

code, pre {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ============== TOP BAR ============== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--aws-navy);
  color: white;
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(255, 153, 0, 0.35));
}
.logo svg { width: 42px; height: 42px; display: block; }
.brand-text h1 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.brand-text span { font-size: 11px; color: #B0BEC5; text-transform: uppercase; letter-spacing: 1px; }

.topbar-actions { display: flex; align-items: center; gap: 16px; }

.progress-bar-wrapper { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.progress-label { font-size: 11px; color: #B0BEC5; text-transform: uppercase; letter-spacing: .5px; }
.progress-label span { color: var(--aws-orange); font-weight: 700; }
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,.12);
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aws-orange), var(--aws-yellow));
  width: 0;
  transition: width .5s ease;
  border-radius: 100px;
}

.btn-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: rgba(255,153,0,.25); border-color: var(--aws-orange); }

/* ============== LAYOUT ============== */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 64px);
}

/* ============== SIDEBAR ============== */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  overflow-y: auto;
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
}

.sidebar-section { margin-bottom: 18px; }
.sidebar-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-light);
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.nav-item:hover { background: rgba(255,153,0,.08); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(255,153,0,.15), transparent);
  color: var(--aws-orange);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px; bottom: 6px;
  width: 3px;
  background: var(--aws-orange);
  border-radius: 3px;
}
.nav-item.completed::after {
  content: '✓';
  margin-left: auto;
  color: var(--aws-green);
  font-weight: 700;
}
.nav-item.locked {
  opacity: .45;
  cursor: not-allowed;
}
.nav-item.locked::after {
  content: '🔒';
  margin-left: auto;
  font-size: 11px;
}

/* ============== CONTENT ============== */
.content { padding: 36px 48px; max-width: 1280px; margin: 0 auto; width: 100%; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .4s ease; }

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

/* ============== HERO ============== */
.hero {
  text-align: center;
  padding: 50px 24px 30px;
  background: linear-gradient(135deg, rgba(255,153,0,.08), rgba(20,110,180,.06));
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
  border: 1px solid var(--border);
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 14px;
  line-height: 1.15;
}
.accent { background: linear-gradient(90deg, var(--aws-orange), var(--aws-yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17px; color: var(--text-muted); max-width: 720px; margin: 0 auto 30px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 720px; margin: 0 auto 30px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 32px; font-weight: 800; color: var(--aws-orange); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; }

.btn-primary {
  background: linear-gradient(135deg, var(--aws-orange), var(--aws-orange-dark));
  color: white;
  border: none;
  padding: 14px 30px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,153,0,.4);
  transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(255,153,0,.55); }
.btn-large { font-size: 17px; padding: 16px 36px; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border-strong);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--aws-orange); color: var(--aws-orange); }

/* ============== EXAM INFO GRID ============== */
.exam-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.info-card ul, .info-card ol { padding-left: 18px; font-size: 13.5px; color: var(--text-muted); }
.info-card li { margin-bottom: 6px; }
.info-card strong { color: var(--text); }

.domain-row { margin-bottom: 10px; }
.domain-row > span { font-size: 13px; display: block; margin-bottom: 4px; }
.bar { height: 22px; background: var(--border); border-radius: 4px; overflow: hidden; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--aws-orange), var(--aws-orange-dark));
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px;
  border-radius: 4px;
}

.trend-list { list-style: none !important; padding-left: 0 !important; }
.trend-list li { padding: 4px 0; font-size: 13px; }

/* ============== LEARNING PATH ============== */
.learning-path h2 { font-size: 26px; margin-bottom: 20px; font-weight: 700; }

.path-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.path-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.path-card:hover:not(.locked) {
  transform: translateY(-3px);
  border-color: var(--aws-orange);
  box-shadow: var(--shadow);
}
.path-card.completed {
  background: linear-gradient(135deg, rgba(29,129,2,.06), transparent);
  border-color: rgba(29,129,2,.3);
}
.path-card.locked {
  opacity: .55;
  cursor: not-allowed;
  background: var(--border);
}
.path-card .module-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--aws-orange);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.path-card h4 { font-size: 15px; font-weight: 700; margin: 6px 0 8px; }
.path-card p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.path-card .meta { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-light); }
.path-card .status-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 16px;
}

/* ============== MODULE VIEW ============== */
.module-header {
  background: linear-gradient(135deg, var(--aws-navy), var(--aws-navy-light));
  color: white;
  padding: 32px 36px;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.module-header::before {
  content: '';
  position: absolute;
  right: -50px; top: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,153,0,.25), transparent 70%);
  border-radius: 50%;
}
.module-header .module-tag { font-size: 12px; color: var(--aws-orange); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.module-header h1 { font-size: 34px; margin: 6px 0 10px; font-weight: 800; letter-spacing: -.8px; }
.module-header p { color: rgba(255,255,255,.85); font-size: 15px; max-width: 760px; }
.module-meta { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.module-meta span {
  background: rgba(255,255,255,.1);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.section-block { margin-bottom: 34px; }
.section-block h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.5px;
  display: flex; align-items: center; gap: 12px;
}
.section-block h2::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--aws-orange);
  border-radius: 4px;
}
.section-block h3 { font-size: 19px; font-weight: 700; margin: 18px 0 10px; color: var(--aws-navy); }
[data-theme="dark"] .section-block h3 { color: var(--aws-orange); }
.section-block h4 { font-size: 15.5px; font-weight: 600; margin: 14px 0 8px; }
.section-block p { font-size: 15px; margin-bottom: 12px; color: var(--text-muted); }
.section-block ul, .section-block ol { padding-left: 22px; margin-bottom: 14px; font-size: 14.5px; color: var(--text-muted); }
.section-block li { margin-bottom: 6px; }
.section-block strong { color: var(--text); font-weight: 600; }

.analogy-box {
  background: linear-gradient(135deg, rgba(255,153,0,.07), rgba(242,201,76,.05));
  border-left: 4px solid var(--aws-orange);
  padding: 18px 22px;
  border-radius: 8px;
  margin: 18px 0;
}
.analogy-box .label {
  display: inline-block;
  background: var(--aws-orange);
  color: white;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 8px;
}
.analogy-box p { font-size: 14.5px; color: var(--text); margin-bottom: 0; }

.tech-box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 4px solid var(--aws-blue);
  padding: 18px 22px;
  border-radius: 8px;
  margin: 18px 0;
}
.tech-box .label {
  display: inline-block;
  background: var(--aws-blue);
  color: white;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 8px;
}

.exam-tip {
  background: rgba(242,201,76,.12);
  border-left: 4px solid var(--aws-yellow);
  padding: 14px 20px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
}
.exam-tip::before { content: '⚡ Exam Tip: '; font-weight: 700; color: #B7960E; }

.warning {
  background: rgba(209,50,18,.08);
  border-left: 4px solid var(--aws-red);
  padding: 14px 20px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
}
.warning::before { content: '⚠️ Watch Out: '; font-weight: 700; color: var(--aws-red); }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-table th {
  background: var(--aws-navy);
  color: white;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.comparison-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: rgba(0,0,0,.02); }
[data-theme="dark"] .comparison-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }

pre.code {
  background: var(--aws-navy);
  color: #e8e8e8;
  padding: 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 12px 0;
}
code.inline {
  background: rgba(255,153,0,.15);
  color: var(--aws-orange-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.diagram svg { max-width: 100%; height: auto; }
.diagram-caption { font-size: 13px; color: var(--text-muted); margin-top: 12px; font-style: italic; }

/* ============== MODAL ============== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 540px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
.modal h2 { font-size: 28px; margin-bottom: 12px; }
.modal p { color: var(--text-muted); margin-bottom: 22px; }
.modal-buttons { display: flex; gap: 12px; justify-content: center; }

/* ============== TOAST ============== */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--aws-navy);
  color: white;
  padding: 14px 24px;
  border-radius: 100px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  transition: all .35s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============== UTIL ============== */
.lead { font-size: 17px; color: var(--text-muted); margin-bottom: 24px; max-width: 720px; }

.btn-group { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

.scroll-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 44px; height: 44px;
  background: var(--aws-orange);
  color: white;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 22px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.scroll-top.show { display: block; }

/* Responsive */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; max-height: 280px; }
  .hero h1 { font-size: 32px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 24px 18px; }
}
