/* ============================================================
   GAME CENTER
   ============================================================ */

.game-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;

    background: rgba(0,0,0,.58);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    opacity: 0;
    pointer-events: none;

    transition: opacity .28s ease;
}


.game-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}


.game-center {
    position: fixed;

    top: 0;
    right: 0;

    width: min(760px, 92vw);
    height: 100vh;

    z-index: 101;

    overflow-y: auto;

    background:
        linear-gradient(
            180deg,
            rgba(20,29,24,.94),
            rgba(6,10,8,.97)
        );

    border-left:
        1px solid rgba(255,255,255,.11);

    box-shadow:
        -28px 0 80px rgba(0,0,0,.44);

    backdrop-filter: blur(30px) saturate(140%);
    -webkit-backdrop-filter: blur(30px) saturate(140%);

    transform: translateX(105%);

    transition:
        transform .36s cubic-bezier(.16,1,.3,1);
}


.game-backdrop.open .game-center {
    transform: translateX(0);
}


.game-center-header {
    position: sticky;
    top: 0;
    z-index: 5;

    padding: 22px 24px 16px;

    background:
        rgba(12,18,15,.88);

    border-bottom:
        1px solid rgba(255,255,255,.08);

    backdrop-filter: blur(25px);
}


.game-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 18px;
}


.game-center-title {
    margin: 0;

    font-size: 30px;
    line-height: 1;

    letter-spacing: -.045em;
}


.game-center-line {
    margin-top: 7px;

    color: var(--muted);

    font-family: var(--mono);
    font-size: 13px;
}


.game-close {
    width: 34px;
    height: 34px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: rgba(255,255,255,.07);
    color: var(--text);

    font-size: 19px;

    cursor: pointer;
}


.game-decision-row {
    margin-top: 18px;

    display: flex;
    align-items: center;

    gap: 9px;
    flex-wrap: wrap;
}


.game-tabs {
    margin-top: 20px;

    display: flex;
    gap: 4px;

    overflow-x: auto;

    padding: 4px;

    border-radius: 13px;

    background: rgba(255,255,255,.045);
}


.game-tab {
    border: 0;

    padding: 9px 13px;

    border-radius: 9px;

    color: var(--muted);
    background: transparent;

    white-space: nowrap;

    font-family: inherit;
    font-size: 9px;
    font-weight: 800;

    letter-spacing: .08em;

    cursor: pointer;
}


.game-tab.active {
    color: var(--text);

    background:
        rgba(255,255,255,.10);

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.07);
}


.game-center-body {
    padding: 22px 24px 60px;
}


.game-panel {
    display: none;
}


.game-panel.active {
    display: block;
}


.gc-section {
    margin-bottom: 16px;

    padding: 18px;

    border-radius: 17px;

    background:
        rgba(255,255,255,.045);

    border:
        1px solid rgba(255,255,255,.065);
}


.gc-section-title {
    margin-bottom: 14px;

    color: var(--muted);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .14em;
}


.gc-model-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 9px;
}


.gc-model-card {
    padding: 14px;

    border-radius: 13px;

    background:
        rgba(255,255,255,.04);

    border:
        1px solid rgba(255,255,255,.05);
}


.gc-model-name {
    color: var(--muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .12em;
}


.gc-model-value {
    margin-top: 6px;

    font-family: var(--mono);

    font-size: 18px;
    font-weight: 800;
}


.gc-model-note {
    margin-top: 5px;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.35;
}


.gc-metric-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 8px;
}


.gc-metric {
    padding: 13px;

    text-align: center;

    border-radius: 12px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.045);
}


.gc-metric-label {
    color: var(--muted);

    font-size: 8px;
    font-weight: 800;

    letter-spacing: .10em;
}


.gc-metric-value {
    margin-top: 5px;

    font-family: var(--mono);

    font-size: 14px;
    font-weight: 800;
}


.gc-explanation {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.55;
}


/* ============================================================
   PBP MADDEN-STYLE SHELL
   ============================================================ */

.pbp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    margin-bottom: 14px;

    flex-wrap: wrap;
}


.pbp-toggle {
    display: flex;

    padding: 3px;

    border-radius: 10px;

    background:
        rgba(255,255,255,.045);

    border:
        1px solid var(--border);
}


.pbp-period-btn {
    border: 0;

    padding: 7px 10px;

    color: var(--muted);
    background: transparent;

    border-radius: 7px;

    font-size: 8px;
    font-weight: 800;

    cursor: pointer;
}


.pbp-period-btn.active {
    color: var(--text);

    background:
        rgba(255,255,255,.11);
}


.pbp-field-shell {
    position: relative;

    min-height: 370px;

    overflow: hidden;

    border-radius: 18px;

    border:
        1px solid rgba(255,255,255,.10);

    background:
        linear-gradient(
            180deg,
            rgba(9,37,18,.76),
            rgba(5,20,11,.88)
        );
}


.pbp-field-shell::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: .25;

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent calc(10% - 1px),
            rgba(255,255,255,.16) calc(10% - 1px),
            rgba(255,255,255,.16) 10%
        );
}


.pbp-placeholder {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 30px;
}


.pbp-placeholder-title {
    font-size: 22px;
    font-weight: 800;

    letter-spacing: -.03em;
}


.pbp-placeholder-sub {
    max-width: 400px;

    margin-top: 8px;

    color: rgba(255,255,255,.56);

    font-size: 11px;
    line-height: 1.5;
}


.pbp-route-demo {
    position: relative;

    width: 230px;
    height: 100px;

    margin-bottom: 25px;
}


.pbp-route-demo span {
    position: absolute;

    display: block;

    height: 3px;

    border-radius: 2px;

    background: var(--green);

    box-shadow:
        0 0 14px rgba(83,226,124,.55);

    transform-origin: left center;
}


.pbp-route-demo span:nth-child(1) {
    width: 90px;

    left: 14px;
    bottom: 18px;

    transform: rotate(-45deg);
}


.pbp-route-demo span:nth-child(2) {
    width: 105px;

    left: 100px;
    bottom: 25px;

    transform: rotate(22deg);
}


.pbp-route-demo span:nth-child(3) {
    width: 72px;

    left: 79px;
    bottom: 17px;

    transform: rotate(-90deg);
}


.pbp-callout {
    margin-top: 12px;

    padding: 12px 14px;

    border-radius: 12px;

    color: var(--green);

    background:
        var(--green-soft);

    border:
        1px solid rgba(83,226,124,.20);

    font-size: 10px;
    font-weight: 800;
}


/* ============================================================
   CLICKABILITY
   ============================================================ */

.prediction-table tbody tr,
.mobile-game-card {
    cursor: pointer;
}


/* ============================================================
   MOBILE GAME CENTER
   ============================================================ */

@media (max-width: 700px) {

    .game-center {
        width: 100vw;

        border-left: none;
    }


    .game-center-header {
        padding:
            18px 15px 13px;
    }


    .game-center-title {
        font-size: 27px;
    }


    .game-center-body {
        padding:
            16px 14px 80px;
    }


    .gc-model-grid {
        grid-template-columns: 1fr 1fr;
    }


    .gc-metric-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }


    .pbp-field-shell {
        min-height: 330px;
    }

}


/* Force-mobile development preview */
body.force-mobile .game-center {
    width: min(430px, 100vw);
}
