/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #1565C0;
  --primary-dark: #0D47A1;
  --primary-light:#42A5F5;
  --success:      #059669;
  --success-light:#D1FAE5;
  --warning:      #D97706;
  --warning-light:#FEF3C7;
  --danger:       #DC2626;
  --bg:           #F1F5F9;
  --surface:      #FFFFFF;
  --text:         #1E293B;
  --text-muted:   #64748B;
  --border:       #E2E8F0;
  --shadow:       0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
  --radius:       14px;
  --radius-sm:    8px;
  --nav-h:        64px;
  --font:         'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 2rem;
}
.brand {
  font-size: 1.4rem; font-weight: 800;
  color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}
.brand-icon { font-size: 1.5rem; }
.brand-hi   { color: #059669; }
.nav-links  { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav-link   {
  padding: .45rem .9rem; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-muted);
  font-weight: 500; font-size: .9rem;
  transition: background .2s, color .2s;
  display: flex; align-items: center; gap: .35rem;
}
.nav-link:hover, .nav-link.active {
  background: #EFF6FF; color: var(--primary);
}
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; margin-left: auto; }

@media(max-width:680px){
  .nav-toggle { display: block; }
  .nav-links  { display: none; position: absolute; top: var(--nav-h); left:0; right:0;
                background: #fff; flex-direction: column; align-items: stretch;
                border-bottom: 1px solid var(--border); padding: .5rem 1rem; }
  .nav-links.open { display: flex; }
}

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden;
  min-height: 88vh; display: flex; align-items: center;
  background: linear-gradient(135deg,#0D47A1 0%,#1565C0 45%,#1976D2 100%);
}
.hero-bg-anim {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(66,165,245,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(13,71,161,.4) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite alternate;
}
@keyframes pulse { from { opacity:.6; } to { opacity:1; } }

.hero-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 5rem 1.5rem; width: 100%;
  display: flex; align-items: center; gap: 4rem;
}
.hero-text { flex: 1; min-width: 0; }
.badge {
  display: inline-block; background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: .3rem .9rem; font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.9); margin-bottom: 1.2rem; letter-spacing: .03em;
}
.hero-text h1 {
  font-size: clamp(2rem,5vw,3.4rem); font-weight: 800;
  color: #fff; line-height: 1.15; margin-bottom: 1.2rem;
}
.grad-text {
  background: linear-gradient(90deg,#90CAF9,#E3F2FD);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text p {
  color: rgba(255,255,255,.82); font-size: 1.05rem;
  max-width: 520px; margin-bottom: 2rem;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cards {
  display: flex; flex-direction: column; gap: 1rem;
  flex-shrink: 0;
}
@media(max-width:760px){ .hero-cards { display: none; } }

.float-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: .8rem 1.3rem; display: flex; gap: .6rem;
  align-items: center; color: #fff; font-size: .9rem; font-weight: 500;
  animation: floatY 4s ease-in-out infinite;
  backdrop-filter: blur(6px);
}
.fc1 { animation-delay: 0s; }
.fc2 { animation-delay: 1.3s; }
.fc3 { animation-delay: 2.6s; }
@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.4rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .92rem;
  cursor: pointer; border: 2px solid transparent;
  text-decoration: none; transition: all .2s; white-space: nowrap;
}
.btn-lg  { padding: .8rem 1.8rem; font-size: 1rem; }
.btn-full{ width: 100%; justify-content: center; }

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

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #B45309; }

.btn-outline {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

/* ── Container & layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Section headers ── */
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: 2rem; font-weight: 800; color: var(--text); }
.section-head p  { color: var(--text-muted); margin-top: .4rem; font-size: 1.05rem; }

/* ── Features section ── */
.features-section { padding: 5rem 0; background: var(--surface); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feat-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  position: relative; transition: transform .2s, box-shadow .2s;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feat-card.featured {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.feat-badge {
  position: absolute; top: -10px; right: 1.2rem;
  background: #F59E0B; color: #fff;
  font-size: .75rem; font-weight: 700; letter-spacing: .05em;
  padding: .2rem .7rem; border-radius: 999px;
}
.feat-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1.2rem;
}
.feat-card h3 {
  font-size: 1.2rem; font-weight: 700; margin-bottom: .6rem;
}
.feat-card.featured h3, .feat-card.featured p { color: #fff; }
.feat-card p   { color: var(--text-muted); font-size: .93rem; margin-bottom: 1rem; }
.feat-list { list-style: none; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .3rem; }
.feat-list li  { font-size: .87rem; color: var(--text-muted); }
.feat-card.featured .feat-list li { color: rgba(255,255,255,.85); }

/* ── Steps section ── */
.steps-section { padding: 4rem 0; background: var(--bg); }
.steps-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; flex-wrap: wrap;
}
.step-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center;
  flex: 1; min-width: 180px; max-width: 260px;
  border: 1px solid var(--border);
}
.step-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step-card h4 { font-weight: 700; margin-bottom: .4rem; }
.step-card p  { font-size: .88rem; color: var(--text-muted); }
.step-arrow { font-size: 1.8rem; color: var(--primary-light); font-weight: 300; }

/* ── Footer ── */
.footer { background: var(--text); color: rgba(255,255,255,.7); padding: 2.5rem 0 1.5rem; }
.footer-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.footer-brand { font-size: 1.3rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: .4rem; flex-direction: column; align-items: flex-start; }
.footer-brand p { font-size: .85rem; margin-top: .3rem; font-weight: 400; }
.footer-links { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.65); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; text-align: center; font-size: .82rem; }

