:root {
    --fb-blue: #1877f2;
    --fb-blue-dark: #166fe5;
    --bg: #f0f2f5;
    --card: #ffffff;
    --text: #1c1e21;
    --muted: #65676b;
    --border: #dfe1e6;
    --success-bg: #e7f3ff;
    --success-text: #0d3b8e;
    --error-bg: #fdecec;
    --error-text: #a02828;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 76px 16px 28px;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.site-logo-link {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    z-index: 1200;
    text-decoration: none;
}

.site-logo-link img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.box {
    width: min(980px, 100%);
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    padding: 20px;
    text-align: center;
}

.language-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.language-toggle__label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.language-toggle__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.language-toggle__link.active {
    background: var(--fb-blue);
    border-color: var(--fb-blue);
    color: #fff;
}

.box h1,
.box h2,
.box h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-weight: 700;
}

.box h1,
.box h2 {
    font-size: 28px;
}

.box h3 {
    font-size: 21px;
}

nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 18px !important;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
}

nav a:hover {
    background: #edf2ff;
}

.box form {
    margin: 14px 0;
}

.box label {
    color: var(--muted);
    font-size: 14px;
}

.box input[type="email"],
.box input[type="password"],
.box input[type="text"],
.box textarea {
    width: 90%;
    margin: 6px 0 10px;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.box input:focus,
.box textarea:focus {
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.box button {
    border: 0;
    border-radius: 8px;
    background: var(--fb-blue);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 16px;
    cursor: pointer;
}

.box button:hover {
    background: var(--fb-blue-dark);
}

.box a {
    color: var(--fb-blue);
    text-decoration: none;
}

.box a:hover {
    text-decoration: underline;
}

.success,
.error {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-weight: 600;
}

.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #cfe3ff;
}

.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #f6caca;
}

.vote-block {
    margin-bottom: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: left;
}

.vote-block strong {
    font-size: 18px;
}

.vote-results {
    margin-top: 10px;
}

.bar-fill.selected {
    box-shadow: 0 0 0 2px #31a24c;
    border-radius: 8px;
    background: linear-gradient(90deg, #d6f2dc 60%, #79db8f 100%);
    color: #165f28;
}

@media (max-width: 640px) {
    body {
        padding: 64px 10px 16px;
    }

    .site-logo-link {
        top: 10px;
        left: 10px;
        width: 60px;
        height: 60px;
    }

    .site-logo-link img {
        width: 60px;
        height: 60px;
    }

    .box {
        padding: 14px;
    }

    .box h1,
    .box h2 {
        font-size: 24px;
    }
}