/* SecretWord Party - "Bright Purple Party" Web Client Styles */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,700&display=swap');

/* === Design Tokens === */
:root {
    /* Palette - Bright Purple Party Theme (updated Feb 2026) */
    --bg-deep: #0a0a14;
    --bg-surface: #12121e;
    --bg-card: #1a1a2e;
    --bg-elevated: #242440;

    --accent: #b899e0;          /* Primary (Bright Purple) */
    --accent-secondary: #9b72cf; /* Secondary (Contrast) */
    --accent-dim: #7b52b4;
    --accent-glow: rgba(184, 153, 224, 0.25);
    --accent-deep: #5a3d8a;

    --impostor-red: #c0392b;
    --impostor-bright: #e74c3c;
    --impostor-glow: rgba(231, 76, 60, 0.35);

    --innocent-blue: #2e86ab;
    --innocent-bright: #48b5e0;
    --innocent-glow: rgba(72, 181, 224, 0.3);

    --text-primary: #e8e4f0;
    --text-secondary: #9490a6;
    --text-muted: #5e5874;
    --text-bright: #f5f2fa;

    --success: #27ae60;
    --warning: #e67e22;
    --danger: #e74c3c;
    --info: #48b5e0;

    --border-subtle: rgba(184, 153, 224, 0.12);
    --border-medium: rgba(184, 153, 224, 0.25);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Atmospheric vignette */
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(155, 114, 207, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(13, 13, 18, 0.9) 0%, transparent 70%);
    background-color: var(--bg-deep);
}

/* Subtle noise overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
    pointer-events: none;
    z-index: 0;
}

/* === Container === */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--bg-surface);
    padding: 24px 20px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.3);
}

/* === Typography === */
h1, .title {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.02em;
    word-break: keep-all;
}

.title-small {
    font-family: var(--font-display);
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
}

h2 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
    text-align: center;
}

h3 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* === Header & Footer === */
header {
    margin-bottom: 24px;
}

footer {
    margin-top: 24px;
    text-align: center;
}

.legal-links {
    margin-top: 12px;
    font-size: 0.85em;
    opacity: 0.7;
}

.legal-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-link:hover {
    color: var(--gold);
    text-decoration: underline;
}

.legal-separator {
    margin: 0 8px;
    color: var(--text-secondary);
}

.room-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* === Role Indicator === */
.role-indicator {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-medium);
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.role-indicator.impostor {
    background: rgba(231, 76, 60, 0.15);
    border-color: var(--impostor-bright);
    color: var(--impostor-bright);
}

.role-indicator.innocent {
    background: rgba(72, 181, 224, 0.15);
    border-color: var(--innocent-bright);
    color: var(--innocent-bright);
}

.role-indicator .role-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.role-indicator .secret-word {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-top: 4px;
}

/* === Form Elements === */
.join-form, .card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

input, button {
    width: 100%;
    padding: 14px 18px;
    margin: 8px 0;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: var(--font-body);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1.5px solid var(--border-subtle);
    font-weight: 500;
}

input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* === Buttons === */
button, .btn-primary, .btn-secondary {
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    color: var(--bg-deep);
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

button:hover::after {
    transform: translateX(100%);
}

button:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-bright));
    transform: translateY(-1px);
    box-shadow:
        0 4px 16px rgba(155, 114, 207, 0.3),
        0 0 0 1px rgba(155, 114, 207, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(155, 114, 207, 0.2);
}

button:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

button:disabled::after {
    display: none;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
    text-transform: none;
    letter-spacing: normal;
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

/* === Game Views === */
.game-view {
    animation: fadeIn 0.4s ease;
}

/* === Role Cards === */
.role-card {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 16px 0;
    font-size: 1rem;
    font-weight: 600;
    animation: roleReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    word-wrap: break-word;
    position: relative;
    overflow: hidden;
}

.role-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20l10-10M20 20L10 30M20 20l10 10M20 20L10 10' stroke='%23fff' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
    background-size: 40px;
    pointer-events: none;
}

