/* TeachWave AI — Upgraded style.css
   Ultra-clean Glassmorphism, mobile-perfect UX, fixed-width no-scroll
*/

/* RESET + GLOBAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

:root {
  --bg-a: #f3f6ff;
  --bg-b: #fbf7ff;
  --accent1: #4b00ff;
  --accent2: #00d4ff;
  --glass: rgba(255,255,255,0.55);
  --muted: #6b6b7a;
  --card-shadow: 0 12px 40px rgba(12,12,30,0.06);
}

body {
  background: linear-gradient(135deg, var(--bg-a), var(--bg-b));
  color: #0f1720;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* REMOVE ALL LINK UNDERLINES */
a, a:visited, a:hover {
  text-decoration: none !important;
}

/* NAVBAR */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.48);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

/* LOGO */
.logo {
  font-weight: 700;
  color: var(--accent1);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* NAV LINKS (DESKTOP) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: #1b1b1f;
  font-weight: 600;
  opacity: 0.95;
  position: relative;
}

/* REMOVE THE UNDERLINE BUT KEEP HOVER GLOW */
.nav-links a:hover {
  opacity: 1;
  color: var(--accent1);
}

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 26px;
  height: 3px;
  border-radius: 6px;
  background: var(--accent1);
}

/* HERO */
.hero {
  display: flex;
  gap: 2rem;
  padding: 3.2rem 1.6rem;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  max-width: 720px;
  animation: fadeIn 0.8s ease;
}

.hero-content h1 {
  font-size: 2.2rem;
  color: var(--accent1);
  margin-bottom: 0.6rem;
}

.hero-content p {
  color: #24303a;
  margin-bottom: 1rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* BUTTONS */
.cta {
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.cta.primary {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: white;
  box-shadow: 0 12px 34px rgba(75,0,255,0.12);
}

.cta:hover {
  transform: translateY(-4px);
  transition: transform .18s;
}

/* MAIN GRID */
main {
  padding: 1.6rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: flex-start;
}

.card {
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: var(--card-shadow);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.35);
}

/* FORM */
.lesson-form h2 {
  font-size: 1.4rem;
  color: var(--accent1);
  margin-bottom: 1rem;
}

form .form-row {
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #111;
}

input, select, textarea {
  padding: 0.72rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.9);
}

textarea { min-height: 96px; resize: vertical; }

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* ACTION BUTTONS (SAVE + PDF BLURRED) */
.actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
}

.blur-btn {
  filter: blur(2px);
  opacity: 0.4;
  pointer-events: none;
}

.big {
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-weight: 800;
  background: linear-gradient(90deg,var(--accent1),var(--accent2));
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px rgba(75,0,255,0.12);
}

/* OUTPUT */
.output-section h2 {
  font-size: 1.4rem;
  color: var(--accent1);
  margin-bottom: 1rem;
}

.output-card {
  min-height: 160px;
  padding: 1.4rem;
  white-space: pre-wrap;
  line-height: 1.45;
}

/* SAVED LIST */
.saved-plans {
  position: sticky;
  top: 120px;
  align-self: start;
}

#savedList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 60vh;
  overflow: auto;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {

  /* collapse nav */
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(16px);
    padding: 1rem;
    position: absolute;
    top: 80px;
    right: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    animation: fadeIn .4s ease;
  }

  .nav-links.show {
    display: flex;
  }

  /* collapse layout */
  main {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

}

.hero-image img {
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}








/* Smooth fade-in for pages */
.fade-in {
  animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===========================
   BUTTONS — FIXED + BEAUTIFUL
=========================== */
button,
.action-btn {
  display: inline-block;
  padding: 12px 20px;
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4da3ff, #0077ff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.25);
}

button:hover,
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 119, 255, 0.3);
}

button:active {
  transform: scale(0.97);
}

/* Ghost/Secondary Button */
.btn-ghost {
  background: transparent;
  color: #0077ff;
  border: 2px solid #0077ff;
  box-shadow: none;
}

.btn-ghost:hover {
  background: #e8f2ff;
}

/* ===========================
   INPUTS
=========================== */
input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.8px solid #d9dce1;
  outline: none;
  font-size: 16px;
  background: #fafbff;
  transition: 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: #4da3ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.15);
}

/* ===========================
   BLUR SECTIONS — FIXED
=========================== */
.blur-box {
  filter: blur(5px);
  pointer-events: none;
  opacity: 0.6;
}

.blur-overlay {
  position: relative;
}

.blur-overlay::after {
  content: "Hidden";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-weight: bold;
  color: #555;
  border-radius: 12px;
}

/* ===========================
   CARDS
=========================== */
.card {
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  margin: 20px 0;
  transition: 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

/* ===========================
   NAVBAR OR TOP BAR (Optional)
=========================== */
.navbar {
  width: 100%;
  padding: 15px 25px;
  margin-bottom: 25px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 5px 25px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 20px;
  font-weight: 700;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  button { width: 100%; }
  .container { padding: 20px; }
}

/* ===========================
   FIX: TOP BAR LAYOUT + HAMBURGER OVERLAP
=========================== */

/* Wrap your top tools (dropdown, dr, cr fields) properly */
.top-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

/* Force small elements not to expand uncontrollably */
.top-controls select,
.top-controls input {
  width: auto;
  min-width: 120px;
}

/* Make sure the hamburger stays on top */
.hamburger {
  position: relative;
  z-index: 20;
  cursor: pointer;
}

/* Ensure nothing covers the hamburger */
.navbar,
.top-controls {
  position: relative;
  z-index: 10;
}

/* If the dropdown was blocking clicks */
select, input {
  pointer-events: auto !important;
}

/* Fix dropdown so it never overlaps outside */
select {
  max-width: 160px;
}
