:root {
  --bg: #040b16;
  --card: rgba(11, 27, 45, 0.82);
  --line: rgba(162, 195, 229, 0.2);
  --text: #edf5ff;
  --muted: #a7bed9;
  --gold: #ffc15f;
  --cyan: #35d6ff;
  --danger: #ff7777;
  --ok: #50e48f;
  --shadow: 0 25px 55px rgba(3, 11, 23, 0.45);
  --radius-lg: 24px;
  --radius-md: 14px;
}

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

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(900px 450px at 100% 0%, rgba(53, 214, 255, 0.14), transparent 56%),
    radial-gradient(900px 450px at 0% 100%, rgba(255, 193, 95, 0.12), transparent 58%),
    linear-gradient(145deg, #030915 0%, #061325 44%, #051122 100%);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 5vw;
  background: rgba(7, 15, 29, 0.75);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand strong {
  display: block;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.brand small {
  color: var(--muted);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topnav a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.44rem 0.86rem;
  font-weight: 700;
  font-size: 0.82rem;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text);
  border-color: rgba(53, 214, 255, 0.52);
}

main {
  padding: 34px 5vw 60px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
}

.auth-panel {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 10px;
}

.auth-panel h1,
.auth-panel h2 {
  font-size: 2rem;
}

.stack {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
}

input {
  border: 1px solid var(--line);
  background: rgba(7, 19, 33, 0.9);
  color: var(--text);
  border-radius: 10px;
  padding: 0.68rem 0.75rem;
}

input:focus {
  outline: none;
  border-color: rgba(53, 214, 255, 0.58);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.btn-gold {
  background: linear-gradient(115deg, #ffb733, var(--gold));
  color: #1b1100;
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(8, 20, 35, 0.84);
  color: var(--text);
}

.error {
  min-height: 18px;
  color: #ffc4c4;
  font-size: 0.84rem;
}

.hidden {
  display: none !important;
}

.student-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 12px;
}

.side {
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.side h3 {
  font-size: 1.8rem;
}

.stats {
  display: grid;
  gap: 8px;
}

.stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: rgba(7, 17, 31, 0.78);
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.stats strong {
  font-size: 1.4rem;
  color: var(--gold);
}

.content {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.content-head h2 {
  font-size: 2rem;
}

.courses {
  display: grid;
  gap: 10px;
}

.course-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 17, 31, 0.78);
  overflow: hidden;
}

.course-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  padding: 10px;
}

.course-head img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  border-radius: 10px;
  object-fit: cover;
}

.course-head h4 {
  font-size: 1.45rem;
}

.progress-wrap {
  margin-top: 8px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(124, 157, 193, 0.2);
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(120deg, var(--cyan), #73f0ff);
}

.modules {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.module {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(8, 22, 38, 0.7);
}

.module h5 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.lesson {
  border: 1px solid rgba(163, 196, 228, 0.16);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
  background: rgba(6, 17, 30, 0.6);
  display: grid;
  gap: 6px;
}

.lesson-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.lesson small {
  color: var(--muted);
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-actions button,
.lesson-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.33rem 0.65rem;
  background: rgba(8, 22, 37, 0.85);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.lesson-actions button.is-done {
  background: rgba(27, 81, 44, 0.75);
  border-color: rgba(80, 228, 143, 0.5);
}

@media (max-width: 980px) {
  .student-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .course-head {
    grid-template-columns: 1fr;
  }
}
