:root {
    color-scheme: dark;
    font-family: Arial, Helvetica, sans-serif;
    background: #101522;
    color: #f4f6fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(39, 87, 155, 0.4), transparent 45%),
        #101522;
}

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 16px;
}

.card {
    background: #1b2333;
    border: 1px solid #34415a;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

h1 {
    margin-top: 0;
    margin-bottom: 8px;
}

.intro {
    color: #bac5d8;
    margin-bottom: 28px;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 7px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #53627d;
    border-radius: 8px;
    background: #111827;
    color: #ffffff;
    font: inherit;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #5ca8ff;
    border-color: #5ca8ff;
}

.optional {
    color: #aab6c9;
    font-weight: normal;
}

.captcha-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #252f44;
}

.privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    line-height: 1.4;
}

.privacy input {
    width: auto;
    margin-top: 3px;
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: 0;
    border-radius: 8px;
    background: #3182ce;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #2563a8;
}

button:disabled {
    opacity: 0.6;
    cursor: wait;
}

#statusMessage {
    min-height: 24px;
    margin-bottom: 0;
    margin-top: 18px;
    font-weight: bold;
}

.status-success {
    color: #69db8a;
}

.status-error {
    color: #ff8585;
}

@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    .card {
        padding: 20px;
    }
}

.language-switch {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.language-button {
    width: auto;
    min-width: 48px;
    padding: 8px 12px;
    border: 1px solid #777;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.language-button:hover {
    background: rgba(128, 128, 128, 0.15);
}

.language-button.active {
    background: #2477d4;
    border-color: #2477d4;
    color: #ffffff;
    font-weight: bold;
}

.message-counter {
    margin-top: 6px;
    text-align: right;
    font-size: 0.85rem;
    color: #6b7280;
}

.message-counter.near-limit {
    color: #dc2626;
    font-weight: bold;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-row h1 {
    margin: 0;
}

.language-switch {
    display: flex;
    gap: 8px;
    margin: 0;
    flex-shrink: 0;
}

.language-button {
    width: auto;
    min-width: 48px;
    margin: 0;
    padding: 8px 12px;
}



.captcha-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 16px;
}

#captchaQuestion {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
}

#captchaAnswer {
    width: 100%;
    max-width: 180px;
    margin: 0;
    text-align: left;
}
@media (max-width: 480px) {
    .header-row {
        gap: 10px;
    }

    .header-row h1 {
        font-size: 1.6rem;
    }

    .captcha-row {
        gap: 10px;
    }

    #captchaAnswer {
        max-width: 140px;
    }
}