/* Saturday Club Global Trust — brand colours from logo */
:root {
    --navy: #393187;
    --navy-700: #2b2569;
    --navy-50: #eeedf7;
    --red: #ed1c24;
    --red-700: #c2130a;
    --ink: #1e1b3a;
    --muted: #6b6886;
    --line: #e2e0ee;
    --bg: #f6f5fb;
    --card: #ffffff;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(57, 49, 135, .10);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 10px; cursor: pointer;
    font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1;
    padding: 14px 22px; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; width: 100%; font-size: 16px; padding: 16px; }
.btn-primary:hover { background: var(--red-700); }
.btn-primary:disabled { opacity: .7; cursor: wait; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-ghost:hover { background: var(--navy-50); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Auth page ---------- */
.page-auth {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(237, 28, 36, .07), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(57, 49, 135, .10), transparent 45%),
        var(--bg);
}
.auth-wrap {
    max-width: 1040px; width: calc(100% - 32px); margin: 40px auto 0;
    display: grid; grid-template-columns: 380px 1fr; gap: 0;
    background: var(--card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.auth-brand {
    background: linear-gradient(180deg, #fff 0%, var(--navy-50) 100%);
    border-right: 1px solid var(--line);
    padding: 36px 30px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.brand-logo { width: 240px; max-width: 100%; height: auto; }
.event-card {
    width: 100%; background: var(--navy); color: #fff; border-radius: var(--radius);
    padding: 22px 20px; text-align: left; position: relative; overflow: hidden;
}
.event-card::after {
    content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
    border-radius: 50%; border: 10px solid rgba(237, 28, 36, .55);
}
.event-card h1 { margin: 10px 0 0; font-size: 28px; line-height: 1.15; }
.event-sub { margin: 2px 0 14px; color: #ffd0d2; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; font-size: 13px; }
.event-meta { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.event-meta li { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .15); }
.event-meta .ico { display: inline-block; width: 22px; }
.badge {
    display: inline-block; background: rgba(255, 255, 255, .15); color: #fff;
    font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 99px;
}
.badge-live { background: var(--red); }

.auth-panel { padding: 32px 40px 36px; }
.tabs { display: flex; gap: 6px; background: var(--navy-50); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.tab {
    flex: 1; text-align: center; padding: 11px 10px; border-radius: 9px;
    text-decoration: none; color: var(--navy); font-weight: 600; font-size: 14px;
}
.tab.active { background: #fff; box-shadow: 0 2px 8px rgba(57, 49, 135, .15); color: var(--red); }

.form h2 { margin: 0 0 16px; font-size: 20px; color: var(--navy); }
.form label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 14px; }
.form label b { color: var(--red); }
.form input, .form select {
    display: block; width: 100%; margin-top: 6px;
    font-family: inherit; font-size: 15px; color: var(--ink);
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form select:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(57, 49, 135, .15); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.req-note { font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.switch { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0; }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdecec; color: var(--red-700); border: 1px solid #f7c3c5; }
.alert-info  { background: var(--navy-50); color: var(--navy); border: 1px solid #d4d1ec; }

.site-footer { text-align: center; font-size: 13px; color: var(--muted); padding: 28px 16px; }
.site-footer a { color: var(--red); text-decoration: none; font-weight: 500; }

/* ---------- Webcast page ---------- */
.topbar { background: #fff; border-bottom: 3px solid var(--red); box-shadow: 0 2px 12px rgba(57, 49, 135, .06); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand strong { display: block; color: var(--navy); font-size: 16px; line-height: 1.2; }
.brand small { color: var(--red); font-weight: 500; font-size: 12px; }
.user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.hello b { color: var(--navy); }

.webcast { max-width: 1100px; margin: 0 auto; padding: 26px 16px 10px; }
.webcast-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.webcast-head h1 { margin: 0; font-size: 28px; color: var(--navy); line-height: 1.2; }
.webcast-head .accent { color: var(--red); }
.webcast-head .meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.status {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 13px; letter-spacing: .5px; text-transform: uppercase;
    padding: 8px 14px; border-radius: 99px; background: var(--navy-50); color: var(--navy);
}
.status-live { background: var(--red); color: #fff; }
.status-ended { background: #ecebf1; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.player-shell { background: #fff; padding: 10px; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.player-16x9 { position: relative; width: 100%; padding-top: 56.25%; background: #0e0c24; border-radius: 12px; overflow: hidden; }
.player-16x9 > div, .player-16x9 > video, .player-16x9 .video-js {
    position: absolute !important; inset: 0; width: 100% !important; height: 100% !important;
}

.countdown {
    margin: 16px auto 0; max-width: 460px; text-align: center; background: var(--navy); color: #fff;
    border-radius: 12px; padding: 12px 16px; font-size: 15px;
}
.countdown b { color: #ffd0d2; font-variant-numeric: tabular-nums; font-size: 18px; margin-left: 6px; }
.help { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .auth-wrap { grid-template-columns: 1fr; margin-top: 16px; border-radius: 16px; }
    .auth-brand { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
    .brand-logo { width: 170px; }
    .auth-panel { padding: 24px 20px 28px; }
}
@media (max-width: 560px) {
    .grid-2 { grid-template-columns: 1fr; }
    .webcast-head { flex-direction: column; align-items: flex-start; }
    .webcast-head h1 { font-size: 22px; }
    .brand small, .hello { display: none; }
    .brand strong { font-size: 14px; }
    .player-shell { padding: 4px; border-radius: 12px; }
}

/* "Trial Run" label (toggle SHOW_TRIAL_RUN in config.php) */
.trial-run { display: inline-block; margin: 6px 0 4px; padding: 3px 12px; border-radius: 99px;
    font-size: 13px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
    background: #fff3cd; color: #8a5a00; border: 1px dashed #e0a800; }
.webcast-head .trial-run { margin: 6px 0 2px; }

/* Live viewer count pill (replaces "Starting soon") */
.status .dot { background: var(--red); }
.status-live .dot { background: #fff; }
.status b#vc { font-variant-numeric: tabular-nums; font-size: 15px; }
.status #vc-label { text-transform: none; letter-spacing: 0; font-weight: 500; }
.status .live-tag[hidden] { display: none; }
