:root {
  --bg: #edf1f4;
  --ink: #2d3f4f;
  --muted: #6b7b89;
  --line: rgba(68, 88, 103, 0.14);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --navy: #6f8293;
  --teal: #8d9aa7;
  --gold: #d9dde2;
  --rose: #4b5f71;
  --shadow: 0 24px 60px rgba(63, 79, 95, 0.14);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(210, 217, 224, 0.72), transparent 24%),
    radial-gradient(circle at bottom left, rgba(152, 169, 183, 0.2), transparent 28%),
    linear-gradient(180deg, #eff3f6 0%, #dfe7ed 100%);
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  border: 0;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 160px;
  max-width: 42vw;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(63, 79, 95, 0.18);
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 18px;
}

.brand-copy small,
.summary-strip span,
.hero-lead,
.overview-grid p,
.metric span,
.panel-form p,
.exam-card p,
.activity-item p,
.registrant-card p {
  color: var(--muted);
}

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

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(93, 111, 125, 0.12);
}

main {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 42px;
}

.hero,
.section-band {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  padding: 32px;
  border-radius: 34px;
  min-height: 72vh;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: "Marhey", cursive;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.hero-lead {
  max-width: 62ch;
  line-height: 1.9;
}

.hero-actions,
.hero-points,
.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.slider-controls,
.slider-dots,
.slide-admin-actions,
.notification-permission-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin: 26px 0 18px;
}

.hero-points {
  padding: 0;
  list-style: none;
}

.hero-points li,
.summary-strip span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(32, 58, 93, 0.08);
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #5b7083, #8797a5);
  box-shadow: 0 12px 24px rgba(63, 79, 95, 0.2);
}

.secondary-btn {
  color: var(--navy);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(93, 111, 125, 0.14);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.wide-btn {
  width: 100%;
}

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.visual-panel {
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  background: linear-gradient(160deg, rgba(106, 124, 139, 0.98), rgba(136, 149, 160, 0.94));
}

.visual-panel span {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.visual-panel strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.visual-main {
  grid-column: span 2;
  min-height: 260px;
  background:
    radial-gradient(circle at top right, rgba(245, 248, 251, 0.24), transparent 28%),
    linear-gradient(160deg, rgba(114, 129, 143, 0.98), rgba(151, 165, 176, 0.94));
}

.hero-logo {
  width: min(320px, 100%);
  margin-bottom: 18px;
  border-radius: 24px;
  box-shadow: 0 18px 34px rgba(63, 79, 95, 0.18);
}

.section-band {
  margin-top: 22px;
  padding: 28px;
  border-radius: var(--radius);
}

.section-title {
  margin-bottom: 20px;
}

.inline-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.overview-grid,
.dashboard-grid,
.scoreboard-layout,
.two-column {
  display: grid;
  gap: 18px;
}

.panel-stack {
  display: grid;
  gap: 18px;
}

.overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-grid article,
.highlight-panel,
.panel-form,
.panel-surface,
.activity-panel,
.exam-card,
.team-card,
.registrant-card {
  background: var(--surface-strong);
  border: 1px solid rgba(24, 36, 50, 0.08);
  border-radius: 22px;
}

.overview-grid article,
.highlight-panel,
.activity-panel,
.panel-surface {
  padding: 22px;
}

.scoreboard-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.score-list,
.exam-board,
.activity-list,
.registrants-list,
.slides-admin-list,
.admins-list {
  display: grid;
  gap: 14px;
}

.home-slider {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: 24px;
}

.slide-card {
  display: none;
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(93, 111, 125, 0.12);
}

.slide-card.slide-active {
  display: block;
}

.slide-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: auto 20px 20px 20px;
  padding: 20px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(180deg, rgba(45, 63, 79, 0.1), rgba(45, 63, 79, 0.82));
}

.slide-overlay p:last-child {
  color: rgba(255, 255, 255, 0.88);
}

.slider-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background: rgba(111, 130, 147, 0.26);
  border: 0;
}

.slider-dot.dot-active {
  background: var(--navy);
}

.team-card {
  padding: 18px 20px;
}

.team-head,
.team-meta,
.registrant-head,
.exam-head,
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-head strong,
.metric strong,
.registrant-head strong,
.exam-head strong {
  font-size: 1.1rem;
}

.team-progress {
  height: 10px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 58, 93, 0.09);
}

.team-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ccd4db, #7d909f);
}

.metric + .metric {
  margin-top: 18px;
}

.two-column,
.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.form-heading {
  margin-bottom: 6px;
}

.panel-form label {
  display: grid;
  gap: 8px;
}

