:root {
  --bg: #020711;
  --white: #f8fbff;
  --soft: rgba(248, 251, 255, 0.78);
  --cyan: #00d9ff;
  --orange: #ff8500;
  --pink: #ff315f;
  --purple: #9b5cff;
  --teal: #13d5c7;
  --card: rgba(3, 11, 24, 0.82);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  position: relative;
  margin: 0;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  background: #000;
  overflow: hidden;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-roster {
  position: absolute;
  top: 0;
  left: 0;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  width: var(--roster-width, 1920px);
  height: var(--roster-height, 1080px);
  overflow: hidden;
  transform: translate(var(--roster-x, 0), var(--roster-y, 0)) scale(var(--roster-scale, 1));
  transform-origin: top left;
  background:
    linear-gradient(90deg, rgba(1, 5, 13, 0.94) 0%, rgba(2, 8, 18, 0.58) 42%, rgba(1, 5, 13, 0.96) 100%),
    url("../images/background.jpg") center center / cover no-repeat;
}

.public-roster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 12%, rgba(0, 217, 255, 0.18), transparent 22%),
    radial-gradient(circle at 70% 48%, rgba(0, 217, 255, 0.08), transparent 28%),
    radial-gradient(circle at 86% 9%, rgba(255, 49, 95, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(1, 5, 13, 0.08), rgba(1, 5, 13, 0.58));
}

.roster-stage {
  display: grid;
  grid-template-rows: 118px minmax(0, 0.9fr) minmax(0, 1.06fr) 106px;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  padding: 30px 38px 26px;
}

.roster-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.title-block h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(50px, 3.75vw, 72px);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -1px;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.12), 0 16px 28px rgba(0, 0, 0, 0.48);
}

.title-block h1 span {
  background: linear-gradient(90deg, var(--orange) 0%, #ff6a24 52%, var(--pink) 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.title-block p {
  margin: 16px 0 0;
  color: #fff;
  font-size: clamp(16px, 1.15vw, 22px);
  font-weight: 520;
}

.time-block {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  justify-self: end;
  min-width: 330px;
}

.analog-clock {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #0a1220;
  border: 5px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #f8fafc) padding-box,
    conic-gradient(var(--pink), var(--cyan), #62d12c, var(--orange), var(--pink)) border-box;
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.24);
}

.clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 4px;
  border-radius: 999px;
  background: #0a1220;
  transform-origin: bottom center;
}

.hour-hand {
  height: 19px;
  transform: translateX(-50%) rotate(var(--hour-angle, 0deg));
}

.minute-hand {
  height: 27px;
  width: 3px;
  transform: translateX(-50%) rotate(var(--minute-angle, 0deg));
}

.second-hand {
  height: 30px;
  width: 2px;
  background: var(--pink);
  transform: translateX(-50%) rotate(var(--second-angle, 0deg));
}

.clock-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px #fff;
}

