/* ── Minimal Theme ───────────────────────────────────────────────────────── */
:root {
    --accent-color: #18181b;
    --accent-gradient-start: #18181b;
    --accent-gradient-end: #3f3f46;
    --accent-soft: #71717a;
    --accent-shadow: rgba(0,0,0,.12);
    --accent-muted: rgba(0,0,0,.35);
    --text-muted: rgba(0,0,0,.32);
}

* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; }

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

body {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fafafa;
    color: #18181b;
}

@keyframes fadeInOpacity { from { opacity: 0; } to { opacity: 1; } }

form {
    display: flex;
    width: 90%;
    max-width: 480px;
    border-radius: 0;
    border: none;
    border-bottom: 1.5px solid #e4e4e7;
    background: transparent;
    padding: 8px 8px 8px 0;
    position: relative;
    transition: border-color .25s;
}

form:focus-within { border-bottom-color: #18181b; }

input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 19px;
    padding: 10px 0;
    padding-right: 52px;
    background: transparent;
    color: #18181b;
    font-weight: 300;
    letter-spacing: .01em;
}

form.active input[type="text"] { padding-left: 40px; }
input::placeholder { color: #d4d4d8; }
form:focus-within input::placeholder { opacity: 0 !important; transition: opacity .25s; }

button {
    border: none;
    background: transparent;
    color: #a1a1aa;
    padding: 10px 6px;
    font-size: 18px;
    cursor: pointer;
    transition: color .2s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    line-height: 1;
}

button:hover { color: #18181b; }

form div.nav {
    width: 100%;
    text-align: center;
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translate(-50%, 0);
    transition: opacity .25s;
    pointer-events: none;
}

form:focus-within div.nav { opacity: 0; pointer-events: none; }

form div a {
    color: #c4c4c7;
    text-decoration: none;
    font-size: 11px;
    opacity: 1;
    margin: 0 5px;
    pointer-events: all;
    transition: color .2s;
}

form div a:hover { color: #18181b; }

form #searchengineicon { opacity: 0; transition: opacity .25s; }

form.active #searchengineicon {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    width: 32px;
    opacity: 1;
    background: transparent;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
}

form.active #searchengineicon #engic {
    width: 100%; height: 100%;
    position: absolute; top: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(1) opacity(.7);
}

form:focus-within.active #searchengineicon #engic { filter: grayscale(1) opacity(1); }

header {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(0,0,0,.22);
    padding: 5px;
    opacity: 0;
    animation: fadeInOpacity .6s ease .2s forwards;
}

footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(0,0,0,.2);
    padding: 5px;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInOpacity .6s ease .2s forwards;
}

div.dockmode {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #a1a1aa;
    font-size: 12px;
    display: none;
    cursor: pointer;
}

div.dockmode .tooltip {
    visibility: hidden;
    width: 160px;
    background: #fff;
    border: 1px solid #e4e4e7;
    color: #52525b;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    top: calc(100% + 6px);
    right: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    opacity: 0;
    transition: opacity .2s;
    font-size: 11px;
}

div.dockmode:hover .tooltip { visibility: visible; opacity: 1; }

.status-dot-area { position: fixed; bottom: 20px; right: 20px; }
.status-dot { color: rgba(0,0,0,.2) !important; text-decoration: none !important; font-size: 12px; display: flex; align-items: center; gap: 5px; }
.status-dot:hover { color: rgba(0,0,0,.45) !important; }
.status-dot-icon { width: 7px; height: 7px; border-radius: 50%; background: #d4d4d8; display: inline-block; }
.status-dot-icon.up   { background: #22c55e; box-shadow: 0 0 4px #22c55e; }
.status-dot-icon.down { background: #ef4444; box-shadow: 0 0 4px #ef4444; }
.status-dot-icon.maintenance { background: #f59e0b; box-shadow: 0 0 4px #f59e0b; }

/* ── Dark mode ────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --accent-color: #e4e4e7;
        --accent-muted: rgba(228,228,231,.35);
        --text-muted: rgba(228,228,231,.32);
    }
    body { background: #09090b; color: #e4e4e7; }
    form { border-bottom-color: #27272a; }
    form:focus-within { border-bottom-color: #e4e4e7; }
    input[type="text"] { color: #e4e4e7; }
    input::placeholder { color: #3f3f46; }
    button { color: #52525b; }
    button:hover { color: #e4e4e7; }
    form div a { color: #3f3f46; }
    form div a:hover { color: #a1a1aa; }
    form.active #searchengineicon #engic { filter: grayscale(1) invert(1) opacity(.5); }
    form:focus-within.active #searchengineicon #engic { filter: grayscale(1) invert(1) opacity(.85); }
    header { color: rgba(255,255,255,.15); }
    footer { color: rgba(255,255,255,.13); }
    div.dockmode { color: #71717a; }
    div.dockmode .tooltip { background: #18181b; border-color: #27272a; color: #a1a1aa; }
    .status-dot { color: rgba(255,255,255,.18) !important; }
    .status-dot:hover { color: rgba(255,255,255,.4) !important; }
    .status-dot-icon { background: #27272a; }
}
