@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #0f0d12;
  --bg-2: #15131b;
  --card: #1a1822;
  --muted: #a7a2b4;
  --text: #efeaf9;
  --accent: #ffb347;
  --accent-2: #4ce7e2;
  --accent-3: #f26b6b;
  --border: #2a2633;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: radial-gradient(1200px 500px at 20% -10%, #302445 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 0%, #1f3346 0%, transparent 60%),
    var(--bg);
  color: var(--text);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f97316, #facc15);
  color: #241408;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 12px;
}

.hero h1 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 38px;
  margin-top: 10px;
  line-height: 1.1;
}

.hero__sub {
  color: var(--muted);
  font-size: 15px;
  margin-top: 10px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.meta__pill {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat__value {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
}

.stat__label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.overview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.overview__note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.overview__bar {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.bar {
  height: 8px;
  background: #2a2633;
  border-radius: 999px;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
  transition: width 0.3s ease;
}

.overview__pct {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.filter.active,
.filter:hover {
  background: var(--accent);
  color: #1c140c;
  border-color: var(--accent);
}

.weeks__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.week-tab {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
}

.week-tab.active {
  background: var(--accent-2);
  color: #061b1b;
  border-color: var(--accent-2);
}

.week {
  display: none;
  animation: fadeIn 0.4s ease;
}

.week.active { display: block; }

.week__sub {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}

.pillar__head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
}

.pillar__tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.tag-cod { background: #203d66; color: #b7d5ff; }
.tag-thy { background: #1d4020; color: #b9e4b1; }
.tag-apt { background: #4a2f14; color: #f8d4a2; }
.tag-ai { background: #2c1a4b; color: #d6c1ff; }

.pillar__title {
  font-size: 14px;
  font-weight: 600;
}

.pillar__note {
  color: var(--muted);
  font-size: 11px;
}

.pillar__prog {
  font-size: 12px;
  color: var(--muted);
}

.pillar__chev {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.pillar.collapsed .pillar__chev {
  transform: rotate(-90deg);
}

.pillar__body {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
}

.group {
  margin-bottom: 12px;
}

.group__title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed #2b2736;
}

.item:last-child { border-bottom: none; }

.item input {
  margin-top: 3px;
  width: 14px;
  height: 14px;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.item__label {
  font-size: 13px;
}

.item__desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.item.completed .item__label,
.item.completed .item__desc {
  color: #7b7487;
  text-decoration: line-through;
}

.footer {
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .overview__bar { grid-template-columns: 1fr; }
  .overview__pct { text-align: left; }
  .pillar__head { grid-template-columns: auto 1fr; }
}

/* Day-wise layout additions */
/* Day-wise details dropdown */
.day-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #14111a;
  padding: 8px 10px;
}

.day-details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
}

.day-details summary::-webkit-details-marker { display: none; }

.day-details[open] summary {
  color: var(--text);
}

.day-md {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.day-sections {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.section-card {
  background: #171421;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.section-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent-2);
}

.section-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.section-body ul {
  padding-left: 16px;
  margin: 6px 0;
}

.section-body li {
  margin-bottom: 4px;
}

.section-callout {
  background: #1f1a2b;
  border: 1px dashed #2f2a3a;
  border-radius: 10px;
  padding: 8px 10px;
  color: #d7d0e6;
  margin: 6px 0;
}

.callout-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
  color: #f1e9ff;
}

.section-callout ul {
  padding-left: 16px;
  margin: 0;
}

.day-grid {
  display: grid;
  gap: 12px;
}

.day-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.day-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
}

.day-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.day-progress {
  font-size: 12px;
  color: var(--muted);
}

.day-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 12px;
}

.track {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.track-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.track-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.track-cod .track-badge { background: #203d66; color: #b7d5ff; }
.track-thy .track-badge { background: #1d4020; color: #b9e4b1; }
.track-apt .track-badge { background: #4a2f14; color: #f8d4a2; }
.track-prj .track-badge { background: #10363a; color: #b5e8ea; }
.track-ai .track-badge { background: #2c1a4b; color: #d6c1ff; }

.task {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed #2b2736;
}

.task:last-child { border-bottom: none; }

.task input {
  margin-top: 3px;
  width: 14px;
  height: 14px;
  accent-color: var(--accent-2);
  cursor: pointer;
}

.task-title {
  font-size: 13px;
}

.task-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.task.completed .task-title,
.task.completed .task-desc {
  color: #7b7487;
  text-decoration: line-through;
}

@media (max-width: 600px) {
  .day-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .day-sections { grid-template-columns: 1fr; }
}

/* ─── PREREQUISITES TAB ─────────────────────────────────────── */

.prereq-tab {
  background: linear-gradient(120deg, #2c1a4b, #1a2c4b) !important;
  border-color: #4a3070 !important;
  color: #d6c1ff !important;
}
.prereq-tab.active {
  background: linear-gradient(120deg, #7c3aed, #2563eb) !important;
  border-color: #7c3aed !important;
  color: #fff !important;
}

/* Hero banner inside prereq section */
.prereq-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #1a1330 0%, #0f1e33 100%);
  border: 1px solid #2e2448;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.prereq-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, #7c3aed, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.prereq-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.prereq-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 560px;
}

.prereq-progress-wrap {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prereq-progress-label {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.prereq-progress-label span {
  font-weight: 700;
  color: var(--text);
}

.prereq-pct {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  text-align: right;
}

/* 3-column grid of groups */
.prereq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.prereq-group {
  background: #14111c;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.prereq-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #1c1826;
  border-bottom: 1px solid var(--border);
}

.prereq-group__icon {
  font-size: 16px;
  line-height: 1;
}

.prereq-group__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.prereq-group__count {
  font-size: 11px;
  color: var(--muted);
  background: #2a2040;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.prereq-group__items {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Individual item row */
.prereq-item {
  border-radius: 8px;
  padding: 7px 8px;
  transition: background 0.15s ease;
}

.prereq-item:hover {
  background: #1f1a2e;
}

.prereq-item.done .prereq-item__name {
  color: #5a5070;
  text-decoration: line-through;
}

.prereq-item.done .prereq-item__desc {
  color: #3a3450;
}

.prereq-item__label {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.prereq-item__label input[type="checkbox"] {
  margin-top: 3px;
  width: 14px;
  height: 14px;
  accent-color: #7c3aed;
  cursor: pointer;
  flex-shrink: 0;
}

.prereq-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prereq-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.2s, text-decoration 0.2s;
}

.prereq-item__desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  transition: color 0.2s;
}

@media (max-width: 900px) {
  .prereq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prereq-hero { grid-template-columns: 1fr; }
  .prereq-progress-wrap { min-width: unset; }
  .prereq-progress-label, .prereq-pct { text-align: left; }
}

@media (max-width: 600px) {
  .prereq-grid { grid-template-columns: 1fr; }
}

/* ─── PRACTICE QUESTIONS PANEL ──────────────────────────────── */

.pq-panel {
  border: 1px solid #2a2640;
  border-radius: 12px;
  background: #0f0d17;
  overflow: hidden;
  margin-top: 2px;
}

.pq-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #c4b8e8;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.pq-panel > summary::-webkit-details-marker { display: none; }

.pq-panel[open] > summary {
  border-bottom: 1px solid #2a2640;
  color: var(--text);
}

.pq-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

/* Each question row — clickable link */
.pq-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #1c1a28;
  transition: background 0.15s ease;
}

.pq-row:last-child { border-bottom: none; }

.pq-row:hover {
  background: #1a1630;
}

.pq-icon {
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.pq-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pq-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pq-row:hover .pq-title {
  color: #c4aaff;
}

.pq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pq-company {
  font-size: 10px;
  background: #1e1a30;
  border: 1px solid #33294a;
  color: #8a80a8;
  padding: 1px 6px;
  border-radius: 999px;
}

.pq-right { flex-shrink: 0; }

/* Difficulty badges */
.pq-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pq-easy   { background: #0d2e1a; color: #4ade80; border: 1px solid #166534; }
.pq-med    { background: #2d1f08; color: #fbbf24; border: 1px solid #92400e; }
.pq-hard   { background: #2d0e0e; color: #f87171; border: 1px solid #991b1b; }

/* Codeforces rating badges */
.pq-cf          { background: #0e1a2d; color: #93c5fd; border: 1px solid #1e3a5f; }
.pq-cf-easy     { background: #0e1a2d; color: #6ee7b7; border: 1px solid #065f46; }
.pq-cf-med      { background: #1a1830; color: #a78bfa; border: 1px solid #4c1d95; }
.pq-cf-hard     { background: #2d0e0e; color: #fca5a5; border: 1px solid #7f1d1d; }
.pq-cf-expert   { background: #1c0a0a; color: #ef4444; border: 1px solid #b91c1c; }

@media (max-width: 600px) {
  .pq-row { grid-template-columns: 20px 1fr; }
  .pq-right { display: none; }
}

/* prereq practice panel (inside group card) */
.pq-prereq-panel { margin: 0 8px 8px; border-radius: 8px; }
.pq-prereq-panel > summary { font-size: 11px; padding: 6px 10px; color: #6ee7b7; }
.pq-prereq-panel[open] > summary { color: #a7f3d0; }
.pq-prereq-row { padding: 6px 10px; }
.pq-prereq-note { font-size: 10px; color: var(--muted); line-height: 1.4; }

/* ─── SHEETS FILTER BAR ─────────────────────────────────────── */
.sheets-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 0 4px;
}

.sheets-filter {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.18s ease;
}

.sheets-filter:hover {
  background: #1f1a2e;
  color: var(--text);
}

.sheets-filter.active {
  background: linear-gradient(120deg, #7c3aed, #2563eb);
  border-color: #7c3aed;
  color: #fff;
}

/* ─── SHEETS DONE-STATE ─────────────────────────────────────── */
.sheets-q-done {
  opacity: 0.55;
}

.pq-title-done {
  text-decoration: line-through;
  color: #5a5070 !important;
}

/* ─── TOPIC TAG ─────────────────────────────────────────────── */
.pq-topic-tag {
  color: #6ee7b7;
  font-weight: normal;
  font-size: 10px;
  margin-left: 8px;
}

/* ─── SHEETS CHECKBOX ───────────────────────────────────────── */
.sheets-cb {
  width: 14px;
  height: 14px;
  accent-color: #7c3aed;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
