
/* ===============================
   Pocket Classroom — Light Theme
   Palette from user:
   - Background: #F0EEE8
   - Primary:    #2B4C63  (deep blue)
   - Secondary:  #6F8B9B  (steel blue)
   * Never use:  #B1A496
   Font: Inter
================================= */
:root{
  --bg:#F0EEE8;
  --panel:#FFFFFF;
  --ink:#1f2937;           /* slate-800 */
  --muted:#475569;         /* slate-600 */
  --primary:#2B4C63;       /* deep blue */
  --primary-ink:#ffffff;   /* on primary */
  --accent:#6F8B9B;        /* steel blue */
  --ring:#e5e7eb;          /* slate-200 */
  --shadow:0 12px 30px rgba(31,41,55,.10);
  --radius:18px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:'Inter',system-ui,ui-sans-serif;
  background:#F0EEE8;
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:var(--primary); text-decoration:none; }
.center{ display:grid; place-items:center; }

/* Navbar (frosted) */
.navbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:20px;
  background:rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  color:var(--ink); padding:12px 18px;
  border-bottom:1px solid var(--ring);
}
.logo-area{ display:flex; align-items:center; gap:10px; }
.logo-icon{ width:28px; height:28px; filter:drop-shadow(0 0 6px rgba(107,114,128,.25)); }
.logo-text{ font-weight:800; letter-spacing:.2px; }
.nav-links{ display:flex; flex-wrap:wrap; gap:16px; }
.nav-links .nav-item{ color:#334155; font-weight:600; }
.nav-links .nav-item.active, .nav-links .nav-item:hover{
  color:var(--primary);
  border-bottom:2px solid var(--accent);
}
.nav-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.nav-greeting{ color:#475569; font-size:.95rem; }

/* Sections */
.page-section{
  min-height:100vh; padding:84px 20px 64px;
  opacity:0; transform:translateY(24px);
  animation:fadeUp .7s ease forwards;
}
.hidden{ display:none !important; }
@keyframes fadeUp{ to{ opacity:1; transform:translateY(0);} }

/* Cards & buttons */
.card{
  background: var(--panel);
  border:1px solid var(--ring);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{ transform:translateY(-4px); box-shadow:0 16px 40px rgba(31,41,55,.12); }

.card.wide{ max-width:1100px; margin:0 auto; }
.card.narrow{ max-width:720px; margin:0 auto; }

.btn{
  background:var(--accent); color:#0b1220; border:0;
  padding:10px 18px; border-radius:12px; font-weight:700;
  cursor:pointer; transition:.18s transform, .18s filter, .18s box-shadow;
  box-shadow:0 6px 16px rgba(31,41,55,.10);
}
.btn:hover{ transform:translateY(-2px); filter:brightness(1.03); box-shadow:0 10px 22px rgba(31,41,55,.14); }
.btn.primary{ background:var(--primary); color:var(--primary-ink); }
.btn.ghost{ background:transparent; color:var(--ink); border:1px solid #cbd5e1; }
.btn.subtle{ background:#f8fafc; color:#0f172a; border:1px solid #e5e7eb; }
.btn.small{ padding:7px 12px; font-size:.9rem; }
.btn.large{ padding:12px 22px; }

input, select, textarea{
  width:100%; padding:12px 14px; border-radius:12px;
  border:1px solid #d1d5db; background:#ffffff; color:#0f172a;
  transition:border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus{
  outline:none; border-color:#bcd0db;
  box-shadow:0 0 0 3px rgba(107,145,167,.25);
}
label{ font-weight:700; color:#334155; }
.muted{ color:var(--muted); }
.hint{ margin-top:.5rem; color:var(--muted); }

/* Auth */
.auth-card{
  display:grid; grid-template-columns: 340px 1fr; gap:28px;
  align-items:center;
}
.brand{ color:var(--primary); text-shadow:0 0 8px rgba(43,76,99,.15); }

/* Hero */
.hero{
  display:grid; grid-template-columns: 1.1fr .9fr; gap:36px;
  align-items:center; max-width:1100px; margin:0 auto;
}
.hero-text h1{ font-size:2.6rem; margin-bottom:8px; color:#0f172a; }
.hero-actions{ display:flex; gap:10px; margin-top:12px; }
.floaty{ animation:floatY 3s ease-in-out infinite; }
@keyframes floatY{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }

/* Stats */
.stats{ max-width:1000px; margin:36px auto 0; display:grid; grid-template-columns: repeat(3,1fr); gap:14px; }
.stat{ text-align:center; }
.stat-num{ font-weight:800; font-size:1.8rem; color:var(--primary); }
.stat .card{ background:#ffffff; }

/* Learn grid */
.toolbar{ display:flex; gap:10px; align-items:center; margin:0 auto 16px; background:#ffffff; }
.toolbar input, .toolbar select{ max-width:280px; }
.course-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap:18px; max-width:1100px; margin:0 auto; }
.course-card{
  border:1px solid #e5e7eb; border-radius:16px; padding:18px; text-align:center;
  transition:transform .2s, box-shadow .2s, border-color .2s; background:#ffffff;
  box-shadow:0 6px 16px rgba(31,41,55,.06);
}
.course-card:hover{
  transform:translateY(-6px);
  border-color:#dbe4ea; box-shadow:0 18px 40px rgba(31,41,55,.12);
}
.course-card img{ width:64px; height:64px; margin:0 auto 8px; filter: drop-shadow(0 0 6px rgba(111,139,155,.35)); }
.course-card h3{ font-size:1.1rem; margin:6px 0; color:#0f172a; }
.course-card p{ color:var(--muted); font-size:.95rem; min-height:48px; }
.course-card .card-actions{ display:flex; gap:8px; justify-content:center; margin-top:10px; }

/* Library */
.library-header{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; align-items:center; }
.filters{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.capsule-list{ max-width:1100px; margin:0 auto; display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap:14px; }
.capsule-card{ border:1px solid #e5e7eb; border-radius:16px; padding:16px; background:#ffffff; box-shadow:0 8px 20px rgba(31,41,55,.06); }
.cap-meta{ display:flex; gap:8px; align-items:center; margin:.25rem 0 .5rem; }
.badge{ display:inline-block; font-size:.75rem; padding:3px 8px; border-radius:999px; background:#eef3f6; color:#31556b; }
.empty-state{ text-align:center; color:var(--muted); padding:24px 0; }

/* Quiz */
.quiz-card{ max-width:720px; margin:0 auto; }
.quiz-options{ list-style:none; display:grid; gap:8px; }
.quiz-options li{
  background:#ffffff; padding:12px; border-radius:10px; border:1px solid #e5e7eb; cursor:pointer;
  transition:background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow:0 6px 16px rgba(31,41,55,.06);
}
.quiz-options li:hover{ background:#f8fafc; transform:translateY(-2px); box-shadow:0 10px 22px rgba(31,41,55,.10); }

/* Author */
.author-wrap{ display:grid; grid-template-columns:108px 1fr; gap:16px; align-items:start; }
.author-avatar{ width:108px; height:108px; border-radius:50%; border:3px solid var(--accent); object-fit:cover; }
.role{ color:var(--primary); font-weight:700; }
.chips{ display:flex; gap:8px; margin-top:8px; flex-wrap:wrap; }
.chip{ background:#eef3f6; padding:6px 10px; border-radius:999px; color:#31556b; }
.social{ display:flex; gap:8px; margin-top:10px; }

/* Profile */
.profile-grid{ display:grid; grid-template-columns: 200px 1fr; gap:18px; align-items:start; }
.profile-photo img{ width:120px; height:120px; border-radius:50%; border:3px solid var(--accent); margin:0 auto 8px; }
.saved-message{ display:none; text-align:center; color:var(--primary); font-weight:800; }

/* Modal */
.modal::backdrop{ background:rgba(15,23,42,.35); }
.modal .modal-content{ background:var(--panel); border-radius:14px; box-shadow:var(--shadow); padding:22px; width:min(560px,94vw); border:1px solid var(--ring); }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:10px; }

/* Footer */
.footer{ text-align:center; padding:18px; background:transparent; color:#64748b; border-top:1px solid #e5e7eb; }

/* Utilities */
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.stack > * + *{ margin-top:10px; }
.visually-hidden{ position:absolute; left:-9999px; }

/* Responsive */
.hamburger{ display:none; font-size:1.8rem; background: transparent; border: none; color: #0f172a; cursor: pointer; }
@media (max-width: 900px){
  .auth-card{ grid-template-columns:1fr; }
  .hero{ grid-template-columns:1fr; text-align:center; }
  .stats{ grid-template-columns:1fr; }
  .profile-grid{ grid-template-columns:1fr; }
}
@media (max-width: 760px){
  .hamburger{ display:block; }
  .nav-links{
    position:absolute; top:60px; left:0; right:0; background:rgba(255,255,255,.95);
    flex-direction:column; align-items:center; display:none; gap:10px; padding:10px 0; border-top:1px solid rgba(2,6,23,0.06);
    backdrop-filter: blur(10px);
  }
  .nav-links.show{ display:flex; }
}
/* === Resources Section === */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.resource-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.resource-card img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.resource-card h3 {
  font-size: 1.1rem;
  color: #2B4C63;
  margin-bottom: 0.5rem;
}

.resource-card p {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Button style enhancement for consistency */
.btn.primary.small {
  background-color: #2B4C63;
  color: #fff;
  border-radius: 25px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.btn.primary.small:hover {
  background-color: #6F8B9B;
}
/* Add spacing to register section header */
#register h2 {
  margin-bottom: 10px; /* space between title and subtitle */
}

#register p.muted {
  margin-bottom: 22px; /* more room before form starts */
}
form label {
  display: block;
  margin-bottom: 6px; /* space between label and input */
  font-weight: 600;
  color: #2c3e50;
}

form input,
form select {
  margin-bottom: 18px; /* more space between input fields */
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

form select {
  padding: 8px;
}
/* === Quiz Section Styling === */
.quiz-card {
  max-width: 600px;
  width: 100%;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(31, 41, 55, 0.12);
}

.quiz-card h2 {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
}

.quiz-options {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.quiz-options li {
  background: #f9fafb;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-options li:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.quiz-options li.correct {
  background-color: #c8e6c9;
  border-color: #4caf50;
}

.quiz-options li.wrong {
  background-color: #ffcdd2;
  border-color: #f44336;
}

#next-btn {
  margin-top: 14px;
}

#score {
  margin-top: 16px;
  font-weight: 700;
  color: var(--primary);
}
.author-avatar:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}
.chip:hover {
  background: #dbeafe;
  cursor: default;
}
.illustration-wrapper {
  background: linear-gradient(135deg, #e3f2fd, #fef6e4);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.capsule-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.capsule-icon {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 4px 8px rgba(43, 76, 99, 0.2));
  animation: floatY 3s ease-in-out infinite;
}

.capsule-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.capsule-desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 500px;
}

.capsule-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 1rem;
}

.capsule-tags .tag {
  background: #eef2ff;
  color: #2B4C63;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 3px 8px rgba(31, 41, 55, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.capsule-tags .tag:hover {
  background: #dbeafe;
  transform: translateY(-2px);
}
.flashcard-field {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.flashcard-field input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.remove-flash {
  font-weight: bold;
  padding: 0 8px;
  color: #c00;
}
.resource-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.profile-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #96a3b0;
  transition: transform 0.2s ease;
}

.profile-photo img:hover {
  transform: scale(1.05);
}
/* ========== Modern Footer ========== */
.footer {
  background: linear-gradient(135deg, #f8fafc, #e8ecf1);
  border-top: 1px solid #d6dbe0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #2a3a4a;
}

.footer-text {
  color: #555;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a img {
  width: 24px;
  height: 24px;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover img {
  opacity: 1;
  transform: translateY(-3px);
}
.hero-image {
  width: 400px;
  max-width: 90%;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