.time-block strong {
  display: block;
  color: #fff;
  font-size: clamp(44px, 3.35vw, 64px);
  line-height: 0.86;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.time-block p {
  width: 100%;
  margin: 10px 0 0;
  color: var(--cyan);
  font-size: clamp(15px, 1.02vw, 20px);
  font-weight: 820;
  line-height: 1.18;
  text-transform: uppercase;
  text-align: left;
}

.top-grid {
  display: grid;
  grid-template-columns: 1.14fr 0.98fr 0.74fr;
  gap: 16px;
  min-height: 0;
}

.top-grid.is-day-ended {
  grid-template-columns: 2.12fr 0.74fr;
}

.top-grid.is-day-ended .now-card {
  grid-column: 1;
}

.top-grid.is-day-ended .next-card {
  display: none;
}

.hero-card,
.grade-card,
.absent-card,
.screen-footer > section {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.hero-card {
  --accent: var(--cyan);
  display: grid;
  grid-template-columns: minmax(130px, 0.33fr) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 18px 20px 16px;
  border-color: color-mix(in srgb, var(--accent) 66%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at 15% 19%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(2, 14, 30, 0.9), rgba(2, 8, 18, 0.88));
}

.next-card {
  --accent: var(--orange);
  grid-template-columns: minmax(118px, 0.32fr) minmax(0, 1fr);
  background:
    radial-gradient(circle at 18% 21%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 38%),
    linear-gradient(180deg, rgba(29, 12, 3, 0.92), rgba(2, 8, 18, 0.88));
}

.lesson-number {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.lesson-number h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(19px, 1.3vw, 25px);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.lesson-number strong {
  align-self: center;
  display: block;
  color: color-mix(in srgb, var(--accent) 42%, #fff);
  font-size: clamp(112px, 8.8vw, 176px);
  line-height: 0.75;
  font-weight: 950;
  text-align: center;
  text-shadow:
    0 0 10px color-mix(in srgb, var(--accent) 90%, transparent),
    0 0 34px color-mix(in srgb, var(--accent) 72%, transparent),
    0 0 58px color-mix(in srgb, var(--accent) 42%, transparent);
  -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 80%, #fff);
}

.next-card .lesson-number strong {
  font-size: clamp(104px, 8.3vw, 164px);
}

.hero-card.is-period .lesson-number strong,
.hero-card.is-day-end .lesson-number strong {
  align-self: center;
  font-size: clamp(42px, 3.8vw, 72px);
  line-height: 0.98;
  text-transform: uppercase;
  -webkit-text-stroke: 0;
}

.hero-card.is-day-end .lesson-number strong {
  font-size: clamp(40px, 3.5vw, 68px);
}

.hero-card.is-day-end .lesson-number span {
  display: none;
}

.lesson-number span {
  color: #fff;
  font-size: clamp(18px, 1.3vw, 25px);
  font-weight: 760;
  white-space: nowrap;
  text-align: center;
}

.roster-table {
  display: grid;
  grid-template-rows: 32px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.hero-card.is-period,
.hero-card.is-day-end {
  grid-template-columns: 1fr;
}

.hero-card.is-period .lesson-number,
.hero-card.is-day-end .lesson-number {
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-card.is-period .roster-table,
.hero-card.is-day-end .roster-table {
  display: none;
}

.roster-table header,
.roster-table p {
  display: grid;
  grid-template-columns: minmax(96px, 0.86fr) minmax(78px, 0.64fr) minmax(122px, 0.94fr) minmax(82px, 0.68fr);
  gap: 10px;
  align-items: center;
}

.next-card .roster-table header,
.next-card .roster-table p {
  grid-template-columns: minmax(78px, 0.82fr) minmax(64px, 0.6fr) minmax(100px, 0.9fr) minmax(72px, 0.66fr);
  gap: 8px;
}

.roster-table header {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.roster-table header span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.roster-table header .icon {
  width: 17px;
  height: 17px;
}

.roster-table p {
  min-height: clamp(18px, 2.08vh, 24px);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  font-size: clamp(12px, 0.84vw, 16px);
  font-weight: 520;
  line-height: 1;
}

.roster-table p.roster-message {
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 100%;
  padding: 8px 0;
  border-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 1.35vw, 26px);
  font-weight: 780;
  line-height: 1.18;
}

.roster-table p.roster-message span {
  white-space: normal;
}

.next-card .roster-table p {
  font-size: 14px;
}

.next-card .roster-table header {
  font-size: 11px;
}

.roster-table b,
.roster-table span,
.mini-table b,
.mini-table span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-table b,
.mini-table b {
  color: #fff;
  font-weight: 840;
}

.absent-card {
  padding: 20px 22px 16px;
  border-color: color-mix(in srgb, var(--pink) 74%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at 8% 6%, rgba(255, 49, 95, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(35, 4, 16, 0.92), rgba(5, 8, 18, 0.88));
}

.absent-card header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.absent-card .icon {
  width: 40px;
  height: 40px;
  color: var(--pink);
  stroke-width: 1.9;
}

.absent-card h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.absent-card ul {
  column-count: 2;
  column-gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.absent-card li {
  position: relative;
  break-inside: avoid;
  margin: 0 0 7px;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  line-height: 1.08;
  white-space: nowrap;
}

.absent-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.56em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--pink);
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.grade-card {
  --accent: var(--pink);
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  min-width: 0;
  padding: 16px 20px 18px;
  border-color: color-mix(in srgb, var(--accent) 72%, rgba(255, 255, 255, 0.08));
  background:
    radial-gradient(circle at 9% 7%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 28%),
    linear-gradient(180deg, rgba(5, 11, 24, 0.92), rgba(3, 7, 15, 0.86));
}

.grade-two {
  --accent: var(--purple);
}

.grade-three {
  --accent: var(--teal);
}

.grade-card header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.grade-card header > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 48%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 32%, transparent);
}

.grade-card header .icon {
  width: 34px;
  height: 34px;
}

.grade-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 1.45vw, 28px);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.grade-card p {
  margin: 7px 0 0;
  color: #fff;
  font-size: clamp(12px, 0.84vw, 16px);
  font-weight: 760;
  text-transform: uppercase;
  white-space: nowrap;
}

.mini-table {
  display: grid;
  align-content: start;
  min-height: 0;
}

.mini-table p {
  display: grid;
  grid-template-columns: 44px 96px minmax(70px, 0.78fr) minmax(78px, 0.76fr) minmax(120px, 1fr) minmax(74px, 0.76fr);
  gap: 9px;
  align-items: center;
  min-height: clamp(17px, 1.86vh, 23px);
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  font-size: clamp(10px, 0.62vw, 12.5px);
  line-height: 1;
}

.mini-table .mini-head {
  min-height: 28px;
  color: var(--accent);
  font-size: clamp(9.5px, 0.58vw, 11.5px);
  font-weight: 950;
  text-transform: uppercase;
}

.screen-footer {
  display: grid;
  grid-template-columns: 1.22fr 1fr 0.9fr 1.18fr 0.72fr;
  gap: 16px;
  min-height: 0;
}

.screen-footer > section {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 13px 18px;
}

.footer-x {
  width: 106px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 5px;
  background:
    linear-gradient(45deg, transparent 37%, rgba(0, 217, 255, 0.96) 38% 47%, rgba(255, 255, 255, 0.72) 48% 52%, rgba(255, 132, 0, 0.96) 53% 62%, transparent 63%),
    linear-gradient(135deg, transparent 37%, rgba(0, 217, 255, 0.86) 38% 47%, rgba(255, 255, 255, 0.62) 48% 52%, rgba(255, 49, 95, 0.94) 53% 62%, transparent 63%);
  filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.18));
}

.screen-footer .icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  color: var(--cyan);
  stroke-width: 1.7;
}

.screen-footer section:nth-child(4) .icon {
  color: var(--pink);
}

.screen-footer strong {
  display: block;
  margin-bottom: 7px;
  color: #fff;
  font-size: clamp(15px, 1vw, 19px);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.screen-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(12px, 0.78vw, 15px);
  line-height: 1.25;
}

.footer-brand p {
  color: var(--cyan);
  font-weight: 720;
}

.go-footer {
  justify-content: center;
  gap: 14px;
}

.go-footer strong {
  margin: 0;
  font-size: clamp(42px, 3vw, 58px);
  letter-spacing: -2px;
  text-transform: none;
}

.go-footer p {
  max-width: 134px;
  font-size: 14px;
}

@media (max-aspect-ratio: 16 / 9) {
  .public-roster {
    min-width: 0;
  }
}
