/* ══════════════════════════════════════════════════════════════
   BoardPrep PH — Design System v2 (with Auth & Profiles)
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg:         #0d1117;
  --bg2:        #161b22;
  --bg3:        #1c2330;
  --surface:    #1e2736;
  --surface2:   #242f42;
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.14);
  --text:       #e8edf5;
  --text2:      #8b97a8;
  --text3:      #5a6678;
  --gold:       #f5c842;
  --gold2:      #e8b830;
  --green:      #3ecf8e;
  --green-dim:  #1a6647;
  --red:        #f56565;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ══ VIEWS ════════════════════════════════════════════════════════════════ */
.view { min-height: 100vh; }

/* ══ HEADER ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 2rem;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 2rem; }
.logo-title { font-family: 'Syne', sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; }
.logo-title span { color: var(--gold); }
.logo-sub { font-size: 0.72rem; color: var(--text3); font-weight: 300; letter-spacing: 0.5px; }
.header-actions { display: flex; align-items: center; gap: 10px; position: relative; }

/* ══ BUTTONS ══════════════════════════════════════════════════════════════ */
.btn-primary {
  background: var(--gold); color: #0d1117; border: none;
  border-radius: var(--radius-sm); padding: 0.55rem 1.1rem;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.2px;
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(245,200,66,0.3); }
.btn-full { width: 100%; margin-top: 4px; padding: 0.7rem; font-size: 0.9rem; }

.btn-ghost {
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  padding: 0.55rem 1rem; font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--text2); color: var(--text); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.btn-danger {
  background: var(--red); color: white; border: none;
  border-radius: var(--radius-sm); padding: 0.55rem 1rem;
  font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { opacity: 0.85; }

.btn-icon {
  background: transparent; border: none; cursor: pointer;
  color: var(--text3); padding: 4px 6px; border-radius: 6px;
  font-size: 0.8rem; transition: all 0.2s; line-height: 1;
}
.btn-icon:hover { color: var(--text); background: var(--border); }

.btn-notes-toggle {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text2);
  padding: 0.5rem 0.9rem; font-size: 0.85rem; cursor: pointer; transition: all 0.2s;
}
.btn-notes-toggle:hover { border-color: var(--gold); color: var(--text); }
.notes-badge {
  background: var(--gold); color: #0d1117; border-radius: 99px;
  padding: 1px 7px; font-size: 0.75rem; font-weight: 700; font-family: 'Syne', sans-serif;
}

/* ══ LANDING PAGE ═════════════════════════════════════════════════════════ */
.landing-main { max-width: 1000px; margin: 0 auto; padding: 3rem 2rem; }
.landing-hero { text-align: center; margin-bottom: 2.5rem; }
.landing-hero h1 { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.landing-hero p { color: var(--text2); font-size: 1rem; }

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  animation: slideUp 0.3s ease both;
}
.profile-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(245,200,66,0.12); }

.profile-card-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 0.75rem;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
  border: 2px solid var(--border2);
}
.profile-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card-name {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-card-username { font-size: 0.75rem; color: var(--text3); margin-bottom: 0.75rem; }

.profile-card-progress { margin-top: 0.5rem; }
.profile-card-bar-wrap { height: 4px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.profile-card-bar-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width 0.4s; }
.profile-card-pct { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.75rem; color: var(--gold); }

.profile-card-meta { font-size: 0.72rem; color: var(--text3); margin-top: 6px; }
.profile-lock { font-size: 0.75rem; color: var(--text3); margin-top: 6px; }

.loading-state { color: var(--text3); text-align: center; padding: 3rem; grid-column: 1/-1; }

/* ══ AUTH PAGES ═══════════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,200,66,0.06) 0%, transparent 60%), var(--bg);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 2.5rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.auth-logo { font-size: 1.5rem; font-weight: 800; font-family: 'Syne', sans-serif; margin-bottom: 1.25rem; }
.auth-logo span { color: var(--gold); }
.auth-card h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.auth-sub { color: var(--text2); font-size: 0.88rem; margin-bottom: 1.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { font-size: 0.78rem; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; margin-top: 4px; }
.auth-form input {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 0.65rem 0.9rem;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s; width: 100%;
}
.auth-form input:focus { border-color: var(--gold); }
.auth-form input::placeholder { color: var(--text3); }
.auth-error { font-size: 0.82rem; color: var(--red); min-height: 18px; }
.auth-switch { font-size: 0.83rem; color: var(--text2); text-align: center; margin-top: 8px; }
.auth-switch a { color: var(--gold); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.opt { color: var(--text3); font-size: 0.72rem; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Login avatar display */
.profile-login-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; overflow: hidden;
  border: 2px solid var(--border2);
}
.profile-login-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ══ PROFILE PILL (header) ════════════════════════════════════════════════ */
.profile-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 99px; padding: 4px 12px 4px 4px;
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.profile-pill:hover { border-color: var(--gold); }
.profile-pill-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface2); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0;
}
.profile-pill-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-pill span:not(.profile-pill-arrow) { font-size: 0.85rem; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-pill-arrow { font-size: 0.7rem; color: var(--text3); }

.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); min-width: 170px;
  box-shadow: var(--shadow); z-index: 200;
  overflow: hidden;
  animation: modalIn 0.15s ease;
}
.profile-menu-item {
  padding: 0.7rem 1rem; font-size: 0.88rem; cursor: pointer;
  transition: background 0.15s;
}
.profile-menu-item:hover { background: var(--surface2); }

