:root {
    color-scheme: dark;

    --background: #0b1015;
    --background-2: #111820;

    --card: #151d26;
    --card-hover: #19232d;

    --border: #26323e;

    --text: #f1f5f9;
    --muted: #91a0b1;

    --blue: #60a5fa;
    --blue-dark: #2563eb;

    --green: #4ade80;
    --red: #f87171;

    --shadow:
        0 15px 40px rgba(0, 0, 0, .25);
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    min-height: 100vh;
    margin: 0;

    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, .08),
            transparent 35%
        ),
        var(--background);

    color: var(--text);

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


/* HEADER */

.header {
    border-bottom: 1px solid rgba(255,255,255,.05);

    background:
        linear-gradient(
            180deg,
            rgba(21,29,38,.95),
            rgba(11,16,21,.8)
        );

    position: sticky;
    top: 0;
    z-index: 10;

    backdrop-filter: blur(14px);
}


.header-inner {
    max-width: 1200px;

    margin: auto;

    padding:
        22px
        24px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}


.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}


.brand-icon {
    width: 46px;
    height: 46px;

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

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #60a5fa
        );

    color: white;

    font-size: 25px;
    font-weight: 700;

    box-shadow:
        0 8px 25px rgba(37,99,235,.3);
}


h1 {
    margin: 0;

    font-size: 25px;
    line-height: 1.1;
}


.brand p {
    margin: 4px 0 0;

    color: var(--muted);

    font-size: 13px;
}


.counter {
    display: flex;
    align-items: center;
    gap: 8px;

    padding:
        8px
        13px;

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

    border-radius: 999px;

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

    color: var(--muted);

    font-size: 13px;
}


.counter strong {
    color: var(--text);
}


/* CONTENT */

.container {
    max-width: 1200px;

    margin: auto;

    padding:
        28px
        24px
        50px;
}


.grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                360px,
                1fr
            )
        );

    gap: 18px;
}


/* CARD */

.card {
    background:
        linear-gradient(
            145deg,
            rgba(25,35,45,.98),
            rgba(17,24,32,.98)
        );

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

    border-radius: 17px;

    padding: 20px;

    box-shadow: var(--shadow);

    transition:
        transform .15s ease,
        border-color .15s ease,
        background .15s ease;
}


.card:hover {
    transform: translateY(-2px);

    border-color: #354657;

    background:
        linear-gradient(
            145deg,
            rgba(28,39,50,.98),
            rgba(18,26,35,.98)
        );
}


.card.disabled {
    opacity: .55;
}


/* CARD HEADER */

.card-header {
    display: flex;

    justify-content: space-between;

    gap: 16px;
}


.title-area {
    display: flex;

    gap: 13px;

    min-width: 0;
}


.service-icon {
    flex: 0 0 auto;

    width: 44px;
    height: 44px;

    border-radius: 12px;

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

    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #3b82f6
        );

    color: white;

    font-weight: 700;
    font-size: 18px;

    box-shadow:
        0 6px 18px rgba(37,99,235,.25);
}


.title-text {
    min-width: 0;
}


h2 {
    margin: 1px 0 7px;

    font-size: 18px;

    line-height: 1.2;

    overflow-wrap: anywhere;
}


.domain {
    display: block;

    width: fit-content;
    max-width: 100%;

    color: var(--blue);

    text-decoration: none;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 13px;

    overflow-wrap: anywhere;
}


.domain:hover {
    text-decoration: underline;
}


.external {
    opacity: .7;

    margin-left: 3px;
}


/* STATUS */

.status {
    flex: 0 0 auto;

    color: var(--muted);

    font-size: 12px;

    display: flex;

    align-items: center;

    gap: 6px;
}


.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    display: inline-block;
}


.online {
    background: var(--green);

    box-shadow:
        0 0 9px
        rgba(74,222,128,.6);
}


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


/* DESTINATION */

.destination {
    margin-top: 20px;

    padding: 13px 15px;

    border-radius: 11px;

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

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


.destination-label {
    color: #64748b;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .12em;

    margin-bottom: 5px;
}


.destination-value {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
}


.scheme {
    color: #64748b;

    font-size: 12px;
}


code {
    color: #cbd5e1;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 13px;

    overflow-wrap: anywhere;
}


/* EDITOR */

.editor {
    margin-top: 15px;

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

    padding-top: 12px;
}


.editor summary {
    color: var(--muted);

    cursor: pointer;

    font-size: 12px;

    user-select: none;
}


.editor summary:hover {
    color: var(--text);
}


.editor form {
    display: flex;

    gap: 8px;

    margin-top: 11px;
}


.editor input {
    flex: 1;

    min-width: 0;

    padding:
        10px
        11px;

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

    border-radius: 9px;

    background: #0d1319;

    color: var(--text);

    outline: none;
}


.editor input:focus {
    border-color: #3b82f6;

    box-shadow:
        0 0 0 3px
        rgba(59,130,246,.12);
}


.editor button {
    border: 0;

    border-radius: 9px;

    padding:
        0
        15px;

    background:
        var(--blue-dark);

    color: white;

    font-weight: 600;

    cursor: pointer;
}


.editor button:hover {
    background: #3b82f6;
}


/* EMPTY */

.empty {
    padding: 80px 20px;

    text-align: center;

    color: var(--muted);
}


.empty-icon {
    font-size: 45px;

    color: #475569;
}


.empty h2 {
    color: var(--text);
}


/* FOOTER */

footer {
    max-width: 1200px;

    margin: auto;

    padding:
        0
        24px
        30px;

    display: flex;

    justify-content: space-between;

    gap: 15px;

    color: #536274;

    font-size: 11px;
}


/* MOBILE */

@media (max-width: 700px) {

    .header-inner {
        padding:
            17px
            16px;
    }


    .brand-icon {
        width: 40px;
        height: 40px;

        font-size: 21px;
    }


    h1 {
        font-size: 21px;
    }


    .counter {
        font-size: 11px;

        padding:
            7px
            10px;
    }


    .container {
        padding:
            18px
            14px
            35px;
    }


    .grid {
        grid-template-columns: 1fr;

        gap: 13px;
    }


    .card {
        padding: 17px;

        border-radius: 14px;
    }


    .card-header {
        display: block;
    }


    .status {
        margin-top: 12px;
    }


    .destination-value {
        display: block;
    }


    .scheme {
        display: inline-block;

        margin-bottom: 3px;
    }


    code {
        display: block;

        word-break: break-all;
    }


    .editor form {
        display: block;
    }


    .editor input {
        width: 100%;

        margin-bottom: 8px;
    }


    .editor button {
        width: 100%;

        height: 40px;
    }


    footer {
        padding:
            0
            16px
            25px;

        display: block;

        line-height: 1.8;
    }
}
