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

:root {
  --primary: #6C63FF;
  --primary-light: #a5a0ff;
  --accent: #FF6584;
  --bg: #f0f4ff;
  --surface: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --border: #dfe6e9;
  --radius: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  overflow-x: hidden;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

/* =====================
   top header - fixed at top, always visible while scrolling
   ===================== */
.top-header {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: white;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.backpack-icon {
  font-size: 2rem;
}

.top-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.auth-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.auth-user-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-greeting {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

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

.header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

/* =====================
   buttons - shared base styles, login/signup variants below
   ===================== */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-login {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-login:hover {
  background: white;
  color: var(--primary);
}

.btn-signup {
  background: white;
  color: var(--primary);
}

.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* =====================
   toolbar / nav - sticks just below the fixed header
   ===================== */
.toolbar {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.toolbar nav {
  display: flex;
  gap: 4px;
  max-width: 700px;
  width: 100%;
  justify-content: space-between;
}

.toolbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  position: relative;
}

.toolbar a .nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.toolbar a:hover {
  background: var(--bg);
  color: var(--primary);
}

.toolbar a.active {
  color: var(--primary);
  background: #eef0ff;
}

.toolbar a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}

.toolbar .nav-new-wrapper {
  position: relative;
}

.toolbar a.nav-new {
  color: var(--accent);
}

.toolbar a.nav-new:hover {
  background: #fff0f3;
  color: #e84565;
}

/* Dropdown */
.new-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  padding: 8px 0;
  z-index: 200;
  animation: dropdownFade 0.15s ease;
}

.new-dropdown.show {
  display: block;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.new-dropdown a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s;
}

.new-dropdown a:hover {
  background: var(--bg);
  color: var(--primary);
}

.new-dropdown a .dropdown-icon {
  font-size: 1.2rem;
}

/* =====================
   page system - only the active page is shown, the rest are hidden
   ===================== */
.page {
  display: none;
  flex: 1;
  flex-direction: column;
}

.page.active {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 80px; /* height of fixed header */
}

/* inner pages */
.inner-page-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

/* home dashboard */
#homeDashboard {
  flex: 1;
  width: 100%;
}

.dash-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-welcome {
  padding: 4px 0;
}

.dash-greeting {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 6px;
}

.dash-date {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

.dash-quote-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px 20px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 22px rgba(108, 99, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.dash-quote-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), #a78bfa);
  border-radius: 4px 0 0 4px;
}

.dash-quote-icon {
  font-size: 1.25rem;
  margin-bottom: 8px;
  opacity: 0.85;
}

.dash-quote-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  margin-bottom: 12px;
}

.dash-quote-author {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: right;
}

.dash-quote-author:empty {
  display: none;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(45, 52, 54, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(108, 99, 255, 0.12);
}

.dash-stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dash-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.35;
}

.dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 18px;
  box-shadow: 0 2px 16px rgba(45, 52, 54, 0.05);
}

.dash-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.dash-recents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.dash-recent-item:hover {
  background: #e8ecff;
  border-color: rgba(108, 99, 255, 0.22);
}

.dash-recent-item:active {
  transform: scale(0.99);
}

.dash-recent-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.dash-empty {
  color: var(--text-light);
  font-size: 0.95rem;
  text-align: center;
  padding: 24px 16px;
  margin: 0;
}

