/* Handler Registry — Oceanic Cyan / White Hyperlight Theme */

/* -------------------------------------------- */
/* THEME VARIABLES */
/* -------------------------------------------- */
:root {
  --bg1: #02060b;
  --bg2: #04101a;
  --cyan: #32e6ff;
  --cyan-soft: #8bf1ff;
  --muted: #d0e8ff;
  --card: rgba(6, 20, 32, 0.86);
  --glass: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.14);
  --danger: #ff4c7e;
  --max-width: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #03101c, #000409 60%);
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
}

/* -------------------------------------------- */
/* BACKGROUND FX */
/* -------------------------------------------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    url("assets/gradient-bg.png"),
    url("assets/ui-plasma.png");
  background-size: cover, 900px 900px;
  background-position: center, 20% 30%;
  opacity: 0.9;
  filter: blur(18px) saturate(130%);
  mix-blend-mode: screen;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("assets/noise.png"), url("assets/scanline.png");
  background-repeat: repeat, repeat;
  opacity: 0.08;
  mix-blend-mode: soft-light;
}

/* -------------------------------------------- */
/* LAYOUT */
/* -------------------------------------------- */
.wrap {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 20px auto;
  padding: 14px;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(120deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
}

.logo {
  font-weight: 800;
}

.logo .accent {
  color: var(--cyan-soft);
}

.nav a {
  margin-left: 14px;
  text-decoration: none;
  color: var(--muted);
  opacity: 0.9;
}
.nav a:hover { color: var(--cyan); }

/* INTRO */
.main { display: flex; flex-direction: column; gap: 18px; }

.intro {
  display: flex;
  gap: 16px;
}

.intro-text {
  flex: 1.6;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(3,32,54,0.9), rgba(3,18,32,0.9));
  border: 1px solid rgba(255,255,255,0.18);
}

.summary-panel {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.22);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.value.flag { color: var(--danger); }

/* -------------------------------------------- */
/* HANDLER CARDS */
/* -------------------------------------------- */

.handler-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.handler-card {
  background: rgba(255,255,255,0.06);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.22);
  position: relative;
  cursor: pointer;
  transition: 0.2s ease;
}
.handler-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

/* PORTRAITS */
.handler-portrait {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  margin-bottom: 10px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.22);
}

/* CARD TEXT */
.handler-name {
  font-size: 18px;
  font-weight: 800;
}

.handler-role {
  font-size: 11px;
  opacity: 0.8;
}

.handler-body p {
  margin: 0 0 8px 0;
}

.handler-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(2,20,34,0.9);
  border: 1px solid rgba(255,255,255,0.18);
}

/* -------------------------------------------- */
/* ASSIGNMENT TABLE */
/* -------------------------------------------- */

.assign-table {
  width: 100%;
  border-collapse: collapse;
}

.assign-table th {
  background: rgba(3,40,74,0.9);
  padding: 8px;
  color: var(--cyan-soft);
  font-weight: 700;
}

.assign-table td {
  padding: 8px;
  background: rgba(2,14,26,0.9);
}

.assign-table tr:nth-child(even) {
  background: rgba(3,18,32,0.9);
}

.assign-table tbody tr:hover {
  background: rgba(12,40,58,0.9);
}

td.flagged {
  color: var(--danger);
}

/* -------------------------------------------- */
/* MODAL */
/* -------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.hidden { display: none; }

.modal-card {
  background: linear-gradient(180deg, #03111a, #02070d);
  padding: 18px;
  border-radius: 16px;
  width: 94%;
  max-width: 640px;
  border: 1px solid rgba(255,255,255,0.22);
  position: relative;
}

/* MODAL PORTRAIT */
.modal-portrait {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  float: right;
  margin-left: 16px;
  border: 1px solid rgba(255,255,255,0.22);
}

.close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-subtitle {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.modal-body {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* FOOTER */
.site-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  opacity: 0.7;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .handler-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 700px) {
  .intro {
    flex-direction: column;
  }
}