.panel-form span {
  font-size: 0.94rem;
  font-weight: 700;
}

.panel-form input,
.panel-form select,
.panel-form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  color: var(--ink);
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(24, 36, 50, 0.1);
}

.panel-form textarea {
  min-height: 132px;
  resize: vertical;
}

.registrant-card,
.exam-card,
.activity-item {
  padding: 16px 18px;
}

.profile-card {
  display: grid;
  gap: 18px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notification-permission-row {
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(93, 111, 125, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.profile-notifications-list {
  display: grid;
  gap: 12px;
}

.notification-card,
.slide-admin-card,
.admin-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(93, 111, 125, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.profile-meta span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(93, 111, 125, 0.12);
  color: var(--navy);
}

.profile-exams-heading {
  margin-top: 6px;
}

.profile-exams-list {
  display: grid;
  gap: 14px;
}

.profile-panel {
  min-height: 100%;
}

.admin-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
}

.profile-exam-card,
.question-builder,
.draft-question-card,
.results-team-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(93, 111, 125, 0.12);
  border-radius: 20px;
}

.question-builder,
.draft-question-card,
.results-team-card {
  padding: 18px;
}

.question-list,
.results-board {
  display: grid;
  gap: 14px;
}

.active-exam-area {
  margin-top: 8px;
}

.active-exam-form,
.question-card {
  background: rgba(255, 255, 255, 0.92);
}

.exam-runner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.timer-box {
  min-width: 160px;
  padding: 14px;
  text-align: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #5b7083, #8797a5);
}

.timer-box span {
  display: block;
  color: rgba(255, 255, 255, 0.84);
}

.timer-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.4rem;
}

.question-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(93, 111, 125, 0.12);
}

.option-group {
  display: grid;
  gap: 10px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(93, 111, 125, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.short-answer-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(93, 111, 125, 0.12);
}

.result-pill {
  display: inline-flex;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(111, 130, 147, 0.12);
  color: var(--navy);
  font-weight: 700;
}

.exam-start-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-dashboard-hidden {
  display: none;
}

.admin-login-shell {
  max-width: 980px;
  margin-inline: auto;
}

.admin-login-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
}

.admin-login-form,
.admin-login-note {
  min-height: 100%;
}

.login-hint {
  min-height: 24px;
  color: #9d3e4f;
  font-weight: 700;
}

.sheet-export {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(93, 111, 125, 0.12);
  background: #fff;
  resize: vertical;
}

.slide-admin-card {
  grid-template-columns: 120px 1fr auto;
  align-items: center;
}

.slide-admin-thumb {
  width: 120px;
  height: 88px;
  object-fit: cover;
  border-radius: 16px;
}

.slide-admin-copy p {
  color: var(--muted);
}

.slide-admin-actions {
  justify-content: flex-end;
}

.results-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid rgba(93, 111, 125, 0.1);
}

.results-table th {
  color: var(--navy);
}

.registrant-card small,
.exam-card small,
.activity-item small {
  color: var(--rose);
  font-weight: 700;
}

.topbar,
.hero,
.section-band,
.overview-grid article,
.highlight-panel,
.panel-form,
.panel-surface,
.activity-panel,
.exam-card,
.team-card,
.registrant-card {
  position: relative;
}

.hero::before,
.section-band::before,
.overview-grid article::before,
.highlight-panel::before,
.panel-form::before,
.panel-surface::before,
.activity-panel::before,
.exam-card::before,
.team-card::before,
.registrant-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.exam-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exam-card {
  min-height: 220px;
}

.exam-card p,
.activity-item p,
.registrant-card p {
  margin-top: 10px;
  line-height: 1.8;
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(24, 36, 50, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
}

@media (max-width: 980px) {
  .hero,
  .scoreboard-layout,
  .two-column,
  .dashboard-grid,
  .overview-grid,
  .exam-board,
  .admin-login-layout {
    grid-template-columns: 1fr;
  }

  .inline-title,
  .topbar,
  .exam-runner-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .topbar,
  main {
    width: min(100% - 18px, 100%);
  }

  .slide-admin-card {
    grid-template-columns: 1fr;
  }

  .slide-admin-thumb,
  .slide-image,
  .slide-card,
  .home-slider {
    width: 100%;
    height: auto;
  }

  .brand-logo {
    width: 128px;
  }

  .hero,
  .section-band {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-visual {
    grid-template-columns: 1fr;
  }

  .visual-main {
    grid-column: span 1;
  }

  h1 {
    font-size: 2.2rem;
  }

  .topnav {
    width: 100%;
  }
}
