:root {
    color-scheme: dark;
    --bg: #171616;
    --card: #171616;
    --ink: #FFFFFF;
    --muted: #FFFFFF;
    --line: #3b3838;
    --primary: #b34a00;
    --primary-strong: #cc5500;
    --danger: #CC5500;
    --shadow: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

.background {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: -1;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.language-switcher {
    margin-left: auto;
}

.language-switcher select {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.85rem;
}

.brand {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.meta {
    font-size: 0.9rem;
    color: var(--muted);
}

.card {
    background: transparent;
    border-radius: 8px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card h1 {
    margin: 0;
    font-size: 1.8rem;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

textarea {
    width: 100%;
    min-height: 180px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    padding: 16px;
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
    resize: vertical;
}

textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

textarea + .actions {
    margin-top: 18px;
}

#result + .actions {
    margin-top: 18px;
}

button,
.ghost,
button.ghost {
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

button {
    background: var(--primary);
    color: #FFFFFF;
}

button:hover {
    filter: brightness(1.18);
}

button.danger {
    background: var(--danger);
}

button.danger:hover {
    filter: brightness(0.9);
}

.copy-button {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
}

.copy-button:hover {
    filter: brightness(1.18);
}

.ghost {
    color: var(--ink);
    border: 1px solid var(--line);
    background: transparent;
}

.ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hint {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

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

    .card {
        padding: 22px;
    }
}
