
:root{

    color-scheme:dark;

    --bg:
        #0a0a0b;

    --bg-elevated:
        #111113;

    --panel:
        rgba(255,255,255,.045);

    --panel-hover:
        rgba(255,255,255,.065);

    --panel-active:
        rgba(255,255,255,.085);

    --border:
        rgba(255,255,255,.08);

    --border-strong:
        rgba(255,255,255,.12);

    --text:
        rgba(255,255,255,.96);

    --muted:
        rgba(255,255,255,.55);

    --accent:
        rgba(45,45,45,0.98);

    --success:
        #30d158;

    --warning:
        #ffd60a;

    --danger:
        #ff453a;

    --radius-xs:
        0px;

    --radius-sm:
        1px;

    --radius-md:
        2px;

    --radius-lg:
        2px;

    --blur:
        50px;

    --shadow:
        0 20px 100px rgba(5,5,0,.35);

    --transition:
        160ms ease;
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

html,
body{
    width:100%;
    min-height:100%;
}

body{
    background:
        radial-gradient(
            circle at top left,
            rgba(120,132,55,.08),
            transparent 25%
        ),
        radial-gradient(
            circle at top right,
            rgba(255,255,255,.03),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #111113,
            #0a0a0b
        );
    color:var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Segoe UI",
        sans-serif;
    font-size:14px;
    line-height:1.5;
    padding:32px;
}

.container{
    width:100%;
    max-width:1440px;
    margin:0 auto;
}

.card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    backdrop-filter:
        blur(var(--blur))
        saturate(180%);
    -webkit-backdrop-filter:
        blur(var(--blur))
        saturate(180%);
    box-shadow:var(--shadow);
}

.header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    margin-bottom:24px;
}

.title{
    font-size:32px;
    font-weight:700;
    letter-spacing:-0.03em;
}

.subtitle{
    margin-top:6px;
    color:var(--muted);
    font-size:14px;
}

.header-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
}

.flash{
    margin-bottom:20px;
}

.flash-item{
    background:
        rgba(255,255,255,.04);
    border:
        1px solid
        rgba(255,255,255,.08);
    border-radius:
        var(--radius-sm);
    padding:
        12px 14px;
}

.flash-item + .flash-item{
    margin-top:8px;
}

form{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

input,
textarea{
    width:100%;
    border:
        1px solid
        var(--border);
    background:
        rgba(255,255,255,.035);
    color:
        var(--text);
    outline:none;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

input:focus,
textarea:focus{
    border-color:
        rgba(10,132,255,.45);
    box-shadow:
        0 0 0 4px
        rgba(10,132,255,.15);
}

input{
    min-height:46px;
    padding:0 14px;
    border-radius:14px;
}

textarea{
    resize:vertical;
    min-height:200px;
    padding:16px;
    border-radius:16px;
    font-size:13px;
    line-height:1.65;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}

input::placeholder,
textarea::placeholder{
    color:var(--muted);
}

button,
.btn{
    border:none;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:0 18px;
    border-radius:14px;
    font-weight:600;
    transition:
        transform var(--transition),
        opacity var(--transition),
        background var(--transition);
}

button:hover,
.btn:hover{
    transform:
        translateY(-1px);
}

button:active,
.btn:active{
    transform:
        translateY(0);
}

button{
    background:var(--accent);
    color:#fff;
}

.btn{
    border-radius:2px!important;
    background:
        rgba(255,255,255,.06);
    color:var(--text);
}

.btn-secondary{
    background:
        rgba(255,255,255,.06);
    color:var(--text);
}

.btn-secondary:hover{
    background:
        rgba(255,255,255,.09);
}

.btn-danger{
    background:
        rgba(255,69,58,.16);
    color:
        #ff9d96;
}

.btn-danger:hover{
    background:
        rgba(255,69,58,.24);
}

a{
    color:var(--muted);
    text-decoration:none;
    transition:color var(--transition);
}

a:hover{
    color:var(--text);
}

.create{
    padding:22px;
    margin-bottom:20px;
}

.sites{
    padding:22px;
}

.sites-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
}

.count{
    color:var(--muted);
    font-size:13px;
}

.site-list{
    list-style:none;
    display:grid;
    gap:12px;
}

.site{
    display:grid;
    grid-template-columns:
        minmax(260px,1fr)
        120px
        120px
        auto;
    align-items:center;
    gap:16px;
    padding:16px;
    border-radius:18px;
    background:
        rgba(255,255,255,.03);
    border:
        1px solid
        rgba(255,255,255,.05);
    transition:
        background var(--transition),
        border-color var(--transition);
}

.site:hover{
    background:
        var(--panel-hover);
    border-color:
        var(--border-strong);
}

.site-name{
    font-weight:600;
    word-break:break-word;
}

.site-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}

.badge{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    min-height:28px;
    padding:0 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.badge-running{
    background:
        rgba(48,209,88,.14);
    color:
        #7ff5a3;
}

.badge-exited{
    background:
        rgba(255,69,58,.14);
    color:
        #ff9d96;
}

.badge-missing{
    background:
        rgba(255,214,10,.14);
    color:
        #ffe873;
}

.badge-ssl{
    background:
        rgba(10,132,255,.14);
    color:
        #73bbff;
}

.editor-layout{
    display:grid;
    grid-template-columns:
        minmax(700px,1fr)
        720px;
    gap:24px;
}

.editor-column,
.preview-column{
    display:flex;
    flex-direction:column;
}

.preview-column{
    min-height:100%;
}

.preview-header{
    margin-bottom:12px;
    color:var(--muted);
    font-size:13px;
}

.preview-frame{
    width:100%;
    min-height:1200px;
    border:none;
    border-radius:20px;
    background:#fff;
    overflow:hidden;
}

.section{
    margin-bottom:20px;
}

.section:last-child{
    margin-bottom:0;
}

label{
    display:block;
    margin-bottom:10px;
    color:var(--muted);
    font-size:13px;
    font-weight:500;
}

.actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:20px;
}

.validation{
    margin-bottom:20px;
    color:#ff9d96;
}

.save-status{
    color:var(--muted);
    font-size:13px;
}

.empty{
    text-align:center;
    color:var(--muted);
    padding:48px 24px;
}

.login-page{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:24px;
}

.login-card{
    width:100%;
    max-width:440px;
    padding:28px;
}

.login-form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

pre{
    overflow:auto;
    padding:20px;
    font-size:13px;
    line-height:1.7;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}

@media (max-width:1400px){

    .editor-layout{
        grid-template-columns:1fr;
    }

    .preview-frame{
        min-height:800px;
    }
}

@media (max-width:900px){

    body{
        padding:20px;
    }

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

    .header{
        flex-direction:column;
    }

    .header-actions{
        width:100%;
    }

    form{
        flex-direction:column;
    }

    button,
    .btn{
        width:100%;
    }
}