/* ══ AVATAR UPLOAD ════════════════════════════════════════════════════════ */
.avatar-upload-area {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
  margin-bottom: 4px;
}
.avatar-preview {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border: 2px solid var(--border2);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ══ PROGRESS OVERVIEW ════════════════════════════════════════════════════ */
.progress-overview { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 1rem 2rem; }
.progress-overview-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; margin-bottom: 0.75rem;
}
.overview-label { font-family: 'Syne', sans-serif; font-size: 0.8rem; font-weight: 700; color: var(--text3); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.overview-bar-wrap { flex: 1; display: flex; align-items: center; gap: 10px; }
.overview-bar { flex: 1; height: 8px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.overview-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--green)); border-radius: 99px; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); width: 0%; }
.overview-pct { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.95rem; color: var(--gold); min-width: 40px; text-align: right; }
.subject-progress-strip { max-width: 1400px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.subject-chip { display: flex; align-items: center; gap: 8px; background: var(--bg3); border-radius: 99px; padding: 4px 12px 4px 8px; font-size: 0.78rem; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip-bar-wrap { width: 60px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.chip-bar-fill { height: 100%; border-radius: 99px; transition: width 0.4s; }
.chip-pct { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.72rem; }

/* ══ MAIN CONTENT ═════════════════════════════════════════════════════════ */
.main-content { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.subjects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1.5rem; }
.empty-state { grid-column: 1/-1; text-align: center; padding: 5rem 2rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text2); margin-bottom: 1.5rem; }

/* ══ SUBJECT CARD ═════════════════════════════════════════════════════════ */
.subject-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.25s; animation: slideUp 0.35s ease both; }
.subject-card:hover { box-shadow: var(--shadow); border-color: var(--border2); }
@keyframes slideUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
@keyframes modalIn { from { opacity:0; transform:scale(0.94) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }

.card-header { padding: 1.1rem 1.25rem 0.75rem; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border); }
.card-color-bar { width: 4px; border-radius: 99px; min-height: 44px; align-self: stretch; flex-shrink: 0; }
.card-header-info { flex: 1; min-width: 0; }
.card-title { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-progress-row { display: flex; align-items: center; gap: 10px; }
.card-bar-wrap { flex: 1; height: 5px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.card-bar-fill { height: 100%; border-radius: 99px; transition: width 0.45s cubic-bezier(0.4,0,0.2,1); width: 0%; }
.card-pct { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.8rem; min-width: 36px; text-align: right; }
.card-actions { display: flex; gap: 2px; flex-shrink: 0; }
.card-body { padding: 0.75rem 1.25rem; }

/* ══ SUBSECTIONS ══════════════════════════════════════════════════════════ */
.subsection-item { margin-bottom: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; transition: border-color 0.2s; }
.subsection-item:hover { border-color: var(--border2); }
.subsection-header { display: flex; align-items: center; gap: 8px; padding: 0.6rem 0.8rem; background: var(--bg3); cursor: pointer; user-select: none; }
.subsection-header:hover { background: var(--surface2); }
.custom-checkbox { width: 18px; height: 18px; border: 2px solid var(--border2); border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; cursor: pointer; font-size: 0.7rem; color: white; }
.custom-checkbox.checked { border-color: var(--green); background: var(--green); }
.custom-checkbox.partial { border-color: var(--gold); background: transparent; color: var(--gold); }
.subsection-name { flex: 1; font-size: 0.88rem; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.2s; }
.subsection-name.done-text { color: var(--text3); text-decoration: line-through; }
.subsection-toggle { font-size: 0.7rem; color: var(--text3); transition: transform 0.25s; padding: 2px 4px; flex-shrink: 0; }
.subsection-toggle.open { transform: rotate(180deg); }
.subsection-sub-pct { font-family: 'Syne', sans-serif; font-size: 0.72rem; font-weight: 700; color: var(--text3); flex-shrink: 0; }
.sub-actions { display: flex; gap: 2px; }
.subsection-body { padding: 0.5rem 0.8rem 0.6rem; background: var(--bg2); border-top: 1px solid var(--border); }

/* ══ TOPICS ═══════════════════════════════════════════════════════════════ */
.topic-item { display: flex; align-items: center; gap: 8px; padding: 0.35rem 0.5rem; border-radius: 6px; transition: background 0.15s; }
.topic-item:hover { background: var(--bg3); }
.topic-name { flex: 1; font-size: 0.83rem; color: var(--text2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-name.done-text { color: var(--text3); text-decoration: line-through; }
.topic-checkbox { width: 15px; height: 15px; border: 1.5px solid var(--border2); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s; cursor: pointer; font-size: 0.62rem; color: white; }
.topic-checkbox.checked { border-color: var(--green); background: var(--green); }

.add-topic-row { display: flex; align-items: center; gap: 6px; margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px dashed var(--border); }
.add-subsection-row { display: flex; align-items: center; gap: 8px; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
.inline-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.82rem; outline: none; transition: border-color 0.2s; }
.inline-input:focus { border-color: var(--gold); }
.inline-input::placeholder { color: var(--text3); }
.btn-add-inline { background: transparent; border: 1px solid var(--border2); border-radius: 6px; color: var(--text2); padding: 5px 10px; font-size: 0.8rem; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.btn-add-inline:hover { border-color: var(--gold); color: var(--gold); }

/* ══ NOTES SIDEBAR ════════════════════════════════════════════════════════ */
.notes-sidebar { position: fixed; top: 0; right: 0; width: 360px; height: 100vh; background: var(--bg2); border-left: 1px solid var(--border); z-index: 200; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; overflow: hidden; }
.notes-sidebar.open { transform: translateX(0); }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; display: none; backdrop-filter: blur(2px); }
.sidebar-overlay.open { display: block; }
.notes-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.notes-sidebar-header h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; }
.btn-close-sidebar { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 1rem; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.btn-close-sidebar:hover { color: var(--text); background: var(--border); }
.btn-add-note { margin: 0.75rem 1.25rem; width: calc(100% - 2.5rem); padding: 0.6rem; background: transparent; border: 1.5px dashed var(--border2); border-radius: var(--radius-sm); color: var(--text2); font-size: 0.85rem; cursor: pointer; transition: all 0.2s; text-align: center; flex-shrink: 0; }
.btn-add-note:hover { border-color: var(--gold); color: var(--gold); }
.notes-list { flex: 1; overflow-y: auto; padding: 0 0.75rem 1rem; display: flex; flex-direction: column; gap: 10px; }
.note-card { border-radius: var(--radius-sm); padding: 0.85rem; cursor: pointer; transition: all 0.2s; position: relative; border: 1px solid transparent; }
.note-card:hover { filter: brightness(1.08); border-color: rgba(255,255,255,0.12); }
.note-card-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.88rem; color: rgba(0,0,0,0.8); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-card-preview { font-size: 0.78rem; color: rgba(0,0,0,0.6); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.note-card-meta { font-size: 0.7rem; color: rgba(0,0,0,0.45); margin-top: 6px; }
.note-card-del { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.12); border: none; border-radius: 4px; width: 22px; height: 22px; cursor: pointer; font-size: 0.65rem; color: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.note-card:hover .note-card-del { opacity: 1; }
.note-card-del:hover { background: rgba(0,0,0,0.2); }

/* ══ MODALS ═══════════════════════════════════════════════════════════════ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 300; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 1rem; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius); width: 100%; max-width: 460px; box-shadow: 0 24px 64px rgba(0,0,0,0.6); animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1); }
.modal-note { max-width: 500px; }
.modal-sm { max-width: 360px; }
.modal-profile { max-width: 480px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; }
.modal-close { background: none; border: none; color: var(--text3); font-size: 1rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.modal-close:hover { color: var(--text); background: var(--border); }
.modal-body { padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 10px; }
.modal-body label { font-size: 0.78rem; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; margin-top: 4px; }
.modal-body input, .modal-body textarea { background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.9rem; outline: none; transition: border-color 0.2s; width: 100%; resize: vertical; }
.modal-body input:focus, .modal-body textarea:focus { border-color: var(--gold); }
.modal-body input::placeholder, .modal-body textarea::placeholder { color: var(--text3); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 1rem 1.4rem; border-top: 1px solid var(--border); }
.divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ── Color Picker ── */
.color-picker-row { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: white; box-shadow: 0 0 0 2px rgba(255,255,255,0.3); }

/* ══ TOAST ════════════════════════════════════════════════════════════════ */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-sm); padding: 0.65rem 1.25rem; font-size: 0.85rem; color: var(--text); box-shadow: var(--shadow); z-index: 400; opacity: 0; transition: all 0.3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .header-inner { padding: 0 1rem; }
  .main-content { padding: 1rem; }
  .subjects-grid { grid-template-columns: 1fr; }
  .notes-sidebar { width: 100%; }
  .logo-sub { display: none; }
  .progress-overview { padding: 0.75rem 1rem; }
  .profiles-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .header-actions { gap: 6px; }
}

/* ══════════════════════════════════════════════════════════════
   COUNTDOWN CHIP
   ══════════════════════════════════════════════════════════════ */
.countdown-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245,200,66,0.12), rgba(62,207,142,0.08));
  border: 1px solid rgba(245,200,66,0.3);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.countdown-chip:hover { border-color: var(--gold); background: linear-gradient(135deg, rgba(245,200,66,0.2), rgba(62,207,142,0.12)); }
.countdown-icon { font-size: 1.2rem; }
.countdown-days {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.countdown-label { font-size: 0.68rem; color: var(--text3); margin-top: 1px; white-space: nowrap; }
.countdown-chip.urgent .countdown-days { color: var(--red); }
.countdown-chip.urgent { border-color: rgba(245,101,101,0.4); background: rgba(245,101,101,0.08); }
.countdown-chip.done .countdown-days { color: var(--green); font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════════════
   POMODORO
   ══════════════════════════════════════════════════════════════ */

/* Floating action button */
.pomodoro-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  transition: all 0.2s;
  user-select: none;
}
.pomodoro-fab:hover { transform: scale(1.1); border-color: var(--gold); box-shadow: 0 6px 24px rgba(245,200,66,0.2); }
.pomodoro-fab.running { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62,207,142,0.2); animation: pom-pulse 2s ease infinite; }
.pomodoro-fab.break-running { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,0.2); }

@keyframes pom-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(62,207,142,0.2); } 50% { box-shadow: 0 0 0 6px rgba(62,207,142,0.08); } }