/* ── Page wrapper (inner pages) ── */
.page-wrapper { min-height: calc(100vh - var(--nav-h)); }
.page-header {
  padding: 3rem 1.5rem; text-align: center; color: #fff;
  position: relative;
}
.page-header h1 { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 800; margin-bottom: .5rem; }
.page-header p  { font-size: 1rem; opacity: .85; max-width: 580px; margin: 0 auto; }
.back-btn {
  position: absolute; top: 1.2rem; left: 1.5rem;
  color: rgba(255,255,255,.8); text-decoration: none;
  font-size: .88rem; font-weight: 500;
  display: flex; align-items: center; gap: .3rem;
  transition: color .2s;
}
.back-btn:hover { color: #fff; }
.page-body { padding: 2.5rem 0 4rem; }

/* ── Card grid ── */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem; align-items: start;
}
.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 2rem; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 1.5rem; color: var(--text);
  padding-bottom: .75rem; border-bottom: 2px solid var(--border);
}

/* ── Forms ── */
.form-group   { margin-bottom: 1.2rem; }
.form-row-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label   { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.form-input   {
  width: 100%; padding: .65rem .9rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: .93rem; font-family: var(--font);
  background: var(--surface); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus  { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,.12); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint  { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }
.required   { color: var(--danger); }
.optional   { color: var(--text-muted); font-weight: 400; }

/* Language toggle */
.lang-toggle { display: flex; gap: .75rem; flex-wrap: wrap; }
.lang-opt {
  flex: 1; min-width: 120px;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer;
  font-size: .9rem; font-weight: 500; transition: all .2s;
  color: var(--text-muted);
}
.lang-opt input { display: none; }
.lang-opt:has(input:checked) { border-color: var(--primary); background: #EFF6FF; color: var(--primary); }
.lang-opt:hover { border-color: var(--primary-light); }

/* Range slider */
.range-input {
  width: 100%; height: 6px; border-radius: 3px;
  accent-color: var(--primary); cursor: pointer;
  margin: .4rem 0;
  border: none; padding: 0;
}
.range-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-muted); }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2.5rem 1.5rem; text-align: center;
  cursor: pointer; transition: all .2s;
  background: var(--bg);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary); background: #EFF6FF;
}
.drop-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.drop-text { font-size: .95rem; color: var(--text); margin-bottom: .3rem; }
.drop-hint { font-size: .8rem; color: var(--text-muted); }
.link-btn  {
  color: var(--primary); text-decoration: underline;
  cursor: pointer; font-weight: 600;
}
.file-info {
  background: #EFF6FF; border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm); padding: .6rem .9rem;
  font-size: .87rem; color: var(--primary); font-weight: 500;
  margin-top: .75rem;
}
.hidden { display: none !important; }

/* Result placeholder */
.result-placeholder {
  text-align: center; padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.placeholder-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }

/* Success banner */
.success-banner {
  display: flex; align-items: flex-start; gap: .8rem;
  background: var(--success-light); border-radius: var(--radius-sm);
  padding: 1rem; margin-bottom: 1rem;
}
.success-icon { font-size: 1.5rem; flex-shrink: 0; }
.success-banner strong { display: block; color: #065F46; font-size: .95rem; }
.success-banner p { color: #047857; font-size: .83rem; margin-top: .15rem; }

/* Info box */
.info-box {
  background: #F0F9FF; border: 1px solid #BAE6FD;
  border-radius: var(--radius-sm); padding: 1rem;
}
.info-box h4 { font-size: .9rem; color: #075985; margin-bottom: .5rem; }
.info-box ul { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.info-box ul li { font-size: .83rem; color: #0369A1; }
.info-box ul li::before { content: "• "; }

/* Slides preview */
.slides-preview { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.slide-item {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: .75rem;
}
.slide-num {
  min-width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.slide-content-preview strong { font-size: .9rem; }
.slide-content-preview em { font-size: .82rem; color: var(--text-muted); display: block; }
.slide-content-preview ul { margin-top: .3rem; padding-left: 1.1rem; font-size: .82rem; color: var(--text-muted); }

/* Lesson plan preview */
.lp-preview { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.lp-section h4 { font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.lp-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.lp-table td { border: 1px solid var(--border); padding: .4rem .6rem; }
.lp-table td:first-child, .lp-table td:nth-child(3) { background: #EFF6FF; font-weight: 600; width: 18%; }
.lp-section ul { padding-left: 1.2rem; font-size: .85rem; color: var(--text-muted); }
.act-item { background: var(--bg); border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .5rem; }
.act-item strong { font-size: .88rem; color: var(--primary); }
.act-time { background: var(--primary); color: #fff; font-size: .73rem; font-weight: 600;
            padding: .1rem .45rem; border-radius: 999px; margin-left: .4rem; }
.act-item ul { margin-top: .4rem; padding-left: 1.2rem; font-size: .82rem; color: var(--text-muted); }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 9999;
}
.toast {
  padding: .75rem 1.2rem; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); max-width: 340px;
  animation: slideIn .3s ease;
}
.toast.success { background: #065F46; color: #fff; }
.toast.error   { background: #7F1D1D; color: #fff; }
.toast.info    { background: var(--primary); color: #fff; }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }

/* ── Loading overlay ── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.loading-box {
  background: #fff; border-radius: var(--radius);
  padding: 2.5rem 3rem; text-align: center; box-shadow: var(--shadow-lg);
}
.spinner {
  width: 52px; height: 52px; margin: 0 auto 1.2rem;
  border: 5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-box p { color: var(--text-muted); font-size: .95rem; }

/* ── Utilities ── */
select.form-input { appearance: auto; }
@media(max-width:640px){
  .form-row-2 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .steps-row .step-arrow { transform: rotate(90deg); }
  .hero-btns { flex-direction: column; }
}
