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

body {
    font-family: 'Inter', sans-serif;
    background: #0d1117;
    color: #e6edf3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h1 span {
    color: #58a6ff;
}

form {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Selettore linguaggio ────────────────────── */

.lang-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lang-selector input[type="radio"] {
    display: none;
}

.lang-btn {
    padding: 0.45rem 1.1rem;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #161b22;
    color: #8b949e;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.lang-btn:hover {
    border-color: #58a6ff;
    color: #e6edf3;
}

.lang-selector input[type="radio"]:checked + .lang-btn {
    background: #58a6ff;
    border-color: #58a6ff;
    color: #0d1117;
}

/* ── Textarea ────────────────────────────────── */

textarea {
    width: 100%;
    height: 350px;
    resize: vertical;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #161b22;
    color: #e6edf3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    outline: none;
    tab-size: 4;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

/* ── Bottoni azione ──────────────────────────── */

button, a.btn {
    align-self: flex-start;
    padding: 0.65rem 1.75rem;
    border: none;
    border-radius: 8px;
    background: #238636;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

button:hover, a.btn:hover {
    background: #2ea043;
}

/* ── Container output ────────────────────────── */

.container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-size: 0.85rem;
    color: #8b949e;
    font-weight: 500;
}

pre {
    width: 100%;
    min-height: 120px;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #161b22;
    color: #e6edf3;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}