/* =============================================
   WRESTLING OWNER — Main Stylesheet
   16:9 landscape, mobile-friendly, premium dark
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');

:root {
    --bg-dark: #0d0d0d;
    --panel-bg: #1a1a1a;
    --panel-hover: #222;
    --text-main: #ffffff;
    --text-muted: #999;
    --text-dim: #666;

    --accent: #e50914;
    --accent-hover: #c0070f;
    --accent-glow: rgba(229, 9, 20, 0.35);

    --face-color: #3b82f6;
    --heel-color: #ef4444;
    --tweener-color: #a855f7;

    --border: #2a2a2a;
    --border-light: #333;

    --gold: #f59e0b;
    --green: #4ade80;
    --yellow: #fbbf24;
    --purple: #a855f7;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    font-family: 'Roboto Condensed', 'Segoe UI', sans-serif;
    color: var(--text-main);
    overflow: hidden;
}

/* =============================================
   16:9 GAME WRAPPER
   ============================================= */
#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The actual game container is always the full viewport */
.overlay-fullscreen,
.dashboard {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* =============================================
   MAIN MENU — CINEMATIC REDESIGN
   ============================================= */
.overlay-fullscreen {
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.overlay-fullscreen.hidden { display: none; }

/* Background photo layer */
.menu-bg {
    position: absolute;
    inset: 0;
    background: url('asset/bg.png') center center / cover no-repeat;
    filter: brightness(0.35) saturate(1.1);
    z-index: 0;
}

/* Dark gradient overlay */
.menu-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(0,0,0,0.96) 0%, rgba(10,0,0,0.7) 50%, rgba(0,0,0,0.5) 100%),
        linear-gradient(180deg, transparent 40%, rgba(229,9,20,0.08) 100%);
    z-index: 1;
}

/* Two-column layout */
.menu-layout {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;          /* vertikal center saat panel pendek */
    justify-content: center;
    width: min(1100px, 96vw);
    gap: clamp(30px, 5vw, 80px);
    padding: 20px;
    max-height: 100vh;
}

/* LEFT: Branding block */
.menu-brand {
    flex: 1.2;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.menu-brand-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
    opacity: 0.85;
}
.logo-large {
    font-family: 'Bebas Neue', 'Roboto Condensed', sans-serif;
    font-size: clamp(54px, 9vw, 110px);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 60px rgba(229,9,20,0.5), 0 4px 20px rgba(0,0,0,0.8);
    margin-bottom: 16px;
}
.logo-large span {
    color: var(--accent);
    display: block;
}
.subtitle {
    color: #aaa;
    font-size: clamp(11px, 1.5vw, 15px);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 24px;
}
.menu-brand-divider {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 18px 0;
    border-radius: 1px;
}
.menu-brand-footer {
    font-size: 11px;
    color: #555;
    letter-spacing: 1px;
    line-height: 1.5;
}

