/* XenoRogue Customs — player queue + host panel */

.customs-page [hidden], .customs-host [hidden] { display: none !important; }
.customs-hero { min-height: 44vh; }
.customs-page { padding-top: 34px; }

.customs-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }

/* ---------- Match card ---------- */
.customs-match { position: relative; overflow: hidden; }
.customs-match::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(circle at 90% 0%, var(--glow), transparent 55%);
}
.customs-match > * { position: relative; }
.customs-match h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; margin: 14px 0 14px; text-transform: uppercase; letter-spacing: -.02em; }

.customs-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.customs-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Orbitron'; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05);
}
.customs-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.customs-pill[data-kind="open"]::before { background: #39d98a; box-shadow: 0 0 12px #39d98a; }
.customs-pill[data-kind="live"] { border-color: var(--accent); background: rgba(255,255,255,.08); }
.customs-pill[data-kind="live"]::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: customsPulse 1.2s ease-in-out infinite; }
.customs-pill[data-kind="started"]::before { background: #ffb020; }
.customs-pill[data-kind="error"]::before { background: #ff4d4d; }
.customs-round { font-family: 'Orbitron'; font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

@keyframes customsPulse { 50% { transform: scale(1.5); opacity: .6; } }

.customs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.customs-chips span {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25);
  font-weight: 700; font-size: 17px;
}
.customs-chips small { font-family: 'Cinzel'; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.customs-notes { margin: 14px 0 0; }

.customs-countdown {
  display: grid; gap: 2px; margin-top: 20px; padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(0,0,0,.3);
}
.customs-countdown small { font-family: 'Cinzel'; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.customs-countdown strong { font-family: 'Orbitron'; font-size: clamp(34px, 5vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.customs-countdown span { color: var(--muted); font-size: 15px; }

.customs-meter { margin-top: 20px; }
.customs-meter-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: 8px; }
.customs-meter-head strong { font-family: 'Orbitron'; font-size: 20px; }
.customs-meter-head > span:last-child { color: var(--muted); }
.customs-meter-bar { position: relative; height: 12px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.customs-meter-bar i, .customs-meter-bar b { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; transition: width .5s ease; }
.customs-meter-bar i { background: linear-gradient(90deg, var(--accent2), var(--accent)); opacity: .45; }
.customs-meter-bar b { background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 18px var(--glow); }
.customs-meter small { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; min-height: 1em; }

/* ---------- Your spot ---------- */
.customs-you h3 { font-family: 'Orbitron'; margin: 8px 0 14px; overflow-wrap: anywhere; }
.customs-form { display: grid; gap: 14px; }
.customs-form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; letter-spacing: .04em; color: #ddd6e7; }
.customs-form input, .customs-form select, .customs-login input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text);
  font: 600 17px 'Rajdhani', system-ui, sans-serif;
}
.customs-form select option { background: #110d18; }
.customs-form input:focus, .customs-form select:focus, .customs-login input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.customs-form button, .customs-actions button, .host-actions button { cursor: pointer; border: 0; }
.customs-form .cta-secondary, .customs-actions .cta-secondary, .host-actions .cta-secondary, .customs-key .cta-secondary { color: var(--text); border: 1px solid var(--line); }
.customs-error { color: #ff8a8a; margin: 0; min-height: 1.2em; font-weight: 600; }
.customs-error:empty { min-height: 0; }

.customs-spot { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.customs-spot strong {
  font-family: 'Orbitron'; font-size: 30px; min-width: 76px; height: 64px; padding: 0 10px;
  display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 12px 35px var(--glow);
}
.customs-spot span { color: var(--muted); font-weight: 600; }

.customs-key {
  display: grid; gap: 10px; padding: 18px; border-radius: 18px; text-align: center;
  border: 1px dashed rgba(255,255,255,.2); background: rgba(0,0,0,.35);
}
.customs-key small { font-family: 'Cinzel'; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.customs-key-value {
  font-family: 'Orbitron'; font-weight: 900; font-size: clamp(28px, 5vw, 40px); letter-spacing: .12em;
  overflow-wrap: anywhere; color: var(--muted); user-select: all;
}
.customs-key p { margin: 0; color: var(--muted); font-size: 15px; }
.customs-key[data-state="live"] { border: 1px solid var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 18px 50px var(--glow); }
.customs-key[data-state="live"] .customs-key-value { color: #fff; text-shadow: 0 0 22px var(--accent); }
.customs-key .cta-secondary { justify-self: center; cursor: pointer; }

.customs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.customs-actions button { flex: 1 1 160px; }
.customs-actions .is-checked { background: #1f7a4f; box-shadow: 0 12px 35px rgba(57,217,138,.25); }

/* ---------- Steps ---------- */
.customs-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.customs-steps li { position: relative; padding-top: 58px; }
.customs-steps b {
  position: absolute; top: 20px; left: 28px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-family: 'Orbitron'; font-size: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.customs-steps h3 { font-size: 18px; margin-bottom: 8px; }
.customs-steps p { margin: 0; font-size: 16px; }

/* ---------- Player list ---------- */
.customs-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.customs-legend { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.customs-legend i { width: 10px; height: 10px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 10px #39d98a; }
.customs-players { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.customs-players li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  font-weight: 600; min-width: 0;
}
.customs-players li b { font-family: 'Orbitron'; font-size: 12px; color: var(--muted); min-width: 24px; }
.customs-players li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customs-players li small { color: var(--muted); font-size: 12px; }
.customs-players li.in { border-color: rgba(57,217,138,.55); }
.customs-players li.in b { color: #39d98a; }
.customs-players li.wait { opacity: .6; border-style: dashed; }
.customs-players li.me { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 24px var(--glow); }
.customs-empty { color: var(--muted); }

.customs-rules ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }

/* ---------- Host panel ---------- */
.customs-host { padding-top: 130px; }
.customs-login { max-width: 420px; display: grid; gap: 14px; margin-top: 24px; }
.customs-login label { display: grid; gap: 6px; font-weight: 700; }
.customs-login button { border: 0; cursor: pointer; }

.host-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0 18px; }
.host-stats .glass-card { padding: 16px 20px; }
.host-stats small { display: block; font-family: 'Cinzel'; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.host-stats strong { font-family: 'Orbitron'; font-size: 26px; }
.host-stats [data-kind="live"] { color: var(--accent); text-shadow: 0 0 16px var(--glow); }
.host-stats [data-kind="open"] { color: #39d98a; }

.host-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.host-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.host-key-row { display: flex; gap: 8px; }
.host-key-row input { font-family: 'Orbitron', monospace; letter-spacing: .1em; }
.host-key-row button { flex: 0 0 auto; }
.host-hint { margin: 0; color: var(--muted); font-size: 14px; }
.host-actions { display: grid; gap: 12px; }
.host-actions label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.host-actions input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.35); color: var(--text); font: 600 17px 'Orbitron', monospace;
}
.host-actions hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.host-actions button:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.host-now { margin: 0; color: var(--text); font-weight: 600; }
.host-danger { color: #ff9a9a !important; border-color: rgba(255,77,77,.4) !important; }

.host-table-card { margin-top: 18px; }
.host-table-wrap { overflow-x: auto; }
.host-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.host-table th { text-align: left; font-family: 'Cinzel'; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.host-table td { padding: 8px; border-bottom: 1px solid rgba(255,255,255,.05); font-weight: 600; }
.host-table tr.wait td { opacity: .6; }
.host-kick { background: transparent; border: 1px solid var(--line); color: #ff9a9a; border-radius: 8px; padding: 4px 10px; cursor: pointer; font: inherit; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .customs-grid, .host-grid { grid-template-columns: 1fr; }
  .customs-steps { grid-template-columns: 1fr 1fr; }
  .host-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .customs-steps { grid-template-columns: 1fr; }
  .host-row { grid-template-columns: 1fr; }
  .customs-match, .customs-you { padding: 22px 18px; }
  .customs-host { padding-top: 110px; }
}
