:root {
    --ps-bg: #030914;
    --ps-header: #040e1f;
    --ps-card: #07162f;
    --ps-card-alt: #0c1c33;
    --ps-border: #183b66;

    --ps-blue: #007dff;
    --ps-blue-bright: #149bff;
    --ps-blue-dark: #003d7d;

    --ps-red: #e32637;
    --ps-red-bright: #ff4150;
    --ps-red-dark: #72121e;

    --ps-green: #22d36f;
    --ps-orange: #ffad32;

    --ps-white: #f2f6fc;
    --ps-text: #d9e4f2;
    --ps-muted: #8499b5;

    --ps-radius: 12px;
}


/* ============================================================
   BASE
   ============================================================ */

html {
    background: var(--ps-bg);
}

body {
    background:
        linear-gradient(
            rgba(3, 9, 20, 0.72),
            rgba(3, 9, 20, 0.82)
        ),
        url("/static/poolstream-ui.png")
        center center / cover
        fixed no-repeat,
        var(--ps-bg) !important;

    color: var(--ps-white) !important;
}


/* ============================================================
   HEADERS / BRANDING
   ============================================================ */

header {
    background: var(--ps-header) !important;
    border-bottom: 1px solid var(--ps-border) !important;
    position: relative;
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--ps-blue) 0%,
            var(--ps-blue) 49.8%,
            var(--ps-red) 50.2%,
            var(--ps-red) 100%
        );
}

h1 {
    color: var(--ps-white) !important;
    letter-spacing: 0.2px;
}

header h1::before {
    content: "8";
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    margin-right: 10px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #39495c 0%,
            #111822 22%,
            #020408 55%
        );

    border: 2px solid var(--ps-blue);

    box-shadow:
        0 0 0 2px rgba(0, 125, 255, 0.15),
        0 0 14px rgba(0, 125, 255, 0.25);

    color: #050505;

    font-size: 13px;
    font-weight: 900;

    text-shadow:
        0 0 0 white;

    vertical-align: middle;

    /* white number circle */
    outline: 6px solid transparent;
}


/* Create the white 8-ball number impression */
header h1::before {
    color: white;
}


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

.card {
    background:
        linear-gradient(
            145deg,
            rgba(12, 28, 51, 0.90),
            rgba(5, 18, 38, 0.94)
        ) !important;

    backdrop-filter:
        blur(8px);

    border:
        1px solid var(--ps-border) !important;

    border-radius:
        var(--ps-radius) !important;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.20);
}

.card-head {
    background:
        rgba(4, 14, 31, 0.88) !important;

    border-bottom:
        1px solid var(--ps-border) !important;
}

.card-body {
    color: var(--ps-text);
}

.section {
    border-color:
        rgba(42, 70, 105, 0.8) !important;
}


/* ============================================================
   TEXT
   ============================================================ */

.muted,
.key-state,
.timer {
    color:
        var(--ps-muted) !important;
}

label {
    color:
        var(--ps-text) !important;
}

a {
    color:
        var(--ps-blue-bright);
}


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

input,
select,
textarea {
    background:
        #071221 !important;

    border:
        1px solid #365272 !important;

    color:
        var(--ps-white) !important;

    border-radius:
        8px !important;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;

    border-color:
        var(--ps-blue) !important;

    box-shadow:
        0 0 0 3px
        rgba(0, 125, 255, 0.16) !important;
}

input::placeholder {
    color:
        #647b98 !important;
}


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

button {
    background:
        linear-gradient(
            180deg,
            var(--ps-blue-bright),
            var(--ps-blue)
        ) !important;

    border:
        1px solid rgba(60, 175, 255, 0.45) !important;

    color:
        white !important;

    border-radius:
        8px !important;

    transition:
        filter 0.15s ease,
        transform 0.08s ease,
        box-shadow 0.15s ease;
}

button:hover {
    filter: brightness(1.10);

    box-shadow:
        0 4px 14px rgba(0, 125, 255, 0.20);
}

button:active {
    transform:
        translateY(1px);
}

button.secondary {
    background:
        linear-gradient(
            180deg,
            #405574,
            #30435d
        ) !important;

    border-color:
        #536d91 !important;
}

button.danger,
.remove-destination {
    background:
        linear-gradient(
            180deg,
            var(--ps-red-bright),
            var(--ps-red)
        ) !important;

    border-color:
        rgba(255, 100, 110, 0.45) !important;
}


/* ============================================================
   STATUS
   ============================================================ */

.online {
    background:
        var(--ps-green) !important;
}

.offline {
    background:
        var(--ps-red) !important;
}

.streaming,
.live {
    color:
        var(--ps-blue-bright) !important;
}

.success {
    color:
        #65e69a !important;
}

.error {
    color:
        #ff8992 !important;
}


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

.destination {
    background:
        linear-gradient(
            145deg,
            rgba(3, 18, 39, 0.98),
            rgba(8, 25, 48, 0.98)
        ) !important;

    border:
        1px solid #254d79 !important;

    border-radius:
        10px !important;

    position: relative;
    overflow: hidden;
}

.destination::before {
    content: "";
    position: absolute;

    top: 0;
    left: 0;
    bottom: 0;

    width: 4px;

    background:
        var(--ps-blue);
}


/* ============================================================
   PATRON SCORE PAGE
   ============================================================ */

.player:first-child {
    border-top:
        3px solid var(--ps-blue);
}

.player:last-child {
    border-top:
        3px solid var(--ps-red);
}

.score {
    color:
        var(--ps-white) !important;

    text-shadow:
        0 0 15px
        rgba(0, 125, 255, 0.10);
}


/* ============================================================
   SMALL POOLSTREAM ACCENT
   ============================================================ */

.ps-accent-line {
    height: 3px;

    background:
        linear-gradient(
            90deg,
            var(--ps-blue) 0%,
            var(--ps-blue) 50%,
            var(--ps-red) 50%,
            var(--ps-red) 100%
        );
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    header {
        padding:
            14px 16px !important;
    }

    main {
        padding:
            14px !important;
    }

    header h1 {
        font-size:
            21px !important;
    }

    header h1::before {
        width: 26px;
        height: 26px;
    }
}