/* RIGHT: Glass card panel */
.menu-panel {
    flex: 0 0 min(400px, 90vw);
    max-height: min(88vh, 700px);     /* jangan melebihi layar */
    overflow-y: auto;                  /* scroll jika konten panjang */
    overscroll-behavior: contain;
    background: rgba(5, 5, 10, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: 18px;
    padding: clamp(20px, 3vh, 32px) clamp(18px, 3vw, 32px);
    box-shadow: 0 0 60px rgba(229,9,20,0.18), 0 30px 80px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(229,9,20,0.4) transparent;
}
.menu-panel::-webkit-scrollbar { width: 4px; }
.menu-panel::-webkit-scrollbar-track { background: transparent; }
.menu-panel::-webkit-scrollbar-thumb {
    background: rgba(229,9,20,0.4);
    border-radius: 2px;
}

/* Menu footer: lang toggle + version */
.menu-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.menu-version {
    font-size: 10px;
    color: #444;
    letter-spacing: 1px;
}
.btn-lang {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #aaa;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.2s;
}
.btn-lang:hover {
    background: rgba(229,9,20,0.15);
    border-color: var(--accent);
    color: #fff;
}

/* Small lang button inside game header */
.btn-lang-sm {
    font-size: 10px !important;
    padding: 3px 6px !important;
    letter-spacing: 0.5px;
}

/* Credits button style */
.btn-credits-open {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #888 !important;
    font-size: clamp(12px, 1.8vw, 14px) !important;
    letter-spacing: 1px;
    padding: clamp(8px, 1.2vh, 12px) !important;
    box-shadow: none !important;
}
.btn-credits-open:hover {
    border-color: rgba(255,255,255,0.4) !important;
    color: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.menu-actions.hidden { display: none; }

.btn-menu {
    padding: clamp(12px, 1.8vh, 18px);
    font-size: clamp(14px, 2vw, 17px);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, #8a0000 100%);
    border: 1px solid rgba(255,100,100,0.4);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.25);
    transition: all 0.2s;
    border-radius: 8px;
}
.btn-menu:hover {
    background: linear-gradient(180deg, #ff3333 0%, var(--accent) 100%);
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.5);
    transform: translateY(-2px);
}

.btn-demo-start {
    background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%) !important;
    border: 1px dashed rgba(255, 200, 100, 0.5) !important;
    color: #fbbf24 !important;
    font-size: clamp(12px, 1.8vw, 15px) !important;
    letter-spacing: 1px;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.08) !important;
}
.btn-demo-start:hover {
    border-color: rgba(251, 191, 36, 0.8) !important;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25) !important;
    transform: translateY(-2px) !important;
}

/* Responsive: stack vertically on narrow screens */
@media (max-width: 680px) {
    .menu-layout { flex-direction: column; gap: 20px; }
    .menu-brand { text-align: center; align-items: center; }
    .menu-brand-divider { display: none; }
    .menu-panel { width: 100%; }
    .logo-large { font-size: clamp(48px, 14vw, 72px); }
}

.input-large {
    width: 100%;
    padding: clamp(12px, 2vh, 16px);
    font-size: clamp(14px, 2vw, 18px);
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    transition: 0.3s;
    margin-bottom: 4px;
}
.input-large:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.35);
}


/* =============================================
   SCENARIO SELECTION CARDS
   ============================================= */
