:root{
  --bg:#0b1220;
  --panel:rgba(255,255,255,0.06);
  --panel2:rgba(255,255,255,0.04);
  --border:rgba(255,255,255,0.10);
  --text:#e8eefc;
  --muted:rgba(232,238,252,0.72);
  --muted2:rgba(232,238,252,0.55);
  --accent:#63b3ff;
  --good:#6ee7b7;
  --warn:#fde68a;
  --bad:#fb7185;
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --radius:16px;
}

*{ box-sizing:border-box; }
html, body{ min-height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 800px at 20% -20%, rgba(99,179,255,0.18), transparent 55%),
              radial-gradient(900px 700px at 90% 0%, rgba(110,231,183,0.14), transparent 50%),
              var(--bg);
              background-repeat: no-repeat;
              background-attachment: fixed;
  color:var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

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

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 48px;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.75);
  border-bottom: 1px solid var(--border);
}

.topbar-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  min-width: 200px;
}

.brand-logo{
  width:36px;
  height:36px;
  object-fit:contain;
  flex: 0 0 auto;
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand .title{
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .subtitle{
  font-size: 12px;
  color: var(--muted);
}

.nav{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left:auto;
}
.nav a{
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.nav a.active{
  border-color: var(--border);
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.menu-toggle{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle .bars{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.menu-toggle .bars span{
  display:block;
  width:18px;
  height:2px;
  border-radius:999px;
  background: currentColor;
}

.nav-drawer{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  transform: translateY(-110%);
  transition: transform 0.22s ease;
  padding: 76px 14px 14px;
  pointer-events: none;
}
.nav-drawer.open{
  transform: translateY(0);
  pointer-events: auto;
}

.nav-drawer-panel{
  max-width: 980px;
  margin: 0 auto;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.14), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    rgba(11,18,32,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.38);
  padding: 16px;
  backdrop-filter: blur(14px);
}

.nav-drawer-head{
  margin-bottom: 14px;
  padding: 4px 2px 2px;
}
.nav-drawer-kicker{
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  margin-bottom: 6px;
}
.nav-drawer-title{
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text);
}
.nav-drawer-subtitle{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  max-width: 640px;
}

.nav-drawer-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.nav-drawer-grid a{
  display:block;
  padding: 13px 13px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.nav-drawer-grid a:hover{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-color: rgba(255,255,255,0.18);
}
.nav-drawer-grid a.active{
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.24);
}

.nav-scrim{
  position: fixed;
  inset: 0;
  background: rgba(5,10,20,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 25;
}
.nav-scrim.open{
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 820px){
  .nav{
    display:none;
  }
}

@media (min-width: 821px){
  .menu-toggle,
  .nav-drawer,
  .nav-scrim{
    display:none !important;
  }
}

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

.card.pad{ padding: 16px; }

.h1{
  font-size: 22px;
  font-weight: 750;
  margin: 14px 0 10px;
}
.h2{
  font-size: 16px;
  font-weight: 720;
  margin: 18px 0 8px;
}
.p{
  color: var(--muted);
  line-height: 1.45;
  margin: 8px 0;
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.col-12{ grid-column: span 12; }
.col-6{ grid-column: span 6; }
.col-4{ grid-column: span 4; }
.col-8{ grid-column: span 8; }

@media (max-width: 820px){
  .col-6, .col-4, .col-8{ grid-column: span 12; }
  .brand{ min-width: 0; }
}

.tile{
  display:block;
  padding: 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tile:hover{
  border-color: rgba(99,179,255,0.35);
}

.kv{
  display:flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.kv b{
  color: var(--text);
  font-weight: 650;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.table th, .table td{
  text-align:left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}
.table th{
  color: var(--muted);
  font-weight: 650;
  background: rgba(255,255,255,0.04);
}
.table tr:last-child td{ border-bottom: none; }

.hr{
  height: 1px;
  background: rgba(255,255,255,0.10);
  border: 0;
  margin: 14px 0;
}

.footer{
  margin-top: 18px;
  color: var(--muted2);
  font-size: 12px;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
}
.btn:hover{ border-color: rgba(99,179,255,0.35); }

.small{
  font-size: 12px;
  color: var(--muted2);
}

.note{
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(253,230,138,0.35);
  background: rgba(253,230,138,0.08);
  color: rgba(253,230,138,0.95);
  font-size: 13px;
}

/* Media */
.media-top{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.media-search{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
}
.media-input{
  width: min(520px, 100%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
}
.media-row{
  margin-top: 12px;
}
.media-row-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
}
.media-scroll{
  margin-top: 10px;
  display:flex;
  gap: 12px;
  overflow:auto;
  padding-bottom: 6px;
}
.media-card{
  min-width: 140px;
  max-width: 140px;
  cursor:pointer;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  overflow:hidden;
}
.media-card:hover{
  border-color: rgba(99,179,255,0.35);
}
.media-poster{
  width: 140px;
  height: 210px;
  object-fit: cover;
  display:block;
}
.media-card-body{
  padding: 8px 10px;
}
.media-title{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.media-sub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted2);
}

/* Modal */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 50;
}
.modal-backdrop.show{ display:flex; }
.modal{
  width: min(880px, 100%);
  background: rgba(11,18,32,0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
}
.modal-body{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  margin-top: 12px;
}
.modal-poster{
  width: 220px;
  height: 330px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

[data-page-top-focus]:focus {
  outline: none;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

input,
select,
textarea {
  transform: translateZ(0);
}

h1, h2, h3, .h1, .h2, .title {
  scroll-margin-top: 80px;
}
.page-top-focus {
  outline: none;
}


@media (max-width: 820px){
  .modal-body{ grid-template-columns: 1fr; }
  .modal-poster{ width: 100%; height: auto; aspect-ratio: 2 / 3; }
}