@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: rgb(15, 15, 15);
  font-family: 'Outfit', sans-serif;
}

a { text-decoration: none; color: inherit; }

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

/* ================= SIDEBAR (reused) ================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 85px;
  height: 100vh;
  background-color: rgb(23, 23, 23);
  border-right: 1px solid rgb(87, 87, 87);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.sidebar-top {
  position: absolute;
  top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sidebar-bottom {
  position: absolute;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sidebar-icon {
  width: 60px;
  height: 60px;
  perspective: 1000px;
}

.flip-box {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  border-radius: 20%;
}

.flip-front,
.flip-back {
  cursor: pointer;
  position: absolute;
  inset: 0;
  border-radius: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  background-color: rgb(59, 59, 59);
}

.flip-front img {
  width: 30px;
  height: auto;
}

.flip-back {
  transform: rotateY(180deg);
  color: rgb(82, 235, 223);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  text-align: center;
}

.sidebar-icon:hover .flip-box {
  transform: rotateY(180deg);
}

.icon-offset-left { position: absolute; left: 18px; }
.icon-label-small { font-size: 10px; }

.sidebar-icon.active .flip-front {
  background-color: rgb(77, 220, 211);
}
.sidebar-icon.active .flip-front img {
  filter: brightness(0) saturate(100%);
}

/* ================= NAVBAR (reused) ================= */
.top-navbar {
  position: fixed;
  top: 0;
  left: 85px;
  width: calc(100% - 85px);
  height: 70px;
  background-color: rgb(23, 23, 23);
  border-bottom: 1px solid rgb(87, 87, 87);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 150;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}

.logo {
  height: 40px;
  width: auto;
  margin-left: 5px;
  margin-top: 5px;
}

.logo-mobile { display: none; }

/* search form */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 480px;
  max-width: clamp(260px, 40vw, 850px);
  margin-right: 20px;
}

.search-input {
  width: 100%;
  height: 40px;
  border-radius: 100px;
  padding-left: 20px;
  padding-right: 40px;
  font-size: 15px;
  box-shadow: 0 0 0 4px rgb(58, 58, 58);
  border: 2px solid rgb(77, 220, 211);
  background-color: rgb(36, 36, 36);
  color: white;
  font-family: 'Outfit', sans-serif;
  transition: max-width 0.2s ease, width 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Outfit', sans-serif;
}

.search-submit {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgb(77, 220, 211);
  background-color: rgb(77, 220, 211);
  cursor: pointer;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 0 0 auto;
}

.dashboard-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 35px;
  padding: 0 14px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  border: 1px solid rgb(67, 186, 176);
  color: rgb(67, 186, 176);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  color: rgb(82, 235, 223);
  font-size: 16px;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgb(67, 186, 176);
  object-fit: cover;
  background: rgb(59,59,59);
}

.notification img {
  display: block;
  cursor: pointer;
}

/* ================= PAGE LAYOUT ================= */
.main-content-area {
  position: fixed;
  top: 70px;
  left: 85px;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 110;
  padding: 32px 40px 60px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.page-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(82, 235, 223, 0.08);
  border: 1px solid rgb(67, 186, 176);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.page-header-icon img {
  width: 28px;
  height: auto;
}

.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 34px;
  color: rgb(82, 235, 223);
  margin: 0 0 6px;
}

.page-header p {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

/* ---- shared card ---- */
.panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgb(87, 87, 87);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 24px;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: rgb(82, 235, 223);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-all-btn {
  font-size: 13px;
  font-weight: 400;
  color: rgb(82, 235, 223);
  background: rgba(82, 235, 223, 0.08);
  border: 1px solid rgb(67, 186, 176);
  border-radius: 10px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
}

.view-all-btn:hover { background: rgba(82, 235, 223, 0.16); }

/* ---- Filters ---- */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto auto;
  gap: 16px;
  align-items: end;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-group label {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}

.field-group select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgb(87, 87, 87);
  background-color: rgb(30, 30, 30);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 0 12px;
  width: 100%;
  cursor: pointer;
}

.field-group select:focus {
  outline: none;
  border-color: rgb(77, 220, 211);
}

.field-group select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.4);
}

/* filled-in (a real choice has been made, not just the placeholder option) */
.field-group select.has-value {
  border-color: rgb(77, 220, 211);
}