.role-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.role-title.impostor {
    color: var(--impostor-bright);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.role-title.innocent {
    color: var(--innocent-bright);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.role-card.impostor {
    background: linear-gradient(160deg, #2a0a10 0%, #5a1520 40%, #3a0e14 100%);
    border: 2px solid var(--impostor-bright);
    box-shadow:
        0 0 30px var(--impostor-glow),
        0 0 60px rgba(231, 76, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: roleReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1), impostorPulse 3s ease-in-out infinite;
}

.role-card.innocent {
    background: linear-gradient(160deg, #08202e 0%, #164058 40%, #0c2a3c 100%);
    border: 2px solid var(--innocent-bright);
    box-shadow:
        0 0 30px var(--innocent-glow),
        0 0 60px rgba(72, 181, 224, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.role-description {
    margin: 16px 0;
}

.starting-player-info {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(184, 153, 224, 0.15);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    text-align: center;
}

.starting-player-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.starting-player-info strong {
    color: var(--accent);
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-primary);
}

.role-warning, .role-hint {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

/* === Impostors List === */
.impostors-list {
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.impostors-list h3 {
    color: var(--impostor-bright);
    margin-bottom: 12px;
    font-size: 1rem;
}

.impostors-list ul {
    list-style: none;
}

.impostors-list li {
    padding: 8px;
    margin: 4px 0;
    background: rgba(231, 76, 60, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--impostor-bright);
}

/* === Secret Word === */
.secret-word {
    margin: 20px 0;
    padding: 18px;
    background: linear-gradient(135deg, #0d2f3f 0%, #1a4a5a 100%);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--innocent-bright);
    box-shadow: 0 4px 16px rgba(72, 181, 224, 0.15);
}

.secret-word h3 {
    margin-bottom: 10px;
    color: var(--innocent-bright);
    font-family: var(--font-display);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.secret-word .word {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    font-family: var(--font-display);
    background: rgba(255, 255, 255, 0.07);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(72, 181, 224, 0.2);
    letter-spacing: 0.05em;
}

/* === Discussion & Voting === */
.phase-description {
    text-align: center;
    margin: 16px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.starting-player {
    margin: 16px 0;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-bright);
}

.players-count {
    text-align: center;
    margin: 16px 0;
    color: var(--text-secondary);
}

/* === Voting UI === */
.voting-ui {
    margin: 20px 0;
}

.voting-instructions {
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.votes-counter {
    text-align: center;
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    font-weight: 600;
    color: var(--accent-bright);
}

.voting-players {
    margin: 16px 0;
}

.vote-button {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    margin: 8px 0;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: none;
    letter-spacing: 0;
    position: relative;
}

.vote-button::after {
    display: none;
}

.vote-button:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.vote-button.selected {
    background: linear-gradient(135deg, #1a3a2a, #1a4a34);
    border-color: var(--success);
    color: #a8e6c1;
    box-shadow: 0 0 16px rgba(39, 174, 96, 0.2);
}

.vote-checkbox {
    font-size: 1.2rem;
    margin-right: 12px;
}

.voted-message, .eliminated-message {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin: 16px 0;
    font-weight: 600;
}

/* === Results === */
.results-content {
    margin: 20px 0;
}

.elimination-result {
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.eliminated-name {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-bright);
    margin: 16px 0;
}

.eliminated-role {
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
}

.eliminated-role .impostor {
    color: var(--impostor-bright);
}

.eliminated-role .innocent {
    color: var(--innocent-bright);
}

.vote-count {
    margin-top: 12px;
    color: var(--text-secondary);
}

/* === Game Over === */
.game-over-content {
    text-align: center;
    padding: 24px;
}

.winner-announcement {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    margin: 24px 0;
    padding: 20px;
    border-radius: var(--radius-lg);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.winner-announcement.impostors {
    background: linear-gradient(135deg, #4a1520, #2a0a10);
    border: 2px solid var(--impostor-bright);
    color: var(--impostor-bright);
    box-shadow: 0 0 40px var(--impostor-glow);
}

.winner-announcement.innocents {
    background: linear-gradient(135deg, #164058, #0c2a3c);
    border: 2px solid var(--innocent-bright);
    color: var(--innocent-bright);
    box-shadow: 0 0 40px var(--innocent-glow);
}

.game-over-message {
    margin: 20px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* === Players List === */
.players-list, .players-grid {
    list-style: none;
    margin: 16px 0;
}

.players-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-dim);
    transition: background 0.2s ease;
}

.player-item:hover {
    background: var(--bg-elevated);
}

.player-item.me {
    border-left-color: var(--accent-bright);
    background: rgba(155, 114, 207, 0.08);
}

.player-item.eliminated {
    opacity: 0.5;
    text-decoration: line-through;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-badge {
    font-size: 0.8rem;
    color: var(--accent-bright);
    margin-left: 8px;
}

.player-state {
    color: var(--danger);
    font-weight: 700;
}

/* === Error Messages === */
.error-message {
    background: rgba(231, 76, 60, 0.15);
    border: 1.5px solid rgba(231, 76, 60, 0.3);
    padding: 14px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    text-align: center;
    color: #e0a850;
    font-weight: 600;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes roleReveal {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(16px);
        filter: blur(8px);
    }
    60% {
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes impostorPulse {
    0%, 100% {
        box-shadow:
            0 0 30px var(--impostor-glow),
            0 0 60px rgba(231, 76, 60, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    50% {
        box-shadow:
            0 0 40px var(--impostor-glow),
            0 0 80px rgba(231, 76, 60, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

/* === Responsive: Mobile === */
@media (max-width: 480px) {
    body {
        padding: 6px;
    }

    .container {
        padding: 18px 16px;
        border-radius: var(--radius-lg);
    }

    h1, .title {
        font-size: 1.5rem;
        margin-bottom: 18px;
    }

    input, button {
        font-size: 16px;
        padding: 12px 16px;
    }

    .role-card {
        padding: 18px 16px;
        font-size: 0.95rem;
        margin: 12px 0;
    }
}

/* === Responsive: Desktop === */
@media (min-width: 769px) {
    body {
        padding: 24px;
    }

    .container {
        max-width: 480px;
        padding: 32px 28px;
    }

    h1, .title {
        font-size: 2.1rem;
        margin-bottom: 28px;
    }

    input, button {
        padding: 16px 20px;
        margin: 10px 0;
    }

    .role-card {
        padding: 28px 24px;
        font-size: 1.1rem;
        margin: 20px 0;
    }
}

/* === Touch Optimizations === */
@media (pointer: coarse) {
    button, .vote-button {
        min-height: 50px;
        padding: 14px 18px;
    }

    input {
        min-height: 50px;
    }
}

/* === Results View === */
.eliminated-card {
    background: var(--bg-card);
    border: 2px solid var(--impostor);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 12px 0;
    text-align: center;
}

.eliminated-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 8px 0;
}

.eliminated-role {
    font-size: 18px;
    margin: 12px 0;
}

.eliminated-role strong {
    font-size: 20px;
}

.eliminated-role .impostor {
    color: var(--impostor);
}

.eliminated-role .innocent {
    color: var(--innocent);
}

.vote-count {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 8px 0;
}

.vote-count strong {
    color: var(--accent-bright);
    font-size: 20px;
}

.game-status {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.game-status h3 {
    text-align: center;
    color: var(--accent-bright);
    margin-bottom: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

.status-col {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
}

.status-col h4 {
    font-size: 16px;
    margin-bottom: 12px;
    text-align: center;
    color: var(--text-bright);
}

.status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-list li {
    padding: 8px 12px;
    margin: 4px 0;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.status-list.dead li {
    opacity: 0.6;
    text-decoration: line-through;
}

/* === Join Screen === */
.join-container {
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.join-header {
    text-align: center;
    margin-bottom: 32px;
}

.title-large {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-bright);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 20px var(--accent-glow);
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.join-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.join-card {
    background: var(--bg-card);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.join-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.join-footer a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.join-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.join-footer span {
    margin: 0 8px;
    color: var(--text-muted);
}

/* Language Toggle */
.language-toggle {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.lang-btn {
    width: auto !important;
    padding: 8px 20px !important;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-subtle);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.lang-btn::after {
    display: none;
}

.lang-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: none;
    box-shadow: none;
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    color: var(--bg-deep);
    border-color: var(--accent);
}

/* Error Message */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    color: var(--text-bright);
    font-size: 0.9rem;
    text-align: center;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