/* Widget panel */
.pomodoro-widget {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  z-index: 149;
  overflow: hidden;
  animation: slideUpFade 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUpFade { from { opacity:0; transform:translateY(16px) scale(0.96); } to { opacity:1; transform:translateY(0) scale(1); } }

.pom-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.pom-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem; }
.pom-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 0.9rem; padding: 2px 6px; border-radius: 4px; transition: all 0.15s; }
.pom-close:hover { color: var(--text); background: var(--border); }

/* Mode tabs */
.pom-mode-tabs { display: flex; padding: 0.5rem; gap: 4px; background: var(--bg3); }
.pom-tab {
  flex: 1; background: transparent; border: none;
  color: var(--text3); font-size: 0.75rem; font-weight: 500;
  padding: 0.4rem 0.3rem; border-radius: 6px; cursor: pointer;
  transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.pom-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.pom-tab:hover:not(.active) { color: var(--text2); }

/* Timer ring */
.pom-timer-display {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 1.25rem 0 0.5rem;
}
.pom-ring-svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.pom-ring-bg { fill: none; stroke: var(--bg3); stroke-width: 8; }
.pom-ring-progress {
  fill: none; stroke: var(--green); stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.pom-ring-progress.break-mode { stroke: #60a5fa; }
.pom-time {
  position: absolute;
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}

/* Session dots */
.pom-session-info {
  text-align: center; font-size: 0.78rem; color: var(--text3);
  padding: 0 1rem 0.5rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pom-session-dots { display: flex; gap: 4px; }
.pom-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border2); transition: background 0.3s;
}
.pom-dot.done { background: var(--green); }
.pom-dot.current { background: var(--gold); }

/* Controls */
.pom-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 0.5rem 1rem 0.75rem;
}
.pom-btn-play {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green); color: white; border: none;
  font-size: 1.2rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.pom-btn-play:hover { transform: scale(1.08); }
.pom-btn-play.break-mode { background: #60a5fa; }
.pom-btn-ctrl {
  background: transparent; border: 1px solid var(--border2);
  color: var(--text2); width: 36px; height: 36px; border-radius: 50%;
  font-size: 1rem; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.pom-btn-ctrl:hover { border-color: var(--text2); color: var(--text); }

.pom-footer {
  text-align: center; font-size: 0.75rem; color: var(--text3);
  padding: 0 1rem 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}

@media (max-width: 640px) {
  .pomodoro-widget { right: 1rem; left: 1rem; width: auto; bottom: 5rem; }
  .pomodoro-fab { bottom: 1.25rem; right: 1.25rem; }
  .countdown-chip { display: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   NOTES TABS + DONE STATE
   ══════════════════════════════════════════════════════════════ */
.notes-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0.75rem 0.5rem;
  flex-shrink: 0;
}
.notes-tab {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text3);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.notes-tab:hover { color: var(--text2); border-color: var(--border2); }
.notes-tab.active {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}
.notes-tab-count {
  background: var(--bg3);
  border-radius: 99px;
  padding: 0px 6px;
  font-size: 0.7rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}
.notes-tab.active .notes-tab-count { background: var(--border2); }

/* Note card done checkbox */
.note-card-check {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.65rem;
  color: rgba(0,0,0,0.5);
  transition: all 0.2s;
  z-index: 2;
}
.note-card-check:hover { background: rgba(255,255,255,0.8); border-color: rgba(0,0,0,0.4); transform: scale(1.1); }
.note-card-check.checked { background: #22c55e; border-color: #16a34a; color: white; }

/* Done note card styling */
.note-card.is-done { opacity: 0.7; }
.note-card.is-done .note-card-title { text-decoration: line-through; color: rgba(0,0,0,0.5); }
.note-card.is-done .note-card-preview { color: rgba(0,0,0,0.4); }

/* Done tab empty state */
.notes-done-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text3);
  font-size: 0.82rem;
  line-height: 1.6;
}
.notes-done-empty .done-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ══════════════════════════════════════════════════════════════
   PROFILE MENU — DANGER ITEM + DIVIDER
   ══════════════════════════════════════════════════════════════ */
.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.profile-menu-danger {
  color: var(--red) !important;
}
.profile-menu-danger:hover {
  background: rgba(245, 101, 101, 0.1) !important;
}

/* ══════════════════════════════════════════════════════════════
   EMAIL VERIFICATION
   ══════════════════════════════════════════════════════════════ */
.verify-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.75rem;
  animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bounceIn {
  from { opacity:0; transform: scale(0.5); }
  to   { opacity:1; transform: scale(1); }
}

.verify-code-input {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  letter-spacing: 10px !important;
  text-align: center !important;
  font-family: 'Syne', monospace !important;
  color: var(--gold) !important;
  padding: 0.75rem 1rem !important;
  border-color: var(--border2) !important;
}
.verify-code-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(245,200,66,0.15);
}

/* Resend link cooldown */
.resend-cooldown { color: var(--text3) !important; cursor: default !important; text-decoration: none !important; }

/* ══════════════════════════════════════════════════════════════
   PROFILE SEARCH BAR
   ══════════════════════════════════════════════════════════════ */
.profile-search-wrap {
  max-width: 480px;
  margin: 1.75rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.profile-search-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.profile-search-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 99px;
  padding: 0.75rem 2.75rem 0.75rem 2.75rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.profile-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.12), 0 2px 12px rgba(0,0,0,0.2);
  background: var(--surface2);
}
.profile-search-input::placeholder { color: var(--text3); }

.profile-search-clear {
  position: absolute;
  right: 12px;
  background: var(--surface2);
  border: none;
  color: var(--text3);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.profile-search-clear:hover { background: var(--border2); color: var(--text); }

.profile-search-count {
  font-size: 0.78rem;
  color: var(--text3);
  min-height: 18px;
  transition: opacity 0.2s;
}
.profile-search-count.has-results { color: var(--text2); }

/* Highlight matching text in cards */
.search-highlight {
  background: rgba(245,200,66,0.25);
  color: var(--gold);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 600;
}

/* No results state */
.no-results-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text3);
}
.no-results-state .no-results-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.no-results-state p { font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text2); }
.no-results-state span { font-size: 0.82rem; }

