@font-face {
  font-family: "Medrasti Medium";
  src: url("/Medrasti-Medium-New.otf?v=4") format("opentype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #000;
  --surface: #161618;
  --surface2: #0b0b0c;
  --border: rgba(255, 255, 255, 0.08);
  --fg: #fff;
  --muted: #8e8e93;
  --dim: #55555b;
  --green: #34c759;
  --red: #e5484d;
  --blue: #0b43ff;
  --gold: #fed41d;
}
* {
  box-sizing: border-box;
}
button,
input,
select {
  font-family: inherit;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Medrasti Medium", Tahoma, "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  padding: 0 max(16px, calc((100vw - 760px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000e;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 900;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 20px;
}
.official {
  font-size: 12px;
  color: #b9b9bf;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 11px;
}
.official i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 6px;
  box-shadow: 0 0 10px var(--green);
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: #ffffff0d;
  color: #fff;
  border-radius: 50%;
  font-size: 30px;
  line-height: 30px;
  cursor: pointer;
  transform: none;
}
main {
  width: min(100%, 720px);
  margin: auto;
  padding: 18px 16px 70px;
}
.hidden {
  display: none !important;
}
.page-loader {
  min-height: 55vh;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
}
.page-loader span {
  width: 28px;
  height: 28px;
  border: 3px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.panel {
  padding-top: 8px;
}
.title-lines {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 16px;
}
.title-lines:before,
.title-lines:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}
.title-lines h1,
.title-lines h2 {
  font-size: 21px;
  text-align: center;
  margin: 0;
  white-space: nowrap;
}
.segments {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4px;
  margin-bottom: 12px;
}
.segments button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 14px inherit;
  padding: 10px 6px;
  border-radius: 20px;
  cursor: pointer;
}
.segments button.active {
  background: #fff;
  color: #000;
}
.search-row {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 5px 6px 5px 16px;
  height: 52px;
  margin: 12px 0;
}
.search-row .search-icon {
  color: var(--muted);
  font-size: 18px;
  margin: 0 9px;
}
.search-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 15px inherit;
  text-align: right;
}
.search-row button {
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #000;
  padding: 0 19px;
  font: 800 13px inherit;
  cursor: pointer;
}
.search-row button:disabled {
  opacity: 0.55;
}
.error {
  color: #ff453a;
  text-align: center;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 6px;
  text-align: center;
}
.stat b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.stat small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.green {
  color: var(--green) !important;
}
.red {
  color: var(--red) !important;
}
.gold {
  color: var(--gold) !important;
}
.chips {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
  padding: 0 0 12px;
}
.chips::-webkit-scrollbar {
  display: none;
}
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 15px;
  border-radius: 20px;
  font: 600 12px inherit;
  cursor: pointer;
}
.chip.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}
.shortcut-row {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 12px;
}
.shortcut {
  width: 46px;
  height: 36px;
  border-radius: 18px;
  padding: 0;
}
.podium {
  display: flex;
  direction: ltr;
  justify-content: center;
  align-items: flex-end;
  padding: 24px 0 6px;
  min-height: 245px;
}
.podium-col {
  width: 25%;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.podium-col:nth-child(2) {
  width: 29%;
  max-width: 174px;
}
.podium-meta {
  width: 100%;
  text-align: center;
  padding: 0 0 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}
.podium-name {
  width: 100%;
  font-weight: 800;
  font-size: 12px;
  line-height: 17px;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.podium-tag {
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
  text-align: center;
}
.podium-bar {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  border-radius: 0 0 16px 16px;
  animation: grow 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform-origin: bottom;
}
.podium-bar:before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -12px;
  left: 0;
  width: 100%;
  height: 14px;
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  background: var(--cap);
}
.podium-bar.one {
  height: 115px;
  background: linear-gradient(#1e50ff, #0027a3);
  --cap: #4d7dff;
}
.podium-bar.two {
  height: 85px;
  background: linear-gradient(#fed41d, #c79a00);
  --cap: #ffe875;
}
.podium-bar.three {
  height: 65px;
  background: linear-gradient(#d0d5dd, #98a2b3);
  --cap: #f2f4f7;
}
.podium-rank {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.podium-score {
  font-size: 20px;
  font-weight: 900;
  margin-top: 3px;
}
.podium-unit {
  font-size: 10px;
  color: #ffffffb3;
  margin-top: 2px;
}
.list-row {
  direction: ltr;
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}
.list-row:hover {
  background: #ffffff05;
}
.list-score {
  font-size: 15px;
  font-weight: 900;
  min-width: 48px;
}
.list-main {
  flex: 1;
  min-width: 0;
  text-align: right;
  padding: 0 12px;
  direction: rtl;
}
.list-name {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 900;
  flex: 0 0 auto;
}
.sub-title {
  text-align: center;
  font-size: 16px;
  margin: 32px 0 10px;
}
.ranking-card {
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}
.link {
  color: #d4af37;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 35px 10px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 18px 0 10px;
}
.filter-grid select,
.school-search {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #fff;
  padding: 11px;
  font: 13px inherit;
  outline: none;
}
.screen-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 12px;
}
.screen-head h1 {
  font-size: 18px;
  margin: 0;
  text-align: center;
}
.school-search {
  margin: 4px 0 12px;
  border-radius: 20px;
  padding: 13px 17px;
}
.student-row .decision {
  font-size: 11px;
  margin-top: 4px;
  font-weight: 700;
}
.student-view {
  animation: fadeUp 0.5s ease both;
}
.result-hero {
  text-align: center;
  padding: 12px 4px 28px;
}
.result-wordmark {
  width: 150px;
  height: 49px;
  margin: 0 auto;
  font-size: 0;
  color: transparent;
  background: url("/medrasti-wordmark.svg?v=7") center / contain no-repeat;
}
.mabrouk {
  width: 176px;
  height: 122px;
  margin: 24px auto 8px;
  font-size: 0;
  color: transparent;
  background: url("/mabrouk-burst.svg?v=7") center / contain no-repeat;
  animation: pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.mabrouk-rays {
  display: block;
  width: 100%;
  height: 100%;
}
.mabrouk-rays:before,
.mabrouk-rays:after {
  content: none;
}
.result-main {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 12px;
}
.score-ring {
  --score: 0;
  --ring: #0b43ff;
  width: 148px;
  height: 148px;
  flex: 0 0 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    var(--ring) calc(var(--score) * 1turn),
    #ffffff24 0
  );
  position: relative;
  animation: ringIn 1.2s ease 0.3s both;
}
.score-ring:after {
  content: "";
  position: absolute;
  inset: 13px;
  background: #000;
  border-radius: 50%;
}
.score-ring b {
  z-index: 1;
  font-size: 26px;
}
.result-copy {
  flex: 1;
  text-align: center;
  direction: rtl;
}
.result-status {
  font-size: 30px;
  font-weight: 900;
  margin: 0;
}
.result-name {
  font-size: 19px;
  line-height: 30px;
  margin: 3px 0 0;
}
.mini-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}
.mini-stats small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.mini-stats b {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  margin-top: 8px;
}
.detail-row {
  display: flex;
  direction: ltr;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.44s ease both;
}
.detail-row:last-child {
  border-bottom: 0;
}
.detail-label {
  color: var(--muted);
  font-size: 12px;
}
.detail-value {
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  direction: rtl;
}
.detail-row.clickable {
  cursor: pointer;
}
.detail-row.clickable .detail-value {
  color: #d4af37;
}
.coming-soon {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  color: var(--muted);
}
footer {
  text-align: center;
  color: #555;
  padding: 24px;
  font-size: 11px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes grow {
  from {
    transform: scaleY(0);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
}
@keyframes ringIn {
  from {
    opacity: 0;
    transform: scale(0.85);
    --score: 0;
  }
}
@property --score {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}
@media (max-width: 560px) {
  .site-header {
    height: 62px;
  }
  .official {
    font-size: 10px;
    padding: 7px 9px;
  }
  main {
    padding: 12px 12px 60px;
  }
  .title-lines h1,
  .title-lines h2 {
    font-size: 19px;
  }
  .filter-grid {
    grid-template-columns: 1fr;
  }
  .podium {
    min-height: 225px;
  }
  .result-main {
    gap: 8px;
  }
  .score-ring {
    width: 118px;
    height: 118px;
    flex-basis: 118px;
  }
  .score-ring:after {
    inset: 11px;
  }
  .result-status {
    font-size: 25px;
  }
  .result-name {
    font-size: 16px;
  }
  .mabrouk {
    width: 176px;
    height: 122px;
  }
  .mini-stats {
    gap: 10px;
  }
  .stats {
    gap: 6px;
  }
  .stat {
    border-radius: 16px;
  }
  .shortcut-row {
    gap: 4px;
  }
  .shortcut {
    width: auto;
    flex: 1;
  }
  .site-header .icon-btn:not(.hidden) ~ .wordmark {
    display: none;
  }
}