@media (max-width: 480px) {
  .dash-wrap {
    padding: 20px 16px 48px;
    gap: 18px;
  }

  .dash-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 6rem 2rem 2rem;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

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

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero .tagline {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  line-height: 1.8;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =====================
   demo tabs - radio inputs act as tab state, labels do the clicking
   ===================== */
.demo-section {
  padding: 5rem 2rem;
  background: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.demo-tabs input[type="radio"] {
  display: none;
}

.tab-labels {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: white;
  border: 2px solid var(--border);
  padding: 1rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#tab-schedule:checked ~ .tab-labels label[for="tab-schedule"],
#tab-tasks:checked ~ .tab-labels label[for="tab-tasks"],
#tab-progress:checked ~ .tab-labels label[for="tab-progress"] {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: white;
  border-color: transparent;
}

.tab-icon {
  font-size: 1.5rem;
}

.demo-content {
  position: relative;
  min-height: 500px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

#tab-schedule:checked ~ .demo-content .schedule-content,
#tab-tasks:checked ~ .demo-content .tasks-content,
#tab-progress:checked ~ .demo-content .progress-content {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.demo-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.schedule-mockup,
.tasks-mockup,
.progress-mockup {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.schedule-header,
.task-header,
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.schedule-header h3,
.task-header h3,
.progress-header h3 {
  color: var(--primary);
  font-size: 1.3rem;
}

.week-indicator,
.date-indicator,
.semester-indicator {
  color: #999;
  font-size: 0.9rem;
}

.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.time-slot {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.time {
  color: #999;
  font-size: 0.9rem;
  min-width: 80px;
}

.class-block {
  flex: 1;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  color: white;
}

.class-block.math    { background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%); }
.class-block.science { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.class-block.study   { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.class-block.english { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.task-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.task-item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  flex-shrink: 0;
}

.task-checkbox.checked {
  background: var(--primary);
  position: relative;
}

.task-checkbox.checked::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
}

.task-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.task-title {
  font-weight: 600;
  color: #333;
}

.task-meta {
  font-size: 0.85rem;
  color: #999;
}

.priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.priority-badge.high   { background: #fee; color: #e74c3c; }
.priority-badge.medium { background: #fff3cd; color: #f39c12; }

.task-item.completed { opacity: 0.6; }
.task-item.completed .task-title { text-decoration: line-through; }

.checkmark {
  color: #27ae60;
  font-size: 1.5rem;
}

.progress-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #666;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.stat-bar {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  border-radius: 4px;
  transition: width 1s ease-out;
}

.stat-trend { margin-top: 0.5rem; font-size: 0.9rem; font-weight: 600; }
.stat-trend.positive { color: #27ae60; }

.course-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.success { background: #27ae60; }
.dot.warning { background: #f39c12; }

.feature-description { padding: 2rem; }

.feature-description h4 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-description p {
  color: #666;
  line-height: 1.8;
  font-size: 1.1rem;
}

/* =====================
   gallery / slider - CSS :target trick switches slides without JS
   ===================== */
.gallery-section {
  padding: 5rem 2rem;
  background: var(--bg);
}

.slider {
  position: relative;
  width: 80%;
  max-width: 900px;
  height: 500px;
  overflow: hidden;
  margin: 0 auto;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide:target { opacity: 1; }
.slide:first-child { opacity: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(108, 99, 255, 0.8);
  color: white;
  text-decoration: none;
  padding: 1rem 1.2rem;
  font-size: 1.5rem;
  border-radius: 8px;
  transition: background-color 0.3s;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

.slider-nav:hover { background-color: rgba(167, 139, 250, 0.9); }
.slider-nav.prev { left: 1rem; }
.slider-nav.next { right: 1rem; }

#slide1:target ~ .slider-nav.prev:nth-of-type(1),
.slide:first-child:not(:target) ~ .slider-nav.prev:nth-of-type(1) { opacity: 1; pointer-events: auto; }

#slide1:target ~ .slider-nav.next:nth-of-type(5),
.slide:first-child:not(:target) ~ .slider-nav.next:nth-of-type(5) { opacity: 1; pointer-events: auto; }

#slide2:target ~ .slider-nav.prev:nth-of-type(2) { opacity: 1; pointer-events: auto; }
#slide2:target ~ .slider-nav.next:nth-of-type(6) { opacity: 1; pointer-events: auto; }
#slide3:target ~ .slider-nav.prev:nth-of-type(3) { opacity: 1; pointer-events: auto; }
#slide3:target ~ .slider-nav.next:nth-of-type(7) { opacity: 1; pointer-events: auto; }
#slide4:target ~ .slider-nav.prev:nth-of-type(4) { opacity: 1; pointer-events: auto; }
#slide4:target ~ .slider-nav.next:nth-of-type(8) { opacity: 1; pointer-events: auto; }

/* =====================
   features - the 6-card grid explaining what the app does
   ===================== */
.features {
  padding: 5rem 2rem;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(108, 99, 255, 0.2);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
}

/* =====================
   testimonials - used here as differentiator cards, not real reviews
   ===================== */
.testimonials-section {
  padding: 5rem 2rem;
  background: var(--bg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  position: relative;
}

.quote-icon {
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.testimonial-text {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 2rem 0 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f0f0f0;
}

.author-avatar { font-size: 2.5rem; }
.author-name   { font-weight: 700; color: #333; }
.author-school { font-size: 0.9rem; color: #999; }

/* =====================
   CTA section - bottom banner to get people to sign up
   ===================== */
.cta-section {
  padding: 5rem 2rem;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-buttons-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.cta-note {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* =====================
   footer - dark bar at the bottom with team info
   ===================== */
.footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 2rem 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--primary-light);
  margin-bottom: 1rem;
}

.footer-section p {
  color: #bbb;
  line-height: 1.8;
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--primary-light); }

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #34495e;
  color: #999;
}

/* =====================
   responsive - shrink and restack things for tablets and phones
   ===================== */
@media (max-width: 968px) {
  .demo-visual { grid-template-columns: 1fr; }
  .tab-labels  { gap: 0.5rem; }
  .tab-btn     { padding: 0.8rem 1.5rem; font-size: 0.9rem; }
}

@media (max-width: 768px) {
  .hero { padding: 5rem 1rem 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1.1rem; }
  .hero-description { font-size: 1rem; }
  .nav-container { padding: 0 1rem; }
  .top-header h1 { font-size: 1.2rem; }
  .auth-buttons  { gap: 0.5rem; }
  .btn           { padding: 0.6rem 1rem; font-size: 0.85rem; }
  .btn-large     { padding: 0.9rem 1.8rem; font-size: 1rem; }
  .cta-buttons   { gap: 1rem; }
  .demo-section, .features, .testimonials-section, .cta-section, .gallery-section { padding: 3rem 1rem; }
  .slider        { width: 95%; height: 350px; }
  .slider-nav    { padding: 0.7rem 0.9rem; font-size: 1.3rem; }
  .section-title { font-size: 2rem; }
  .features-grid, .testimonials-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-card  { padding: 1.5rem; }
  .feature-icon  { font-size: 2.5rem; }
  .feature-card h3 { font-size: 1.2rem; }
  .cta-content h2  { font-size: 2rem; }
  .cta-content p   { font-size: 1rem; }
  .toolbar a     { padding: 10px 10px; font-size: 0.7rem; }
  .toolbar a .nav-icon { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .backpack-icon { font-size: 1.4rem; }
  .top-header h1 { font-size: 1rem; }
  .auth-buttons  { gap: 0.3rem; }
  .btn           { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
  .hero h1       { font-size: 1.8rem; }
  .hero .tagline { font-size: 1rem; }
  .hero-description { font-size: 0.95rem; }
  .btn-large     { padding: 0.8rem 1.5rem; font-size: 0.95rem; }
  .cta-buttons   { flex-direction: column; width: 100%; padding: 0 1rem; }
  .cta-buttons .btn { width: 100%; }
  .slider        { height: 280px; }
  .slider-nav    { padding: 0.5rem 0.7rem; font-size: 1.2rem; }
  .section-title { font-size: 1.8rem; }
  .tab-btn       { padding: 0.7rem 1rem; font-size: 0.85rem; }
  .tab-icon      { font-size: 1.2rem; }
  .cta-content h2 { font-size: 1.8rem; }
  .time          { min-width: 60px; font-size: 0.8rem; }
  .class-block   { padding: 0.8rem; font-size: 0.9rem; }
}

/* =====================
   backpack: browse, notebook editor, flashcard editor and test -yr
   ===================== */

/* breadcrumb */
.bp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.bp-crumb--link {
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.bp-crumb--link:hover { opacity: 0.7; }

.bp-crumb-sep {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* empty state inside backpack */
.bp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
}

.bp-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.bp-empty h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.bp-empty p {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 340px;
}

/* items grid */
.bp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.bp-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.bp-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.12);
}

.bp-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bp-item-icon {
  font-size: 2rem;
  line-height: 1;
}

.bp-item-delete {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px;
  border-radius: 6px;
}

.bp-item:hover .bp-item-delete { opacity: 0.6; }
.bp-item-delete:hover { opacity: 1 !important; }

.bp-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-item-type {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
}

/* add button + dropdown */
.bp-add-bar {
  position: relative;
  display: inline-block;
  margin-top: 0.5rem;
}

.bp-add-btn {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}

.bp-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
}

.bp-add-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  padding: 6px 0;
  z-index: 50;
}

.bp-add-menu.show { display: block; }

.bp-add-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.bp-add-menu button:hover {
  background: var(--bg);
  color: var(--primary);
}

/* editor header (shared by notebook + flashcards) */
.bp-editor-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.bp-back-btn {
  background: none;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.bp-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}

.bp-editor-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-item-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  line-height: 1.3;
}

.bp-test-btn {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(67, 233, 123, 0.3);
  white-space: nowrap;
}

.bp-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(67, 233, 123, 0.4);
}

/* notebook editor: sidebar + entries */
.bp-notebook-layout {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  flex-wrap: wrap;
}

.bp-notebook-sidebar {
  flex: 0 0 220px;
  max-width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 0.75rem;
  align-self: flex-start;
}

.bp-notebook-sidebar-head {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.65rem;
  padding: 0 0.25rem;
}

.bp-page-add-btn {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 2px dashed var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.bp-page-add-btn:hover {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.06);
}

.bp-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-page-item {
  border-radius: 12px;
  border: 2px solid var(--border);
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg);
}

.bp-page-item:hover {
  border-color: var(--primary);
}

.bp-page-item--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.12);
}

.bp-page-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.bp-page-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.bp-page-delete {
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 6px;
  opacity: 0.75;
}

.bp-page-delete:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.12);
}

.bp-page-title-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
}

.bp-page-title-input:focus {
  outline: none;
  border-color: var(--primary);
}

.bp-notebook-main {
  flex: 1;
  min-width: 0;
}

.bp-page-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.5rem;
}

/* notebook editor */
.bp-notebook-area {
  width: 100%;
  min-height: 420px;
  padding: 1.5rem;
  border: 2px solid var(--border);
  border-radius: 16px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bp-notebook-area:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

/* flashcard editor rows */
.bp-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.bp-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}

.bp-card-row:focus-within {
  border-color: var(--primary-light);
}

.bp-card-fields {
  flex: 1;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.bp-card-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.bp-card-input:focus {
  border-color: var(--primary);
}

.bp-card-input::placeholder { color: #b2bec3; }

.bp-card-delete {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  padding: 4px;
  flex-shrink: 0;
}

.bp-card-delete:hover { opacity: 1; }

.bp-add-card-btn {
  background: none;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.bp-add-card-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}

/* flashcard test mode */
.bp-flashcard-container {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.bp-flashcard {
  width: 100%;
  max-width: 440px;
  height: 280px;
  cursor: pointer;
  position: relative;
}

.bp-flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.bp-flashcard.flipped .bp-flashcard-inner {
  transform: rotateY(180deg);
}

.bp-flashcard-front,
.bp-flashcard-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.bp-flashcard-front {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: white;
}

.bp-flashcard-back {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
  transform: rotateY(180deg);
}

.bp-fc-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.bp-fc-text {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.bp-fc-hint {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-top: auto;
  padding-top: 16px;
}

.bp-test-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.bp-test-nav-btn {
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}

.bp-test-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bp-test-nav-btn:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}

.bp-test-flip-btn {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: #fff;
  border-color: transparent;
}

.bp-test-flip-btn:not(:disabled):hover {
  background: linear-gradient(135deg, #5b52ee 0%, #9678f0 100%);
  color: #fff;
}

/* responsive tweaks */
@media (max-width: 480px) {
  .bp-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
  }
  .bp-card-fields { flex-direction: column; }
  .bp-flashcard { height: 240px; }
  .bp-fc-text { font-size: 1.15rem; }
  .bp-test-nav-btn { padding: 8px 16px; font-size: 0.85rem; }
}

/* =====================
   pomodoro timer - study/break mode buttons and countdown display
   ===================== */
.pomo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.pomo-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pomo-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  color: #fff;
}

.pomo-btn:hover {
  transform: translateY(-3px);
}

.pomo-btn.active-mode {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--primary);
}

.pomo-btn--study {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}

.pomo-btn--short {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  box-shadow: 0 4px 14px rgba(67, 233, 123, 0.3);
}

.pomo-btn--long {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 14px rgba(240, 147, 251, 0.3);
}

.pomo-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  background: var(--surface);
  border-radius: 24px;
  padding: 3rem 4rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  min-width: 320px;
}

.pomo-time {
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pomo-controls {
  display: flex;
  gap: 0.75rem;
}

.pomo-ctrl {
  padding: 0.7rem 1.6rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
}

.pomo-ctrl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pomo-ctrl:not(:disabled):hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef0ff;
}

.pomo-ctrl--reset:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff0f3;
}

.pomo-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
}

@media (max-width: 480px) {
  .pomo-btn {
    padding: 0.85rem 1.4rem;
    font-size: 0.95rem;
  }
  .pomo-display {
    padding: 2rem 1.5rem;
    min-width: unset;
    width: 100%;
  }
  .pomo-time {
    font-size: 3.5rem;
  }
}

/* =====================
   lofi music player -yr
   ===================== */
.lofi-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.lofi-now-playing {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 10px 40px rgba(108, 99, 255, 0.25);
  color: #fff;
}

.lofi-vinyl {
  font-size: 3.5rem;
  line-height: 1;
  animation: none;
  flex-shrink: 0;
}

.lofi-vinyl.spinning {
  animation: vinylSpin 3s linear infinite;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.lofi-track-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lofi-track-title {
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lofi-track-sub {
  font-size: 0.85rem;
  opacity: 0.75;
}

.lofi-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lofi-ctrl {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  font-family: inherit;
}

.lofi-ctrl:hover {
  border-color: var(--primary);
  background: #eef0ff;
  transform: scale(1.08);
}

.lofi-ctrl--play {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
}

.lofi-ctrl--play:hover {
  background: linear-gradient(135deg, #5b52ee 0%, #9678f0 100%);
  transform: scale(1.1);
}

.lofi-tracklist {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lofi-track-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.lofi-track-row:hover {
  background: #eef0ff;
  border-color: var(--primary-light);
}

.lofi-track-row.active {
  background: #eef0ff;
  border-color: var(--primary);
}

.lofi-track-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  min-width: 24px;
  text-align: center;
}

.lofi-track-row.active .lofi-track-num {
  color: var(--primary);
}

.lofi-track-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.lofi-track-row.active .lofi-track-name {
  color: var(--primary);
}

.lofi-track-eq {
  font-size: 1rem;
  display: none;
}

.lofi-track-row.active .lofi-track-eq {
  display: inline;
}

@media (max-width: 480px) {
  .lofi-now-playing {
    padding: 1.5rem;
    gap: 1rem;
  }
  .lofi-vinyl {
    font-size: 2.5rem;
  }
  .lofi-track-title {
    font-size: 1.1rem;
  }
  .lofi-ctrl {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
  .lofi-ctrl--play {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
}

/* =====================
   modals - login and signup popups with a blurred backdrop
   ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44, 30, 100, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalBgFade 0.2s ease;
}

.modal-overlay.show {
  display: flex;
}

@keyframes modalBgFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(108, 99, 255, 0.25);
  animation: modalSlideUp 0.25s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-light);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--primary);
}

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.form-group input::placeholder {
  color: #b2bec3;
}

.forgot-link {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  text-align: right;
  margin-top: -8px;
}

.forgot-link:hover {
  text-decoration: underline;
}

.modal-btn {
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
  margin-top: 4px;
  font-family: inherit;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
}

.modal-switch {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-light);
}

.modal-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.modal-switch a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .modal-box {
    padding: 32px 24px 28px;
  }

  .modal-header h2 {
    font-size: 1.35rem;
  }
}

/* =====================
   account create page (standalone signup)
   ===================== */
.account-create-page .top-header {
  position: relative;
}

.account-create-main {
  min-height: calc(100vh - 80px);
  padding: 3rem 1.25rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, #e8e6ff 100%);
}

.account-create-card {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 36px;
  box-shadow: 0 24px 60px rgba(108, 99, 255, 0.2);
}

.account-create-header {
  text-align: center;
  margin-bottom: 28px;
}

.account-create-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.account-create-header p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.account-create-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =====================
   TO-DO LIST STYLES
   ===================== */
.todo-add-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.todo-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.todo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.todo-section-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.todo-section-header .todo-section-label {
  margin-bottom: 0;
}

.todo-count {
  font-size: 0.8rem;
  font-weight: 700;
  background: #eef0ff;
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 999px;
}

.todo-count--done {
  background: #e6faf0;
  color: #27ae60;
}

.todo-input-row {
  display: flex;
  gap: 0.75rem;
}

.todo-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.todo-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

.todo-input--error {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 101, 132, 0.15);
}

.todo-add-btn {
  padding: 12px 22px;
  background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
  white-space: nowrap;
}

.todo-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.45);
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.todo-empty-msg {
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  padding: 1.5rem 0;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 12px;
  border: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.todo-item:hover {
  border-color: var(--primary-light);
}

.todo-item--done {
  opacity: 0.6;
}

.todo-checkbox {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}

.todo-checkbox--checked {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  border-color: transparent;
}

.todo-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.todo-item--done .todo-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.todo-delete-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s, transform 0.2s;
  padding: 4px;
  border-radius: 6px;
  font-family: inherit;
}

.todo-delete-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.todo-list--completed {
  opacity: 0.85;
}

/* =====================
   games page
   ===================== */
.game-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 2px 12px rgba(108, 99, 255, 0.08);
  text-align: center;
}

.game-card-title {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.game-card-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* =====================
   emoji picker modal (folder creation)
   ===================== */
.bp-emoji-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-emoji-picker {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.bp-emoji-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.bp-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.bp-emoji-btn {
  background: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 1.4rem;
  padding: 0.4rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.bp-emoji-btn:hover {
  background: #e8e5ff;
  transform: scale(1.2);
}

.bp-emoji-skip {
  display: block;
  width: 100%;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.bp-emoji-skip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.game-container iframe {
  max-width: 100%;
  aspect-ratio: 960 / 540;
  height: auto;
}

#gbc-emulator-frame {
  aspect-ratio: 640 / 576;
}

/* games hub menu */
.game-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.game-menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.game-menu-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.15);
}

.game-menu-emoji {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.game-menu-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.game-menu-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.4;
}

.game-back-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  margin-bottom: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.game-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =====================
   in-app toast + sheet (replaces alert/confirm/prompt — no “localhost…”)
   ===================== */
.app-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 5.25rem;
  z-index: 99990 !important;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  color: #3d3550;
  background: linear-gradient(145deg, #fdf8ff 0%, #f0e8ff 100%);
  border: 2px solid rgba(108, 99, 255, 0.4);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(108, 99, 255, 0.22);
  pointer-events: none;
}

.app-toast--error {
  color: #6b2d3a;
  background: linear-gradient(145deg, #fff8fa 0%, #ffe0ea 100%);
  border-color: rgba(255, 101, 132, 0.45);
  box-shadow: 0 8px 24px rgba(255, 101, 132, 0.18);
}

.app-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995 !important;
  background: rgba(45, 52, 54, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.app-sheet {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  max-width: 22rem;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
}

.app-sheet-text {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin: 0 0 1rem;
}

.app-sheet-input {
  display: none;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  font-family: inherit;
}

.app-sheet-input.app-sheet-input--show {
  display: block;
}

.app-sheet-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.app-sheet-btn {
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.app-sheet-btn--ghost {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.app-sheet-btn--primary {
  background: linear-gradient(135deg, #6c63ff 0%, #9b8cff 100%);
  color: #fff;
}