.btn {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgb(87, 87, 87);
  background: rgb(30, 30, 30);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { background: rgb(42, 42, 42); }

.btn-primary {
  border: none;
  background: linear-gradient(90deg, rgb(67, 186, 176), rgb(82, 235, 223));
  color: rgb(10, 20, 20);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover { filter: brightness(1.05); }

.quick-picks {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quick-picks-label {
  font-size: 13px;
  color: rgb(82, 235, 223);
  font-weight: 500;
  margin-right: 4px;
}

.pill {
  border: 1px solid rgb(87, 87, 87);
  background: rgba(255, 255, 255, 0.03);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
}

.pill:hover,
.pill.active {
  border-color: rgb(77, 220, 211);
  background: rgba(82, 235, 223, 0.1);
  color: rgb(82, 235, 223);
}

/* ---- Progress panel ---- */
.progress-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(82, 235, 223, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.stat-icon img { width: 22px; height: auto; }

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 2px;
}

.stat-value {
  font-size: 24px;
  font-weight: 500;
  color: white;
  margin: 0;
}

.chart-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgb(60, 60, 60);
  border-radius: 14px;
  padding: 16px 20px 10px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-header span {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.chart-badge {
  background: rgb(82, 235, 223);
  color: rgb(10, 20, 20);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
}

#accuracyChart { width: 100%; height: auto; display: block; }

/* ---- two column layout: mode + continue ---- */
.columns-2 {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: start;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgb(87, 87, 87);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mode-option:last-of-type { margin-bottom: 20px; }

.mode-option:hover { border-color: rgba(77, 220, 211, 0.6); }

.mode-option.selected {
  border-color: rgb(77, 220, 211);
  background: rgba(82, 235, 223, 0.06);
}

.mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.mode-icon img { width: 20px; height: auto; }

.mode-text { flex: 1 1 auto; min-width: 0; }

.mode-text h4 {
  margin: 0 0 2px;
  font-size: 15.5px;
  font-weight: 500;
  color: white;
}

.mode-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.mode-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgb(87, 87, 87);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-option.selected .mode-radio {
  border-color: rgb(77, 220, 211);
  background: rgb(77, 220, 211);
}

.mode-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(10, 20, 20);
  display: none;
}

.mode-option.selected .mode-radio::after { display: block; }

/* ---- continue where left off ---- */
.continue-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.continue-item:last-of-type { border-bottom: none; }

.continue-text { flex: 1 1 auto; min-width: 0; }

.continue-text h4 {
  margin: 0 0 4px;
  font-size: 15.5px;
  font-weight: 500;
  color: white;
}

.continue-text p {
  margin: 0 0 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, rgb(67, 186, 176), rgb(82, 235, 223));
}

.continue-percent {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  width: 40px;
  text-align: right;
  flex-shrink: 0;
}

.continue-item .btn {
  flex-shrink: 0;
  background: rgba(82, 235, 223, 0.08);
  border-color: rgb(67, 186, 176);
  color: rgb(82, 235, 223);
}

.continue-item .btn:hover { background: rgba(82, 235, 223, 0.18); }

/* ---- recommended topics ---- */
.recommended-panel { margin-top: 24px; }

.recommended-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- tip bar ---- */
.tip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.tip-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tip-left img { width: 20px; height: auto; }

.tip-left span {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.75);
}

.tip-bar .link-arrow {
  color: rgb(82, 235, 223);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1150px) {
  .filters-grid { grid-template-columns: repeat(3, 1fr); }
  .progress-layout { grid-template-columns: 1fr; }
  .columns-2 { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 60px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-right: none;
    border-top: 1px solid rgb(87, 87, 87);
  }

  .sidebar-top, .sidebar-bottom { display: contents; }

  .sidebar-icon { width: 42px; height: 42px; }
  .flip-front img { width: 22px; }
  .icon-offset-left { position: static; left: auto; }

  .top-navbar {
    left: 0;
    width: 100%;
    height: 60px;
    padding: 0 12px;
  }

  .logo-desktop { display: none; }
  .logo-mobile { display: block; height: 40px; width: auto; }

  .dashboard-link { display: none; }
  .user-info span { display: none; }
  .user-info img { width: 30px; height: 30px; }

  .main-content-area {
    left: 0;
    top: 60px;
    bottom: 60px;
    padding: 20px 16px 40px;
  }

  .filters-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .filters-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 26px; }
}