#scenario-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(52vh, 380px);   /* batasi tinggi, sisanya scroll */
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;             /* ruang scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(229,9,20,0.35) transparent;
}
#scenario-cards::-webkit-scrollbar { width: 3px; }
#scenario-cards::-webkit-scrollbar-thumb {
    background: rgba(229,9,20,0.35);
    border-radius: 2px;
}

.scenario-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 12px;          /* lebih compact */
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;              /* jangan menyusut */
}
.scenario-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(3px);
}
.scenario-card.selected {
    border-color: var(--scenario-color, var(--accent));
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 12px color-mix(in srgb, var(--scenario-color, var(--accent)) 35%, transparent);
}
.scenario-card-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }
.scenario-card-body { flex: 1; min-width: 0; }
.scenario-card-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.scenario-card-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.scenario-card-desc { font-size: 11px; color: #aaa; line-height: 1.35; }
.scenario-card-wc {
    font-size: 10px;
    color: var(--gold);
    margin-top: 5px;
    padding: 3px 7px;
    background: rgba(245,158,11,0.1);
    border-radius: 4px;
    display: inline-block;
    line-height: 1.4;
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.dashboard {
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    overflow: hidden;
}
.dashboard.hidden { display: none; }

/* HEADER */
header {
    background: #000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent);
    flex-shrink: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.logo {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
}
.logo span { color: var(--accent); }

.header-stats {
    display: flex;
    gap: clamp(10px, 2vw, 25px);
    align-items: center;
    flex-wrap: wrap;
}

.stat-box { text-align: right; }
.stat-box .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-box .value {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.1;
}

.header-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* CROWD STATE COLORS */
.crowd-bored { color: #888; }
.crowd-neutral { color: #fff; }
.crowd-pop { color: #4ade80; }
.crowd-heat { color: #f87171; }
.crowd-riot { color: #dc2626; animation: shake 0.4s infinite; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* TABS */
.tabs {
    display: flex;
    background: #060606;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 1;
    min-width: 80px;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: clamp(8px, 1.5vh, 14px) 10px;
    font-size: clamp(11px, 1.5vw, 15px);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.04); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--panel-bg);
}

/* MAIN CONTENT AREA */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

.tab-panel {
    display: none;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.tab-panel.active { display: flex; }

.panel {
    padding: clamp(10px, 2vh, 20px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    min-height: 0;
}
.panel h2 {
    font-size: clamp(14px, 2vw, 20px);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    flex-shrink: 0;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    background: linear-gradient(180deg, var(--accent) 0%, #8a0000 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: clamp(13px, 1.8vw, 17px);
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.btn-primary:hover {
    background: linear-gradient(180deg, #ff3333 0%, var(--accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }

.btn-cancel {
    background: #2a2a2a;
    color: #ccc;
    border: 1px solid var(--border-light);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    transition: 0.2s;
}
.btn-cancel:hover { background: #333; color: #fff; }

.btn-small {
    background: #1e1e1e;
    color: #ccc;
    border: 1px solid var(--border-light);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: 0.15s;
    white-space: nowrap;
}
.btn-small:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* =============================================
   ROSTER CARDS
   ============================================= */
.tier-section { margin-bottom: 16px; }
.tier-section h3 {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.roster-list { display: flex; flex-direction: column; gap: 6px; }

/* =============================================
   FREE AGENT FILTER TOOLBAR
   ============================================= */
#fa-toolbar {
    flex-shrink: 0;
    margin-bottom: 10px;
}
.fa-toolbar-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.fa-input {
    flex: 1;
    min-width: 120px;
    background: #111;
    border: 1px solid var(--border-light);
    color: #fff;
    padding: 7px 10px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 12px;
    transition: 0.2s;
}
.fa-input:focus { border-color: var(--accent); outline: none; }
.fa-input::placeholder { color: #555; }

.fa-select {
    background: #111;
    border: 1px solid var(--border-light);
    color: #ccc;
    padding: 6px 8px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    flex: 1;
    min-width: 100px;
    transition: 0.15s;
}
.fa-select:hover { border-color: #555; }
.fa-select:focus { border-color: var(--accent); outline: none; }



.wrestler-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-muted);
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.15s;
}
.wrestler-card:hover { background: var(--panel-hover); }
.wrestler-card.face { border-left-color: var(--face-color); }
.wrestler-card.heel { border-left-color: var(--heel-color); }
.wrestler-card.tweener { border-left-color: var(--tweener-color); }
.wrestler-card.injured { opacity: 0.6; border-left-color: #555; }

.w-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.w-name { font-weight: 700; font-size: clamp(12px, 1.5vw, 15px); }
.w-stats { font-size: 11px; color: var(--text-muted); }
.w-salary { font-size: 11px; color: var(--green); }
.w-pop { font-size: clamp(16px, 2vw, 20px); font-weight: 700; text-align: right; min-width: 36px; }

/* =============================================
   BOOKING PANEL
   ============================================= */
.booking-panel { flex: 1.5; background: var(--bg-dark); }
.slot {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
    padding: clamp(10px, 1.5vh, 14px);
}
.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.slot-title { font-weight: 700; color: var(--text-muted); font-size: 13px; }
.slot-type-select {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid var(--border-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
}
.slot-content { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slot-select {
    flex: 1;
    min-width: 100px;
    background: #111;
    color: #fff;
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: clamp(12px, 1.5vw, 15px);
}
.slot-vs { font-weight: 700; color: var(--accent); }
.slot-finish-select { background: #111; color: #fff; border: 1px solid var(--border); padding: 4px 6px; border-radius: 4px; font-family: inherit; font-size: 12px; }

.booking-actions { margin-top: 15px; text-align: center; }

/* REPORT PANEL */
.report-panel { flex: 1; background: #141414; }
.log-container { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.log-segment {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: 4px;
    flex-shrink: 0;
}
.log-title { font-weight: 700; margin-bottom: 4px; color: var(--accent); font-size: 13px; }
.log-desc { color: #ddd; line-height: 1.4; font-size: 12px; }
.log-rating { font-weight: 700; font-size: clamp(14px, 2vw, 18px); text-align: right; }
.log-rating.high { color: var(--green); }
.log-rating.mid { color: var(--yellow); }
.log-rating.low { color: var(--heel-color); }

/* =============================================
   NEGOTIATION ITEMS
   ============================================= */
.nego-item {
    background: #1e1e1e;
    padding: 10px;
    border-left: 3px solid var(--yellow);
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
}
.nego-item.status-accept { border-left-color: var(--green); }
.nego-item.status-reject { border-left-color: var(--heel-color); }

/* =============================================
   CALENDAR
   ============================================= */
.calendar-panel { background: var(--bg-dark); }
.calendar-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 10px;
}
.cal-day-header {
    background: #111;
    padding: 8px 4px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
}
.cal-cell {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    min-height: clamp(60px, 10vh, 110px);
    padding: 6px;
    display: flex;
    flex-direction: column;
    border-radius: 3px;
    transition: 0.15s;
}
.cal-cell:hover { background: var(--panel-hover); }
.cal-cell.ple-week { background: rgba(229, 9, 20, 0.08); border-color: rgba(229,9,20,0.3); }
.cal-date { font-size: 11px; color: #666; align-self: flex-end; margin-bottom: 3px; font-weight: 700; }
.cal-event {
    background: #333;
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    margin-top: auto;
}
.cal-event.player { background: var(--face-color); }
.cal-event.titan { background: #ca8a04; }
.cal-event.elite { background: var(--heel-color); }
.cal-event.ple { background: linear-gradient(90deg, #e50914, #ff6b6b); animation: glow-pulse 2s infinite; }

@keyframes glow-pulse {
    0%,100% { box-shadow: 0 0 4px rgba(229,9,20,0.4); }
    50% { box-shadow: 0 0 12px rgba(229,9,20,0.7); }
}

/* =============================================
   MODALS
   ============================================= */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }

.modal-content {
    background: var(--panel-bg);
    padding: clamp(20px, 3vh, 35px) clamp(20px, 3vw, 35px);
    border-radius: 10px;
    width: min(440px, 94vw);
    border: 1px solid var(--accent);
    box-shadow: 0 0 40px rgba(229,9,20,0.2);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h2 { color: var(--accent); margin-bottom: 8px; font-size: clamp(18px, 2.5vw, 24px); }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; color: var(--text-muted); font-size: 13px; }
.form-group input {
    width: 100%;
    background: #111;
    border: 1px solid var(--border-light);
    color: #fff;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    border-radius: 4px;
    transition: 0.2s;
}
.form-group input:focus { border-color: var(--accent); outline: none; }

/* =============================================
   CHAPTER MODAL (Story Cutscene)
   ============================================= */
.chapter-modal-content {
    width: min(600px, 95vw);
    border-color: var(--gold);
    box-shadow: 0 0 50px rgba(245,158,11,0.2);
}

#chapter-badge {
    background: rgba(245,158,11,0.15);
    color: var(--gold);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#chapter-title {
    color: var(--gold) !important;
    border-bottom: 1px solid rgba(245,158,11,0.3);
    padding-bottom: 12px;
    margin-bottom: 16px;
    font-size: clamp(18px, 2.5vw, 24px);
}

.chapter-line {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    border-left: 3px solid transparent;
    animation: fadeInLine 0.4s ease-out;
    transition: opacity 0.3s;
}
.chapter-line.hidden { display: none; }
.chapter-line.speaker-Narator { border-left-color: #888; }
.chapter-line.speaker-Kamu { border-left-color: var(--face-color); }
.chapter-line .ch-speaker {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.chapter-line .ch-text {
    color: #e0e0e0;
    line-height: 1.5;
    font-size: clamp(13px, 1.8vw, 15px);
}

@keyframes fadeInLine {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   SAVE SLOTS
   ============================================= */
.save-slot-card {
    background: #111;
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
}
.save-slot-card:hover { background: #1e1e1e; border-color: var(--accent); transform: scale(1.01); }
.save-slot-card h4 { color: var(--accent); margin-bottom: 6px; font-size: 16px; }

/* =============================================
   FSM MONITOR OVERLAY
   ============================================= */
#fsm-monitor-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 6000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
}

#fsm-monitor-inner {
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    width: min(1100px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

#fsm-monitor-header {
    background: #111;
    border-bottom: 1px solid #222;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #4ade80;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
#fsm-monitor-close {
    background: none;
    border: 1px solid #333;
    color: #888;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.15s;
}
#fsm-monitor-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

#fsm-monitor-body {
    display: flex;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

.fsm-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1a1a1a;
    overflow-y: auto;
    padding: 12px;
    gap: 12px;
    min-height: 0;
}
.fsm-column:last-child { border-right: none; }

.fsm-block {
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    padding: 12px;
}
.fsm-block-title {
    font-size: 11px;
    font-weight: 700;
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #1e1e1e;
    padding-bottom: 6px;
}

/* FSM State chips */
.fsm-states { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fsm-state-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: #1a1a1a;
    color: #555;
    border: 1px solid #222;
    transition: 0.2s;
}
.fsm-state-chip.active {
    color: #000;
    border-color: transparent;
}

/* Crowd chips */
.fsm-crowd-bored.active { background: #888; color: #000; }
.fsm-crowd-neutral.active { background: #fff; color: #000; }
.fsm-crowd-pop.active { background: #4ade80; color: #000; }
.fsm-crowd-heat.active { background: #f87171; color: #000; }
.fsm-crowd-riot.active { background: #dc2626; color: #fff; animation: shake 0.4s infinite; }

/* Roster chips */
.fsm-fit-chip.active { background: #4ade80; }
.fsm-tired-chip.active { background: #fbbf24; }
.fsm-inj-chip.active { background: #ef4444; color: #fff; }

/* Alignment chips */
.fsm-face-chip.active { background: #3b82f6; color: #fff; }
.fsm-heel-chip.active { background: #ef4444; color: #fff; }
.fsm-tweener-chip.active { background: #a855f7; color: #fff; }

/* Nego chips */
.fsm-pending-chip.active { background: #fbbf24; color: #000; }
.fsm-eval-chip.active { background: #60a5fa; color: #000; }

/* Mini bar */
.fsm-mini-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}
.fsm-mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}
.fsm-mini-bar-label { font-size: 11px; color: #888; margin-top: 8px; }

/* Roster rows */
.fsm-roster-scroll { display: flex; flex-direction: column; gap: 5px; max-height: 250px; overflow-y: auto; }
.fsm-roster-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    background: #0d0d0d;
    padding: 5px 8px;
    border-radius: 4px;
}
.fsm-row-name { min-width: 130px; color: #ccc; }
.fsm-row-val { min-width: 30px; text-align: right; color: #888; }

/* Alignment bar */
.fsm-align-bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; width: 100%; }
.fsm-align-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    transition: width 0.5s;
}
.face-seg { background: #3b82f6; }
.tweener-seg { background: #a855f7; }
.heel-seg { background: #ef4444; }

/* Nego rows */
.fsm-nego-list { display: flex; flex-direction: column; gap: 5px; max-height: 150px; overflow-y: auto; }
.fsm-nego-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    background: #0d0d0d;
    padding: 5px 8px;
    border-radius: 4px;
    color: #ccc;
    gap: 8px;
}

/* Story progress */
.fsm-chapter-row {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}
.fsm-chapter-row.done { background: rgba(74,222,128,0.1); color: #4ade80; }
.fsm-chapter-row.active { background: rgba(245,158,11,0.1); color: var(--gold); }
.fsm-chapter-row.locked { background: #111; color: #555; }
.fsm-wincond { font-size: 12px; color: #ccc; padding: 6px; background: #111; border-radius: 4px; line-height: 1.4; }

/* =============================================
   STORY GOAL in header
   ============================================= */
#story-goal-box .label { font-size: 9px; }
#ui-story-goal { font-size: 11px !important; line-height: 1.3; max-width: 150px; }

/* =============================================
   MOBILE / RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    header {
        padding: 8px 12px;
        gap: 6px;
    }
    .header-stats {
        gap: 8px;
    }
    .stat-box .value { font-size: 15px; }
    .stat-box .label { font-size: 9px; }

    .tab-btn { font-size: 10px; padding: 8px 6px; min-width: 60px; }

    .main-content { flex-direction: column; overflow-y: auto; }
    .tab-panel.active { flex-direction: column; height: auto; }
    .panel { border-right: none; border-bottom: 1px solid var(--border); min-height: auto; max-height: none; }

    .slot-content { flex-direction: column; align-items: stretch; }
    .slot-vs { text-align: center; }

    .fsm-monitor-body { flex-direction: column; }
    .fsm-column { border-right: none; border-bottom: 1px solid #1a1a1a; }

    #fsm-monitor-inner { width: 99vw; max-height: 95vh; }
    #fsm-monitor-body { flex-direction: column; }

    .chapter-modal-content { width: 98vw; }
    .calendar-container { grid-template-columns: repeat(4, 1fr); }
    .cal-day-header:nth-child(n+5) { display: none; }
}

@media (max-width: 480px) {
    .logo { font-size: 16px; letter-spacing: 1px; }
    .booking-panel, .report-panel { flex: none; width: 100%; }
    .roster-panel { flex: none; }
    .contract-panel { flex: none; }
}

/* =============================================
   CREDITS MODAL
   ============================================= */
.credits-modal-content {
    max-width: 680px;
    width: 92vw;
    background: rgba(5, 5, 10, 0.96);
    border: 1px solid rgba(229,9,20,0.25);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 80px rgba(229,9,20,0.2), 0 40px 100px rgba(0,0,0,0.9);
}

.credits-close-btn {
    position: absolute;
    top: 14px; right: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: #888;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
    line-height: 1;
    padding: 0;
}
.credits-close-btn:hover { background: rgba(229,9,20,0.3); color: #fff; border-color: var(--accent); }

.credits-body {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 36px 36px 32px;
}

/* Photo */
.credits-photo-wrap {
    position: relative;
    flex-shrink: 0;
}
.credits-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid rgba(229,9,20,0.6);
    box-shadow: 0 0 30px rgba(229,9,20,0.35);
}
.credits-photo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(229,9,20,0.3);
    animation: credits-spin 20s linear infinite;
}
@keyframes credits-spin { to { transform: rotate(360deg); } }

/* Info */
.credits-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.credits-game-title {
    font-family: 'Bebas Neue', 'Roboto Condensed', sans-serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}
.credits-tag {
    font-size: 11px;
    color: #666;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.credits-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 16px 0;
}
.credits-role {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.credits-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.credits-contact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    font-size: 12px;
}
.credits-email {
    color: #aaa;
    text-decoration: none;
    transition: 0.15s;
}
.credits-email:hover { color: var(--accent); }

.credits-tech-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: #555;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.credits-tech-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.credits-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: #888;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}
.credits-copyright {
    margin-top: 16px;
    font-size: 10px;
    color: #444;
    letter-spacing: 0.5px;
}

@media (max-width: 560px) {
    .credits-body { flex-direction: column; align-items: center; text-align: center; }
    .credits-contact-row { justify-content: center; }
    .credits-tech-pills { justify-content: center; }
}