/* Profile card — hide animation for search filter */
.profile-card.hidden { display: none; }
.profile-card.search-match { animation: none; }

@media (max-width: 640px) {
  .profile-search-wrap { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   USERNAME INPUT WITH @ PREFIX
   ══════════════════════════════════════════════════════════════ */
.username-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.username-at {
  position: absolute;
  left: 12px;
  color: var(--gold);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 1;
}
.username-input-wrap input {
  padding-left: 28px !important;
  font-family: 'DM Sans', monospace !important;
  letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════════════════════
   TWO-COLUMN TRACKER LAYOUT + AI MOTIVATION PANEL
   ══════════════════════════════════════════════════════════════ */

/* Override main-content padding for the new layout */
.main-content {
  max-width: 1500px !important;
  padding: 1.5rem 2rem !important;
}

.tracker-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.subjects-column { min-width: 0; }

/* ── Motivation Panel ── */
.motivation-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 80px;  /* below header */
  animation: slideUp 0.4s ease both;
}

.motivation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem 0.7rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(245,200,66,0.06), transparent);
}

.motivation-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.motivation-spark {
  font-size: 1rem;
  animation: sparkle 2.5s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50%       { transform: scale(1.2) rotate(10deg); opacity: 0.8; }
}


.motivation-body { padding: 1rem; min-height: 120px; }

/* Loading dots */
.motivation-loading { text-align: center; padding: 1rem 0; }
.motivation-loading-dots { display: flex; justify-content: center; gap: 6px; }
.motivation-loading-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.3;
  animation: dotPulse 1.4s ease infinite;
}
.motivation-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.motivation-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1.1); }
}

/* Message text */
.motivation-message {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text2);
  font-style: italic;
}
.motivation-message strong {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}
.motivation-message .motivation-highlight {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
}

.motivation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0.75rem;
  font-size: 0.7rem;
}
.motivation-date { color: var(--text3); }
.motivation-powered {
  color: var(--text3);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.motivation-divider {
  height: 1px;
  background: var(--border);
  margin: 0 1rem;
}

/* Study tip */
.motivation-tip {
  padding: 0.85rem 1rem;
}
.tip-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
}
.tip-text {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .tracker-layout {
    grid-template-columns: 1fr;
  }
  .motivation-panel {
    position: static;
  }
}
@media (max-width: 640px) {
  .main-content { padding: 1rem !important; }
}

/* ══════════════════════════════════════════════════════════════
   AUTH SUCCESS MESSAGE
   ══════════════════════════════════════════════════════════════ */
