:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #000;
    color: #fff;
}

.shell {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
    text-decoration: none;
}

.logo {
    width: 160px;
    height: auto;
}

.brand small {
    display: block;
    color: #bbb;
    margin-top: 0.25rem;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher a {
    color: #fff;
    text-decoration: none;
    border: 1px solid #333;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}

.language-switcher a.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.card {
    background: #111;
    border: 1px solid #292929;
    border-radius: 18px;
    padding: 2rem;
}

.panel,
.notice {
    background: #181818;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.danger-box {
    background: #260709;
    border: 1px solid #ff3b30;
    border-radius: 14px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

h1,
h2 {
    margin-top: 0;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h2 {
    font-size: 1.25rem;
}

p {
    line-height: 1.55;
}

.muted,
.status {
    color: #bbb;
}

label {
    display: block;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-top: 0.75rem;
}

textarea,
input,
select {
    width: 100%;
    font: inherit;
    color: #fff;
    background: #000;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input[type="checkbox"] {
    width: auto;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: #fff;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
}

button.secondary,
.button.secondary {
    color: #fff;
    background: #000;
    border-color: #444;
}

button.danger,
.button.danger {
    color: #fff;
    background: #d92d20;
    border-color: #d92d20;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.stats div {
    background: #000;
    border: 1px solid #333;
    border-radius: 14px;
    padding: 1rem;
}

.stats span {
    color: #bbb;
}

.stats strong {
    display: block;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.secret {
    white-space: pre-wrap;
    word-break: break-word;
    background: #000;
    color: #fff;
    border: 1px solid #444;
    border-radius: 14px;
    padding: 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hidden {
    display: none;
}

@media (max-width: 680px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        width: 135px;
    }

    .card {
        padding: 1.25rem;
    }
}
