* {
    box-sizing: border-box;
}


body {

    margin: 0;

    background:
        radial-gradient(
            circle at top,
            #24202f,
            #090b10 60%
        );

    color: #eeeeee;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


button,
select,
input {

    font-family: inherit;
}


.hidden {
    display: none !important;
}


/* =========================================================
   HEADER
========================================================= */

header {

    padding: 18px 28px;

    background: #11151d;

    border-bottom:
        1px solid #2b303b;

    display: flex;

    justify-content: space-between;

    align-items: center;
}


header h2 {

    margin:
        3px 0
        0
        0;

}


.header-right {

    display: flex;

    gap: 15px;

    align-items: center;
}


/* =========================================================
   LOGO
========================================================= */

.logo {

    color: #d7b45a;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 3px;
}


/* =========================================================
   NAVIGATION
========================================================= */

nav {

    display: flex;

    gap: 6px;

    padding:
        10px
        28px;

    background: #0f1218;

    border-bottom:
        1px solid #272d37;

    overflow-x: auto;
}


nav button {

    background: #1b2029;

    color: #dddddd;

    border: 0;

    border-radius: 8px;

    padding:
        10px
        14px;

    white-space: nowrap;

    cursor: pointer;
}


nav button:hover {

    background: #282f3a;
}


/* =========================================================
   MAIN
========================================================= */

main {

    width: 100%;

    max-width: 1500px;

    margin: auto;

    padding: 25px;
}


.page-title {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}


.page-title h1 {

    margin:
        0
        0
        8px
        0;
}


.page-title p {

    margin: 0;

    color: #9da4b2;
}


/* =========================================================
   LOGIN
========================================================= */

.login {

    min-height: 100vh;

    display: grid;

    place-items: center;

    padding: 20px;
}


.login-card {

    width: min(
        430px,
        95vw
    );

    padding: 35px;

    background: #11151d;

    border:
        1px solid
        #343a47;

    border-radius: 18px;

    box-shadow:
        0 30px 80px
        rgba(0,0,0,.4);
}


.login-card h1 {

    margin-top: 8px;
}


.login-card input {

    width: 100%;

    padding: 13px;

    background: #090c11;

    color: white;

    border:
        1px solid
        #343a47;

    border-radius: 8px;

    margin:
        15px
        0
        10px;
}


.login-card button {

    width: 100%;

    padding: 13px;
}


/* =========================================================
   INPUTS
========================================================= */

select,
input[type="text"] {

    background: #090c11;

    color: #eeeeee;

    border:
        1px solid
        #343a47;

    border-radius: 8px;

    padding: 11px;

    width: 100%;
}


select:disabled,
input:disabled {

    opacity: .55;

    cursor: not-allowed;
}


label {

    display: block;

    margin:
        10px
        0
        5px;

    color: #aeb5c2;

    font-size: 13px;
}


.row {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;
}


/* =========================================================
   PANELS
========================================================= */

.columns {

    display: grid;

    grid-template-columns:
        1fr 1.3fr;

    gap: 18px;
}


.panel {

    background: #11151d;

    border:
        1px solid
        #292f3a;

    border-radius: 14px;

    padding: 20px;
}


.panel-title {

    display: flex;

    justify-content: space-between;

    align-items: center;
}


.panel-title h2 {

    margin-top: 0;
}


/* =========================================================
   BUTTONS
========================================================= */

button {

    border: 0;

    border-radius: 8px;

    padding:
        11px
        15px;

    font-weight: 800;

    cursor: pointer;
}


button:disabled {

    opacity: .5;

    cursor: not-allowed;
}


.primary {

    width: 100%;

    margin-top: 18px;

    background: #d7b45a;

    color: #17130a;
}


.primary:hover:not(:disabled) {

    filter: brightness(1.08);
}


.logout {

    background: #292f3a;

    color: #eeeeee;
}


.button-warning {

    background: #9a3f3f !important;

    color: white !important;
}


/* =========================================================
   PERKS
========================================================= */

.perks {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 6px;

    max-height: 400px;

    overflow-y: auto;

    padding-right: 5px;
}


.perk {

    display: block;

    padding: 8px;

    background: #0c1016;

    border:
        1px solid
        #282f3a;

    border-radius: 7px;

    font-size: 12px;

    cursor: pointer;
}


.perk:hover {

    background: #161b23;
}


.perk input {

    margin-right: 5px;
}


.perk-banned {

    opacity: .45;

    cursor: not-allowed;

}


.perk-banned:hover {

    background: #0c1016;
}


.ban-label {

    float: right;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .5px;

    opacity: .8;
}


/* =========================================================
   RULE NOTICE
========================================================= */

.rule-notice {

    padding: 10px;

    margin:
        12px
        0;

    background: #171b23;

    border:
        1px solid
        #3b424f;

    border-radius: 8px;

    color: #aeb5c2;

    font-size: 12px;

    line-height: 1.7;
}


.rule-notice strong {

    color: #d7b45a;
}


.rule-notice span {

    display: inline-block;

    margin-left: 5px;

    padding:
        2px
        5px;

    border-radius: 4px;

    background: #292f3a;

    color: #eeeeee;
}


/* =========================================================
   SELECTION COUNT
========================================================= */

.selection-count {

    margin-top: 7px;

    color: #7f8999;

    font-size: 11px;
}


.selection-warning {

    color: #ff7777 !important;
}


/* =========================================================
   SURVIVOR
========================================================= */

.surv {

    border:
        1px solid
        #292f3a;

    border-radius: 10px;

    padding: 12px;

    margin:
        10px
        0;
}


.surv h3 {

    margin:
        0
        0
        8px;
}


.survperks {

    max-height: 220px;

    overflow-y: auto;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 5px;
}


.locked-message {

    padding: 25px;

    background: #0c1016;

    border:
        1px dashed
        #3b424f;

    border-radius: 10px;

    color: #aeb5c2;
}


/* =========================================================
   BADGES
========================================================= */

.badge {

    display: inline-block;

    padding:
        5px
        9px;

    border-radius: 6px;

    background: #292f3a;

    color: #d7b45a;

    font-size: 11px;

    font-weight: 800;
}


.status {

    padding: 12px;

    background: #11151d;

    border:
        1px solid
        #292f3a;

    border-radius: 10px;

    margin-bottom: 15px;

    color: #d7b45a;
}


.error {

    color: #ff6b6b;

    margin-top: 12px;
}


/* =========================================================
   BRACKET
========================================================= */

.bracket {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;
}


.bracket-column {

    background: #11151d;

    padding: 10px;

    border-radius: 10px;
}


.match {

    border:
        1px solid
        #2b323f;

    padding: 12px;

    margin:
        8px
        0;

    border-radius: 8px;

    background: #0c1016;
}


.match strong {

    color: #d7b45a;
}


.match-ready {

    border-color: #6f9b66;
}


.winner {

    margin-top: 8px;

    color: #8fca82;

    font-size: 12px;

    font-weight: 700;
}


/* =========================================================
   STREAM
========================================================= */

.stream {

    padding: 20px;

    background: #11151d;

    border:
        1px solid
        #282f3a;

    border-radius: 12px;

    margin:
        10px
        0;
}


.stream a {

    color: #d7b45a;

    font-weight: bold;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (
    max-width: 900px
) {

    .columns {

        grid-template-columns:
            1fr;
    }


    .bracket {

        grid-template-columns:
            1fr 1fr;
    }

}


@media (
    max-width: 600px
) {

    main {

        padding: 14px;
    }


    .page-title {

        display: block;
    }


    .page-title select {

        margin-top: 15px;
    }


    .perks,
    .survperks {

        grid-template-columns:
            1fr;
    }


    .row {

        grid-template-columns:
            1fr;
    }


    .bracket {

        grid-template-columns:
            1fr;
    }


    header {

        padding:
            15px;
    }

}

/* =========================================================
   MATCH-SPECIFIC TOKEN ACCESS
========================================================= */

.match-access {

    background: #11151d;

    border:
        1px solid
        #292f3a;

    border-radius: 12px;

    padding: 16px;

    margin-bottom: 18px;
}


.match-access h3 {

    margin-top: 0;
}


.access-row {

    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 8px;

    margin-top: 10px;
}


.access-row input {

    background: #090c11;

    color: #ffffff;

    border:
        1px solid
        #343a47;

    border-radius: 8px;

    padding: 11px;
}


.access-role {

    display: inline-block;

    color: #d7b45a;

    font-size: 12px;

    font-weight: 800;

    text-transform: uppercase;
}


.killer-info {

    color: #d7b45a;

    font-size: 13px;

    margin-top: 5px;
}


.token-display {

    margin-top: 15px;

    padding: 15px;

    background: #090c11;

    border-radius: 8px;
}


.token-display code {

    display: block;

    margin-top: 5px;

    padding: 10px;

    background: #161b23;

    border-radius: 6px;

    user-select: all;

    overflow-wrap: anywhere;
}


.perk-banned {

    opacity: .42;

    cursor: not-allowed;
}


.perk-banned b {

    float: right;

    font-size: 9px;

    color: #ff7777;
}


.selection-count {

    margin-top: 7px;

    font-size: 11px;

    color: #9099a8;
}


@media (
    max-width: 600px
) {

    .access-row {

        grid-template-columns:
            1fr;
    }

}

/* =========================================================
   BRACKET TREE
========================================================= */

.bracket-tree {

    position: relative;

    overflow-x: auto;

    padding: 10px 0 40px;
}


.bracket-lines {

    position: absolute;

    top: 0;

    left: 0;

    pointer-events: none;
}


.bracket-lines path {

    fill: none;

    stroke: #333b48;

    stroke-width: 2;
}


.bracket-lines path.loser-feed {

    stroke: #4a3838;

    stroke-dasharray: 5 4;
}


.bracket-nodes {

    position: relative;
}


.bracket-node {

    position: absolute;

    width: 210px;

    background: #0c1016;

    border:
        1px solid
        #2b323f;

    border-radius: 8px;

    padding: 10px;

    font-size: 12px;
}


.bracket-node.stage-lb {

    border-color: #3a2b2b;
}


.bracket-node.stage-gf {

    border-color: #6f5a2b;
}


.bracket-node .node-head {

    display: flex;

    justify-content: space-between;

    align-items: baseline;

    margin-bottom: 6px;
}


.bracket-node .node-code {

    color: #d7b45a;

    font-weight: 700;
}


.bracket-node .node-tier {

    color: #8a92a3;

    font-size: 10px;
}


.bracket-node .node-team {

    padding: 3px 0;

    color: #ccc;
}


.bracket-node .node-team.tbd {

    color: #666;

    font-style: italic;
}


.bracket-node .node-team.is-winner {

    color: #8fca82;

    font-weight: 700;
}


.bracket-node .node-round {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 6px;

    margin-top: 6px;

    padding-top: 6px;

    border-top:
        1px solid
        #1c212b;

    color: #8a92a3;

    font-size: 10.5px;
}


.bracket-node .node-round-label {

    flex-shrink: 0;
}


.bracket-node .node-round-status {

    color: #9099a8;
}


.bracket-node .score-input {

    width: 56px;

    font-size: 10.5px;

    padding: 3px 5px;

    background: #11151d;

    border:
        1px solid
        #2b323f;

    color: #eee;

    border-radius: 4px;
}


/* =========================================================
   STREAM LINK ADMIN ROWS
========================================================= */

.stream-link-row {

    display: grid;

    grid-template-columns:
        110px
        1fr
        auto;

    gap: 8px;

    margin-bottom: 8px;
}


.stream-link-row input {

    width: 100%;
}


.stream-link-row button {

    padding: 8px 12px;
}


/* =========================================================
   MULTI-LINK STREAM CARDS (PUBLIC)
========================================================= */

.stream-links {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 8px;
}


.stream-links a {

    padding: 6px 12px;

    background: #1a1f29;

    border:
        1px solid
        #2b323f;

    border-radius: 20px;

    color: #d7b45a;

    text-decoration: none;

    font-size: 12px;
}


.stream-links a:hover {

    background: #232937;
}


/* =========================================================
   MANAGE TEAMS
========================================================= */

.team-row {

    display: grid;

    grid-template-columns:
        70px
        1fr
        auto;

    align-items: center;

    gap: 8px;

    margin-bottom: 8px;
}


.team-row .team-code {

    color: #8a92a3;

    font-size: 12px;
}


.team-row button {

    padding: 8px 12px;
}
