:root {
  --bg: #0b1220;
  --bg-soft: #111b2d;
  --panel: rgba(21, 33, 53, 0.85);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef3ff;
  --muted: #a6b3cc;
  --accent: #f3a93b;
  --accent-2: #4aa3ff;
  --radius: 18px;
  --shadow: 0 24px 55px rgba(3, 8, 18, 0.38);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, #1a2a46 0%, var(--bg) 45%), var(--bg);
}

a { color: inherit; text-decoration: none; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-backdrop {
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(circle at 20% 15%, rgba(74,163,255,.38), transparent 40%), radial-gradient(circle at 85% 70%, rgba(243,169,59,.28), transparent 35%);
}
.auth-grid {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
  position: relative;
  z-index: 2;
}
.auth-intro h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: .4rem 0; }
.auth-intro p { color: var(--muted); max-width: 520px; }
.auth-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}
.auth-logo {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 2rem;
}

.eyebrow { color: #a7c0ff; letter-spacing: .08em; text-transform: uppercase; font-size: .75rem; }

.stack { display: grid; gap: .8rem; }
.muted-top { margin-top: .8rem; }
.auth-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2rem 0;
}
.auth-collapsible {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: .9rem;
}
.auth-collapsible summary {
  list-style: none;
  cursor: pointer;
  color: #9fc7ff;
  font-weight: 600;
}
.auth-collapsible summary::-webkit-details-marker { display: none; }
.auth-collapsible summary::after {
  content: ' +';
  color: var(--muted);
}
.auth-collapsible[open] summary::after {
  content: ' -';
}
label { color: var(--muted); font-size: .92rem; }
input, button {
  font: inherit;
  border-radius: 12px;
}
input {
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid var(--line);
  padding: .78rem .9rem;
}

.btn {
  border: 1px solid transparent;
  padding: .75rem 1rem;
  cursor: pointer;
  transition: .2s ease;
  font-weight: 600;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), #f0bf64);
  color: #1f2230;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--text);
}
.btn-link { background: transparent; border: none; color: #9fc7ff; padding: 0; }

.alert {
  border-radius: 12px;
  margin: .8rem 0;
  padding: .65rem .8rem;
  border: 1px solid;
}
.alert-error { background: rgba(255, 81, 81, 0.15); border-color: rgba(255, 81, 81, 0.5); }
.alert-success { background: rgba(61, 201, 133, 0.14); border-color: rgba(61, 201, 133, 0.5); }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.95);
}
.brand { display: flex; gap: .8rem; align-items: center; margin-bottom: 2rem; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, #23406b, #34508a);
  font-weight: 700;
}
.brand h1 { margin: 0; font-size: 1.05rem; }
.brand p { margin: 0; color: var(--muted); font-size: .8rem; }
.menu { display: grid; gap: .4rem; }
.menu a {
  padding: .7rem .8rem;
  border-radius: 11px;
  color: var(--muted);
}
.menu a:hover, .menu a.is-active {
  color: var(--text);
  background: rgba(255,255,255,.07);
}
.menu-post-form { margin: 0; }
.menu-post-btn {
  width: 100%;
  text-align: left;
  padding: .7rem .8rem;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.menu-post-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.07);
}
.logout-form { margin-top: 1.25rem; }

.main-content { padding: 1.3rem 1.4rem 2.3rem; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.menu-toggle { display: none; }
.topbar-meta { color: var(--muted); display: flex; gap: .7rem; align-items: center; }

.hero, .card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.4rem;
}
.hero h2 { margin: .2rem 0; }
.hero p { margin: 0; color: var(--muted); }

.stats-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem;
}
.stat { padding: 1rem; }
.stat h3 { margin: 0; font-size: 1.9rem; }
.stat p { color: var(--muted); margin: .3rem 0 0; }

.split-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}
.card { padding: 1rem; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .8rem;
}
.card-head a { color: #9fc7ff; }
.list-cards { display: grid; gap: .55rem; }
.line-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .7rem .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.03);
}
.muted { color: var(--muted); }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 1rem;
}
.course-toolbar { display: flex; align-items: center; gap: .7rem; }
.lang-toggle {
  display: inline-flex;
  gap: .45rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.btn-toggle {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: .5rem .8rem;
}
.btn-toggle.is-active {
  color: var(--text);
  background: rgba(255,255,255,.1);
  border-color: var(--line);
}
.search-form { display: flex; gap: .6rem; }
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .9rem;
}
.course-card {
  display: flex;
  flex-direction: column;
}
.course-card h3 { margin: .4rem 0; }
.course-card .muted { margin-bottom: 1rem; }
.course-card .event-venue {
  margin-bottom: .35rem;
}
.course-card .event-card-date {
  margin-top: auto;
  margin-bottom: .55rem;
}
.launch-btn {
  margin-top: auto;
  border-radius: 18px;
}
.event-action-btn {
  border-radius: 18px;
}
.badge {
  display: inline-block;
  background: rgba(74,163,255,.16);
  border: 1px solid rgba(74,163,255,.35);
  color: #a9d2ff;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .76rem;
}
.player-card { min-height: 72vh; }
.player-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1rem;
}
.player-frame-wrap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.player-card iframe {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #081021;
}
.player-frame-wrap:fullscreen {
  background: #081021;
  padding: 0;
}
.player-frame-wrap:fullscreen iframe {
  min-height: 100vh;
  height: 100vh;
}
.booking-card { display: flex; justify-content: space-between; align-items: center; }
.event-date { font-size: 1.1rem; margin: .2rem 0 0; }
.event-info {
  line-height: 1.6;
  white-space: normal;
}
.booking-response-card {
  padding: 0;
  overflow: hidden;
}
.booking-response-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #0b1220;
}

.details {
  display: grid;
  grid-template-columns: 160px 1fr;
  row-gap: .55rem;
}
.details dt { color: var(--muted); }
.details dd { margin: 0; }

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 20;
    left: -280px;
    width: 260px;
    transition: left .25s ease;
  }
  .sidebar.open { left: 0; }
  .menu-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.05);
    color: var(--text);
    padding: .5rem .8rem;
    border-radius: 10px;
    cursor: pointer;
  }
  .page-head { flex-direction: column; align-items: flex-start; }
  .search-form { width: 100%; }
  .search-form input { flex: 1; }
  .booking-card { flex-direction: column; align-items: flex-start; gap: .9rem; }
}