.auth-success {
  font-size: 0.85rem;
  color: var(--green);
  background: rgba(62, 207, 142, 0.08);
  border: 1px solid rgba(62, 207, 142, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  line-height: 1.5;
}

/* Rate limit error styling */
.auth-error.rate-limit {
  color: #f97316;
}

/* ── Motivation day badge ── */
.motivation-day-badge {
  font-size: 0.7rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--text3);
  background: var(--bg3);
  border-radius: 99px;
  padding: 2px 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   THEMES — 4 total (default dark + 3 extras)
   Applied via data-theme attribute on <html>
   ══════════════════════════════════════════════════════════════ */

/* ── THEME 1: Sakura (Pink & Cream — feminine, soft) ── */
[data-theme="sakura"] {
  --bg:         #fdf6f0;
  --bg2:        #faeee7;
  --bg3:        #f5e3d8;
  --surface:    #ffffff;
  --surface2:   #fef0eb;
  --border:     rgba(210,130,120,0.15);
  --border2:    rgba(210,130,120,0.28);
  --text:       #3d2020;
  --text2:      #8a5a5a;
  --text3:      #b88a8a;
  --gold:       #e8607a;
  --gold2:      #d44f68;
  --green:      #d45f8a;
  --green-dim:  #f9d0dc;
  --red:        #c0392b;
  --shadow:     0 8px 32px rgba(200,100,100,0.12);
  --shadow-sm:  0 2px 12px rgba(200,100,100,0.08);
}
[data-theme="sakura"] body {
  background: var(--bg);
  color: var(--text);
}
[data-theme="sakura"] .site-header {
  background: rgba(253,246,240,0.92);
  border-bottom-color: var(--border2);
}
[data-theme="sakura"] .auth-wrap {
  background: radial-gradient(ellipse at 50% 0%, rgba(232,96,122,0.08) 0%, transparent 60%), var(--bg);
}
[data-theme="sakura"] .btn-primary { color: #fff; }
[data-theme="sakura"] .btn-primary:hover { box-shadow: 0 4px 16px rgba(232,96,122,0.35); }
[data-theme="sakura"] .notes-badge { color: #fff; }
[data-theme="sakura"] .progress-overview { background: var(--bg2); }
[data-theme="sakura"] .overview-fill { background: linear-gradient(90deg, #e8607a, #d45f8a); }
[data-theme="sakura"] .custom-checkbox.checked { border-color: #e8607a; background: #e8607a; }
[data-theme="sakura"] .custom-checkbox.partial { border-color: #e8607a; color: #e8607a; }
[data-theme="sakura"] .topic-checkbox.checked { border-color: #e8607a; background: #e8607a; }
[data-theme="sakura"] .modal-backdrop { background: rgba(80,20,20,0.45); }
[data-theme="sakura"] .search-highlight { background: rgba(232,96,122,0.18); color: var(--gold); }
[data-theme="sakura"] .countdown-chip {
  background: linear-gradient(135deg, rgba(232,96,122,0.1), rgba(212,95,138,0.07));
  border-color: rgba(232,96,122,0.3);
}
[data-theme="sakura"] .motivation-header {
  background: linear-gradient(135deg, rgba(232,96,122,0.06), transparent);
}
[data-theme="sakura"] .motivation-loading-dots span { background: var(--gold); }
[data-theme="sakura"] .pom-ring-progress { stroke: #e8607a; }
[data-theme="sakura"] .pom-btn-play { background: #e8607a; }
[data-theme="sakura"] .auth-success {
  color: #c0392b; background: rgba(232,96,122,0.08);
  border-color: rgba(232,96,122,0.25);
}

/* ── THEME 2: Matcha (Sage green & warm white — earthy, calm) ── */
[data-theme="matcha"] {
  --bg:         #f4f7f2;
  --bg2:        #eaf0e6;
  --bg3:        #dde8d8;
  --surface:    #ffffff;
  --surface2:   #edf4ea;
  --border:     rgba(90,130,80,0.15);
  --border2:    rgba(90,130,80,0.25);
  --text:       #1e2e1a;
  --text2:      #5a7850;
  --text3:      #8aaa7a;
  --gold:       #5a9a40;
  --gold2:      #4a8832;
  --green:      #5a9a40;
  --green-dim:  #d0e8c8;
  --red:        #c0392b;
  --shadow:     0 8px 32px rgba(60,100,40,0.12);
  --shadow-sm:  0 2px 12px rgba(60,100,40,0.08);
}
[data-theme="matcha"] body { background: var(--bg); color: var(--text); }
[data-theme="matcha"] .site-header {
  background: rgba(244,247,242,0.92);
  border-bottom-color: var(--border2);
}
[data-theme="matcha"] .auth-wrap {
  background: radial-gradient(ellipse at 50% 0%, rgba(90,154,64,0.08) 0%, transparent 60%), var(--bg);
}
[data-theme="matcha"] .btn-primary { color: #fff; }
[data-theme="matcha"] .btn-primary:hover { box-shadow: 0 4px 16px rgba(90,154,64,0.3); }
[data-theme="matcha"] .notes-badge { color: #fff; }
[data-theme="matcha"] .progress-overview { background: var(--bg2); }
[data-theme="matcha"] .overview-fill { background: linear-gradient(90deg, #5a9a40, #3ecf8e); }
[data-theme="matcha"] .custom-checkbox.checked { border-color: #5a9a40; background: #5a9a40; }
[data-theme="matcha"] .custom-checkbox.partial { border-color: #5a9a40; color: #5a9a40; }
[data-theme="matcha"] .topic-checkbox.checked { border-color: #5a9a40; background: #5a9a40; }
[data-theme="matcha"] .modal-backdrop { background: rgba(20,40,15,0.45); }
[data-theme="matcha"] .search-highlight { background: rgba(90,154,64,0.18); color: var(--gold); }
[data-theme="matcha"] .countdown-chip {
  background: linear-gradient(135deg, rgba(90,154,64,0.1), rgba(62,207,142,0.07));
  border-color: rgba(90,154,64,0.3);
}
[data-theme="matcha"] .motivation-header {
  background: linear-gradient(135deg, rgba(90,154,64,0.06), transparent);
}
[data-theme="matcha"] .motivation-loading-dots span { background: var(--gold); }
[data-theme="matcha"] .pom-ring-progress { stroke: #5a9a40; }
[data-theme="matcha"] .pom-btn-play { background: #5a9a40; }
[data-theme="matcha"] .auth-success {
  color: #5a9a40; background: rgba(90,154,64,0.08);
  border-color: rgba(90,154,64,0.25);
}

/* ── THEME 3: Midnight Lavender (deep purple & soft lilac) ── */
[data-theme="lavender"] {
  --bg:         #13101e;
  --bg2:        #1a1628;
  --bg3:        #221d33;
  --surface:    #261f3a;
  --surface2:   #2e2848;
  --border:     rgba(180,150,255,0.1);
  --border2:    rgba(180,150,255,0.18);
  --text:       #ede8ff;
  --text2:      #9d90c8;
  --text3:      #6a5f90;
  --gold:       #b48eff;
  --gold2:      #9f75f0;
  --green:      #7ec8a0;
  --green-dim:  #1a4035;
  --red:        #f56565;
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-sm:  0 2px 12px rgba(0,0,0,0.3);
}
[data-theme="lavender"] body { background: var(--bg); color: var(--text); }
[data-theme="lavender"] .site-header {
  background: rgba(19,16,30,0.92);
  border-bottom-color: var(--border2);
}
[data-theme="lavender"] .auth-wrap {
  background: radial-gradient(ellipse at 50% 0%, rgba(180,142,255,0.08) 0%, transparent 60%), var(--bg);
}
[data-theme="lavender"] .btn-primary { color: #13101e; }
[data-theme="lavender"] .btn-primary:hover { box-shadow: 0 4px 16px rgba(180,142,255,0.3); }
[data-theme="lavender"] .notes-badge { color: #13101e; }
[data-theme="lavender"] .progress-overview { background: var(--bg2); }
[data-theme="lavender"] .overview-fill { background: linear-gradient(90deg, #b48eff, #7ec8a0); }
[data-theme="lavender"] .custom-checkbox.checked { border-color: #7ec8a0; background: #7ec8a0; }
[data-theme="lavender"] .custom-checkbox.partial { border-color: #b48eff; color: #b48eff; }
[data-theme="lavender"] .topic-checkbox.checked { border-color: #7ec8a0; background: #7ec8a0; color: #13101e; }
[data-theme="lavender"] .search-highlight { background: rgba(180,142,255,0.2); color: var(--gold); }
[data-theme="lavender"] .countdown-chip {
  background: linear-gradient(135deg, rgba(180,142,255,0.1), rgba(126,200,160,0.07));
  border-color: rgba(180,142,255,0.3);
}
[data-theme="lavender"] .motivation-header {
  background: linear-gradient(135deg, rgba(180,142,255,0.06), transparent);
}
[data-theme="lavender"] .motivation-loading-dots span { background: var(--gold); }
[data-theme="lavender"] .pom-ring-progress { stroke: #b48eff; }
[data-theme="lavender"] .pom-btn-play { background: #b48eff; color: #13101e; }
[data-theme="lavender"] .auth-success {
  color: #7ec8a0; background: rgba(126,200,160,0.08);
  border-color: rgba(126,200,160,0.25);
}

/* ══ THEME SWITCHER BUTTON ══════════════════════════════════════ */
.theme-switcher {
  position: relative;
}
.theme-btn {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  padding: 0.45rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  display: flex; align-items: center; gap: 6px;
}
.theme-btn:hover { border-color: var(--gold); color: var(--text); }
.theme-btn span { font-size: 0.75rem; font-family: 'Syne', sans-serif; font-weight: 600; }

.theme-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); min-width: 170px;
  box-shadow: var(--shadow); z-index: 300;
  overflow: hidden; display: none;
  animation: modalIn 0.15s ease;
}
.theme-dropdown.open { display: block; }
.theme-option {
  display: flex; align-items: center; gap: 10px;
  padding: 0.65rem 1rem; cursor: pointer;
  font-size: 0.85rem; transition: background 0.15s;
  color: var(--text2);
}
.theme-option:hover { background: var(--surface2); color: var(--text); }
.theme-option.active { color: var(--gold); font-weight: 600; }
.theme-swatch {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

/* ── THEME 4: Ocean (Light blue & white — clean, fresh) ── */
[data-theme="ocean"] {
  --bg:         #f0f7ff;
  --bg2:        #e3f0fd;
  --bg3:        #d0e6fa;
  --surface:    #ffffff;
  --surface2:   #eaf4ff;
  --border:     rgba(60,130,210,0.15);
  --border2:    rgba(60,130,210,0.25);
  --text:       #0d2340;
  --text2:      #3a6898;
  --text3:      #7aaace;
  --gold:       #1a7fd4;
  --gold2:      #1268b8;
  --green:      #1a9e6e;
  --green-dim:  #c8eee0;
  --red:        #e03e3e;
  --shadow:     0 8px 32px rgba(30,100,200,0.1);
  --shadow-sm:  0 2px 12px rgba(30,100,200,0.07);
}
[data-theme="ocean"] body { background: var(--bg); color: var(--text); }
[data-theme="ocean"] .site-header {
  background: rgba(240,247,255,0.92);
  border-bottom-color: var(--border2);
}
[data-theme="ocean"] .auth-wrap {
  background: radial-gradient(ellipse at 50% 0%, rgba(26,127,212,0.08) 0%, transparent 60%), var(--bg);
}
[data-theme="ocean"] .btn-primary { color: #fff; }
[data-theme="ocean"] .btn-primary:hover { box-shadow: 0 4px 16px rgba(26,127,212,0.3); }
[data-theme="ocean"] .notes-badge { color: #fff; }
[data-theme="ocean"] .progress-overview { background: var(--bg2); }
[data-theme="ocean"] .overview-fill { background: linear-gradient(90deg, #1a7fd4, #1a9e6e); }
[data-theme="ocean"] .custom-checkbox.checked { border-color: #1a9e6e; background: #1a9e6e; }
[data-theme="ocean"] .custom-checkbox.partial { border-color: #1a7fd4; color: #1a7fd4; }
[data-theme="ocean"] .topic-checkbox.checked { border-color: #1a9e6e; background: #1a9e6e; }
[data-theme="ocean"] .modal-backdrop { background: rgba(10,30,60,0.45); }
[data-theme="ocean"] .search-highlight { background: rgba(26,127,212,0.15); color: var(--gold); }
[data-theme="ocean"] .countdown-chip {
  background: linear-gradient(135deg, rgba(26,127,212,0.1), rgba(26,158,110,0.07));
  border-color: rgba(26,127,212,0.3);
}
[data-theme="ocean"] .motivation-header {
  background: linear-gradient(135deg, rgba(26,127,212,0.06), transparent);
}
[data-theme="ocean"] .motivation-loading-dots span { background: var(--gold); }
[data-theme="ocean"] .pom-ring-progress { stroke: #1a7fd4; }
[data-theme="ocean"] .pom-btn-play { background: #1a7fd4; }
[data-theme="ocean"] .auth-success {
  color: #1a9e6e; background: rgba(26,158,110,0.08);
  border-color: rgba(26,158,110,0.25);
}

/* ══════════════════════════════════════════════════════════════
   TOPIC NOTES
   ══════════════════════════════════════════════════════════════ */
.topic-note-btn {
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  font-size: 0.75rem !important;
}
.topic-item:hover .topic-note-btn { opacity: 1; }
.topic-note-btn.has-note {
  opacity: 1;
  color: var(--gold) !important;
}

.topic-note-row {
  background: var(--bg2);
  border-top: 1px dashed var(--border2);
  padding: 0.6rem 0.5rem 0.5rem;
  animation: slideUp 0.15s ease;
}
.topic-note-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 64px;
  outline: none;
  transition: border-color 0.2s;
}
.topic-note-input:focus { border-color: var(--gold); }
.topic-note-input::placeholder { color: var(--text3); }
.topic-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.topic-note-hint {
  font-size: 0.72rem;
  color: var(--text3);
}

/* ══════════════════════════════════════════════════════════════
   FLASHCARD QUIZ
   ══════════════════════════════════════════════════════════════ */
.modal-flashcard {
  max-width: 520px;
  overflow: hidden;
}

.fc-progress-wrap {
  height: 4px;
  background: var(--bg3);
  width: 100%;
}
.fc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--green));
  border-radius: 0 99px 99px 0;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}

.fc-stats-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.fc-counter {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--text3);
  margin-right: auto;
}
.fc-stat {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
}
.fc-stat.got    { color: var(--green); }
.fc-stat.missed { color: var(--red); }

.fc-card-area {
  padding: 1.25rem 1.4rem;
}

.fc-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  animation: modalIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.fc-color-bar {
  height: 5px;
  width: 100%;
}
.fc-card-inner {
  padding: 1.25rem;
}
.fc-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
}
.fc-topic-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.fc-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}
.fc-note {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.7;
  white-space: pre-wrap;
  animation: slideUp 0.2s ease;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  border-left: 3px solid var(--gold);
}
.fc-reveal-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem;
  background: var(--surface2);
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.fc-reveal-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--bg3);
}

.fc-answer-btns {
  display: flex;
  gap: 10px;
  animation: slideUp 0.15s ease;
}
.fc-btn-got, .fc-btn-missed {
  flex: 1;
  padding: 0.7rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.fc-btn-got {
  background: var(--green);
  color: white;
}
.fc-btn-got:hover { opacity: 0.88; transform: translateY(-1px); }
.fc-btn-missed {
  background: rgba(245,101,101,0.12);
  color: var(--red);
  border: 1px solid rgba(245,101,101,0.3);
}
.fc-btn-missed:hover { background: rgba(245,101,101,0.2); transform: translateY(-1px); }

/* Result screen */
.fc-result-area {
  padding: 2rem 1.4rem;
  text-align: center;
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.fc-result-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes bounceIn {
  from { opacity:0; transform:scale(0.4); }
  to   { opacity:1; transform:scale(1); }
}
.fc-result-msg {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.fc-result-score {
  font-size: 0.9rem;
  color: var(--text2);
  margin-bottom: 1.25rem;
}
.fc-result-breakdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}
.fc-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Light theme fixes for flashcard */
[data-theme="sakura"] .fc-note,
[data-theme="matcha"] .fc-note,
[data-theme="ocean"]  .fc-note  { background: var(--bg3); }
[data-theme="sakura"] .fc-card,
[data-theme="matcha"] .fc-card,
[data-theme="ocean"]  .fc-card  { background: var(--bg2); }

/* ══════════════════════════════════════════════════════════════
   FLASHCARD SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.flashcard-sidebar {
  position: fixed; top: 0; right: 0;
  width: 680px; height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.flashcard-sidebar.open { transform: translateX(0); }
.flashcard-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199; display: none;
  backdrop-filter: blur(2px);
}
.flashcard-overlay.open { display: block; }

.fc-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.fc-sidebar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 1rem;
}

.fc-sidebar-body {
  display: flex; flex: 1; overflow: hidden;
}

/* Subject list column */
.fc-subject-col {
  width: 200px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.fc-col-label {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 0.75rem 1rem 0.5rem;
  flex-shrink: 0;
}
.fc-subject-list {
  flex: 1; overflow-y: auto;
  padding: 0 0.5rem 1rem;
  display: flex; flex-direction: column; gap: 2px;
}
.fc-subject-item {
  display: flex; align-items: center; gap: 8px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  font-size: 0.83rem; color: var(--text2);
}
.fc-subject-item:hover { background: var(--surface2); color: var(--text); }
.fc-subject-item.active { background: var(--surface); color: var(--text); font-weight: 600; }
.fc-subject-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.fc-subject-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fc-subject-count {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.72rem; color: var(--text3);
  background: var(--bg3); border-radius: 99px;
  padding: 1px 7px; flex-shrink: 0;
}

/* Card editor panel */
.fc-panel {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.fc-panel-bar { height: 4px; flex-shrink: 0; }
.fc-panel-inner {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.fc-panel-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1rem;
  color: var(--text);
}

/* Existing cards list */
.fc-cards-list {
  display: flex; flex-direction: column; gap: 8px;
}
.fc-card-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  transition: border-color 0.2s;
}
.fc-card-item:hover { border-color: var(--border2); }
.fc-card-num {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.72rem; color: var(--text3);
  background: var(--bg3); border-radius: 99px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.fc-card-content { flex: 1; min-width: 0; }
.fc-card-q {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text); margin-bottom: 4px;
  line-height: 1.4;
}
.fc-card-a {
  font-size: 0.8rem; color: var(--text2);
  border-left: 2px solid var(--border2);
  padding-left: 8px; line-height: 1.5;
}

/* Add form */
.fc-add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}
.fc-add-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fc-input, .fc-textarea {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  outline: none; transition: border-color 0.2s;
  width: 100%;
}
.fc-input:focus, .fc-textarea:focus { border-color: var(--gold); }
.fc-input::placeholder, .fc-textarea::placeholder { color: var(--text3); }
.fc-textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.fc-empty {
  text-align: center; padding: 1.5rem 1rem;
  font-size: 0.83rem; color: var(--text3);
  line-height: 1.6;
}

/* Quiz button on subject card */
.btn-quiz {
  font-size: 0.75rem !important;
  padding: 3px 8px !important;
  border: 1px solid var(--border2) !important;
  border-radius: 6px !important;
  color: var(--text2) !important;
  display: flex; align-items: center; gap: 4px;
}
.btn-quiz:hover { border-color: var(--gold) !important; color: var(--gold) !important; }

/* ══════════════════════════════════════════════════════════════
   QUIZ MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-quiz { max-width: 500px; }

.quiz-subject-name {
  font-size: 0.78rem; color: var(--text3); margin-top: 2px;
}
.quiz-color-bar { height: 4px; width: 100%; }
.quiz-progress-wrap { height: 3px; background: var(--bg3); }
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--green));
  transition: width 0.4s ease;
  width: 0%;
}
.quiz-stats-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0.55rem 1.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.quiz-counter {
  font-family: 'Syne', sans-serif; font-weight: 700;
  color: var(--text3); margin-right: auto;
}
.quiz-stat { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.78rem; }
.quiz-stat.got    { color: var(--green); }
.quiz-stat.missed { color: var(--red); }

.quiz-card-area { padding: 1.25rem 1.4rem; }
.quiz-card {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1.25rem;
  margin-bottom: 1rem;
  animation: modalIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.quiz-card-label {
  font-size: 0.7rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 8px;
}
.quiz-question {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); line-height: 1.4; margin-bottom: 1rem;
}
.quiz-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }
.quiz-answer {
  font-size: 0.88rem; color: var(--text2); line-height: 1.7;
  background: var(--surface2); border-radius: var(--radius-sm);
  padding: 0.75rem; border-left: 3px solid var(--gold);
  white-space: pre-wrap;
  animation: slideUp 0.2s ease;
}
.quiz-reveal-btn {
  width: 100%; margin-top: 0.5rem; padding: 0.65rem;
  background: var(--surface2); border: 1.5px dashed var(--border2);
  border-radius: var(--radius-sm); color: var(--text2);
  font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.quiz-reveal-btn:hover { border-color: var(--gold); color: var(--gold); }
.quiz-answer-btns {
  display: flex; gap: 10px;
  animation: slideUp 0.15s ease;
}
.quiz-btn-got, .quiz-btn-missed {
  flex: 1; padding: 0.7rem; border: none;
  border-radius: var(--radius-sm);
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
}
.quiz-btn-got    { background: var(--green); color: white; }
.quiz-btn-got:hover    { opacity: 0.88; transform: translateY(-1px); }
.quiz-btn-missed { background: rgba(245,101,101,0.12); color: var(--red); border: 1px solid rgba(245,101,101,0.3); }
.quiz-btn-missed:hover { background: rgba(245,101,101,0.2); transform: translateY(-1px); }

.quiz-result-area {
  padding: 2rem 1.4rem; text-align: center;
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.quiz-result-emoji { font-size: 3.5rem; margin-bottom: 0.75rem; animation: bounceIn 0.5s cubic-bezier(0.34,1.56,0.64,1); }
.quiz-result-msg   { font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.quiz-result-score { font-size: 0.9rem; color: var(--text2); margin-bottom: 1.25rem; }
.quiz-result-breakdown { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; font-size: 0.88rem; }
.quiz-result-actions   { display: flex; gap: 10px; justify-content: center; }

@media (max-width: 768px) {
  .flashcard-sidebar { width: 100%; }
  .fc-subject-col    { width: 140px; }
}

/* ── Flashcard sidebar — sub-subject items ── */
.fc-ss-item {
  display: flex; align-items: center; gap: 6px;
  padding: 0.4rem 0.75rem 0.4rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s;
  font-size: 0.78rem; color: var(--text3);
}
.fc-ss-item:hover { background: var(--surface2); color: var(--text2); }
.fc-ss-item.active { background: var(--surface); color: var(--text); font-weight: 600; }
.fc-ss-dash { color: var(--border2); font-size: 0.7rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   FONT UPGRADES — Plus Jakarta Sans for key readable elements
   ══════════════════════════════════════════════════════════════ */

/* BoardPrep PH logo title */
.logo-title {
  font-family: 'Syne', sans-serif !important;
  font-weight: 800;
  font-size: 1.25rem !important;
  letter-spacing: -0.5px;
}

/* Countdown days number */
.countdown-days {
  font-family: 'Syne', sans-serif !important;
  font-weight: 800;
}

/* Countdown label text */
.countdown-label {
  font-family: 'DM Sans', sans-serif !important;
}

/* Quiz modal — question text */
.quiz-question {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.45;
}

/* Quiz modal — answer text */
.quiz-answer {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 400;
  line-height: 1.75;
}

/* Quiz modal — result message */
.quiz-result-msg {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800;
  letter-spacing: -0.3px;
}

/* Quiz modal — score text */
.quiz-result-score {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Flashcard sidebar — card question */
.fc-card-q {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600;
}

/* Flashcard sidebar — card answer */
.fc-card-a {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 400;
}

/* Flashcard panel title */
.fc-panel-title {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800;
  letter-spacing: -0.3px;
}