﻿/* ============================================
   THE ALIBI - Main Stylesheet
   Theme: Noir/Detective
   ============================================ */

:root {
    /* Modern Palette - Deep Space Theme */
    --bg-dark: #0f172a;
    /* Slate 900 - Fondo elegante */
    --bg-medium: #1e293b;
    /* Slate 800 */
    --bg-card: rgba(30, 41, 59, 0.9);
    /* Transparencia moderna reducida para legibilidad */
    --bg-light: #334155;
    /* Slate 700 */

    /* Brand Colors - Vibrant */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-dark: #4f46e5;
    /* Indigo 600 */
    --secondary: #64748b;
    /* Slate 500 */
    --accent: #f43f5e;
    /* Rose 500 */

    /* Typography */
    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Semantic */
    --success: #10b981;
    /* Emerald 500 */
    --warning: #f59e0b;
    /* Amber 500 */
    --danger: #ef4444;
    /* Red 500 */

    /* UI */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);

    --radius: 12px;
    --radius-lg: 24px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', sans-serif;
}

/* Light theme overrides */
[data-theme="light"] {
    --bg-dark: #f8f9fa;
    --bg-medium: #e9ecef;
    --bg-light: #dee2e6;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;
}

/* ============ BASE STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
    background-attachment: fixed;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ TYPOGRAPHY ============ */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
    padding-top: 40px;
    /* Espacio para las banderas */
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.1rem;
}

.game-title {
    font-size: 3rem;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.1rem;
}

/* ============ SCREENS ============ */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    flex: 1;
    animation: fadeIn 0.3s ease;
}

.setup-screen,
.round-results,
.final-results {
    justify-content: flex-start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ HOME SCREEN ============ */
.home-screen .hero {
    text-align: center;
    margin: 60px 0 40px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 300px;
}

/* ============ BUTTONS ============ */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    background: var(--secondary);
}

.btn-warning {
    background: var(--warning);
    color: var(--bg-dark);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.2rem;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

.button-row {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    width: 100%;
    justify-content: center;
}

/* ============ SETUP SCREEN ============ */
.config-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 16px 0;
    width: 100%;
    box-shadow: var(--shadow);
}

.config-section h3 {
    margin-bottom: 16px;
    color: var(--primary);
    padding-right: 60px;
    /* Evitar choque con banderas en secciones altas */
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-medium);
    border-radius: var(--radius);
    cursor: move;
    transition: all 0.2s;
    gap: 12px;
}

.player-item:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.player-item.dragging {
    opacity: 0.5;
}

.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.2rem;
    user-select: none;
    padding: 0 4px;
}

.drag-handle:active {
    cursor: grabbing;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-picker:hover {
    transform: scale(1.1);
}

.player-color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.player-name {
    flex: 1;
    font-size: 1.1rem;
}

.add-player-form {
    display: flex;
    gap: 8px;
}

.add-player-form input {
    flex: 1;
}

input[type="text"] {
    flex: 1;
    min-width: 0;
    /* Permitir encogerse */
    padding: 12px 16px;
    border: 1px solid var(--text-muted);
    border-radius: var(--radius);
    background: var(--bg-medium);
    color: var(--text-primary);
    font-size: 1rem;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ============ NARRATION ============ */
.narration-screen {
    padding-top: 10px;
}

.narration-screen .timer-display.large {
    margin: 15px 0;
}

.words-grid-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
    width: 100%;
}

.word-btn {
    background: var(--bg-medium);
    border: 2px solid var(--bg-light);
    border-radius: var(--radius);
    padding: 12px 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.word-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.word-btn .points-tag {
    font-size: 0.75rem;
    opacity: 0.8;
}

.word-btn.selected .points-tag {
    opacity: 1;
}

.btn-warning {
    background: var(--warning);
    color: var(--bg-dark);
}

.btn-confirm-phase4 {
    margin-top: 40px !important;
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.btn-stepper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-stepper:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.stepper-value {
    font-size: 2rem;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 8px;
}

/* ============ ROLE REVEAL ============ */
.pass-phone-prompt {
    text-align: center;
    margin: 40px 0;
}

.pass-phone-prompt p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.pass-phone-prompt h3 {
    font-size: 2rem;
}

.role-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    width: 100%;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

.role-card.hidden {
    display: none;
}

.role-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
    line-height: 1;
    margin-top: 10px;
}

.role-card h3 {
    margin-bottom: 24px;
    font-size: 1.8rem;
}

.role-card .btn {
    margin-top: 50px;
}

.secret-words {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-medium);
    border-radius: var(--radius);
    text-align: left;
}

.secret-words h4 {
    color: var(--primary);
    margin-bottom: 12px;
}

.secret-words ul {
    list-style: none;
}

.secret-words li {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-light);
}

.secret-words li:last-child {
    border-bottom: none;
}

.infiltrator-words {
    background: rgba(155, 89, 182, 0.2);
    border: 1px solid #9b59b6;
}

.situation-card {
    margin-top: 16px;
    padding: 16px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    text-align: left;
}

.situation-card h4 {
    color: var(--accent);
    margin-bottom: 8px;
}

.ability-info {
    margin-top: 16px;
    padding: 16px;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid #3498db;
    border-radius: var(--radius);
}

/* ============ TIMER ============ */
.timer-display {
    text-align: center;
    margin: 24px 0;
}

.timer-display.large {
    margin: 40px 0;
}

.timer-text {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}

.timer-text.warning {
    color: var(--warning);
    text-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.timer-text.danger {
    color: var(--danger);
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
    animation: pulse 0.5s infinite;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: -10px;
    margin-bottom: 20px;
}


@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.hint.warning {
    color: var(--warning);
    font-weight: bold;
    background: rgba(241, 196, 15, 0.1);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    display: inline-block;
    width: fit-content;
}

.icon-large {
    font-size: 3rem;
    margin-bottom: 10px;
    margin-top: 0;
}

/* ============ NARRATION ============ */
.narrator-info {
    margin: 20px 0;
}

.role-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.role-badge.suspect {
    background: rgba(231, 76, 60, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.situation-reminder {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.narration-hint {
    color: var(--text-secondary);
    font-style: italic;
    margin: 30px 0;
}

/* ============ SUSPECT ANNOUNCEMENT ============ */
.suspect-announcement-screen {
    text-align: center;
}

.suspect-announcement {
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.suspect-announcement h3 {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.suspect-card {
    padding: 40px;
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.suspect-card h1 {
    font-size: 3rem;
    color: var(--accent);
    margin: 10px 0;
}

/* ============ INVESTIGATION ============ */
.ability-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    width: 100%;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.ability-card h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.ability-interface {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    margin: 20px 0;
}

.ability-interface input {
    width: 100%;
    margin: 16px 0;
}

.ability-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.ability-result.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid var(--success);
}

.ability-result.failure {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid var(--danger);
}

.category-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-top: 8px;
}

.infiltrator-fake {
    background: rgba(155, 89, 182, 0.1);
    border: 1px dashed #9b59b6;
}

.secret-hint {
    color: #9b59b6;
    font-style: italic;
}

/* ============ VOTING ============ */
.voting-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 20px 0;
}

.vote-input {
    width: 100%;
}

/* ============ RESULTS ============ */
.results-screen {
    text-align: center;
}

.secret-words-reveal {
    margin: 24px 0;
}

.word-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.word-chip {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: 20px;
    font-weight: 500;
}

.word-chip.revealed {
    background: var(--primary);
    color: var(--bg-dark);
}

.scores-list {
    width: 100%;
    margin: 24px 0;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 8px 0;
}

.points.positive {
    color: var(--success);
}

.points.negative {
    color: var(--danger);
}

.winners {
    margin: 30px 0;
}

.winner-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 16px 0;
    box-shadow: var(--shadow-glow);
}

.winner-emoji {
    font-size: 3rem;
}

.leaderboard {
    width: 100%;
    margin: 24px 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin: 8px 0;
}

.leaderboard-item.winner {
    background: rgba(201, 162, 39, 0.2);
    border: 1px solid var(--primary);
}

.leaderboard-item .rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary);
    min-width: 30px;
}

.leaderboard-item .name {
    flex: 1;
    text-align: left;
}

.leaderboard-item .points {
    font-weight: bold;
}

/* ============ LANGUAGE SELECTOR ============ */
.language-selector-improved {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.lang-flag-btn {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-flag-btn:hover {
    border-color: var(--primary);
}

.lang-flag-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.flag-icon {
    width: 28px;
    height: 20px;
    display: block;
    border-radius: 4px;
}

/* ============ SETTINGS BUTTON ============ */
.settings-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    background: var(--bg-card);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: var(--bg-light);
}

.settings-btn.hidden {
    display: none;
}

/* ============ UTILITIES ============ */
.hidden {
    display: none !important;
}

.round-info {
    text-align: center;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* ============ WORD CHECKBOXES ============ */
.words-checklist {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px 0;
}

.word-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-light);
    cursor: pointer;
}

.word-checkbox:last-child {
    border-bottom: none;
}

.word-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: var(--primary);
}

.word-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.word-text {
    flex: 1;
    font-size: 1.1rem;
}

/* ============ VOTING SCREEN ============ */
.vote-input-wrapper {
    margin: 12px 0;
}

.vote-input-wrapper label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.vote-input {
    width: 100%;
}

.locked-icon {
    margin-left: 8px;
    color: var(--warning);
}

/* ============ SCORE DETAILS ============ */
.score-item {
    margin: 12px 0;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.score-item.criminal {
    border-left: 4px solid var(--accent);
}

.score-item.police {
    border-left: 4px solid var(--primary);
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.score-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.detail.positive {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success);
}

.detail.negative {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
}

.score-edit-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-small {
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ============ WORD CHIPS STATES ============ */
.word-chip.used {
    background: var(--warning);
    color: var(--bg-dark);
}

.word-chip.detected {
    background: var(--danger);
    color: white;
}

.word-chip.unused {
    opacity: 0.5;
}

/* ============ MODALS ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-medium);
    color: var(--text-primary);
}

.rules-content,
.tips-content {
    margin-top: 20px;
}

.tips-content h3 {
    color: var(--primary);
    margin-top: 16px;
    margin-bottom: 8px;
}

.rules-modal {
    max-width: 600px;
}

.rule-section {
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-medium);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.rule-section h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.rule-section p {
    line-height: 1.6;
}

/* ============ CLUE DISPLAY ============ */
.clue-display {
    background: rgba(201, 162, 39, 0.1);
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}



/* ============ SCORE EDITOR MODAL ============ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.score-editor-modal {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--bg-light);
}

.score-editor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.score-edit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    border-radius: var(--radius);
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.role-badge.small {
    font-size: 0.8rem;
    padding: 2px 8px;
    width: fit-content;
}

.score-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-dark);
    padding: 4px;
    border-radius: 20px;
}

.btn-control {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.btn-control:active {
    transform: scale(0.9);
}

.btn-control.minus {
    background: var(--danger);
}

.btn-control.plus {
    background: var(--success);
}

.score-value {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.btn-full {
    width: 100%;
}

/* ============ NEW VOTING UI ============ */
.slots-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    margin: 20px 0;
    width: 100%;
    max-width: 400px;
}

.vote-slot {
    width: 100%;
    min-height: 44px;
    background: var(--bg-card);
    border: 2px dashed var(--text-muted);
    border-radius: var(--radius);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 12px;
    position: relative;
    transition: all 0.3s;
    gap: 12px;
}

.vote-slot.filled {
    background: var(--primary);
    border: 2px solid var(--primary);
    color: var(--bg-dark);
}

.vote-slot.filled.locked {
    background: var(--warning);
    border-color: var(--warning);
}

.slot-number {
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.6;
    width: 20px;
}

.slot-word {
    flex: 1;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: left;
}

.slot-placeholder {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: left;
    font-style: italic;
}

.input-controls {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-shake {
    animation: shake 0.5s;
    border-color: var(--danger) !important;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    50% {
        transform: translateX(10px);
    }

    75% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

.pulse-animation {
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.error-message {
    color: var(--danger);
    font-weight: bold;
    background: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--danger);
}

/* ============ COMPACT ROLE CARD UI ============ */
.words-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.word-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    word-break: break-word;
}

.accomplice-words.compact {
    padding: 12px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.accomplice-words.compact h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.forensic-clue {
    margin-top: 10px !important;
    padding: 12px !important;
}

.forensic-clue h4 {
    color: var(--accent);
    margin-bottom: 5px;
}

/* ============ PASS SCREEN UI ============ */
.pass-flow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.emoji-icon {
    font-size: 3.5rem;
}

.arrow-icon {
    font-size: 2rem;
    color: var(--text-muted);
}

.player-dot-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    #app {
        padding: 16px;
    }

    .game-title {
        font-size: 2.2rem;
    }

    .timer-text {
        font-size: 3rem;
    }

    .btn-large {
        padding: 16px 28px;
        font-size: 1.1rem;
    }

    .add-player-form input[type="text"] {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .add-player-form .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .config-section {
        padding: 16px;
    }
}

/* ============ LANGUAGE SELECTOR ============ */
#language-selector-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.language-selector-improved {
    display: flex;
    gap: 8px;
}

.lang-flag-btn {
    background: none;
    border: 2px solid transparent;
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}

.lang-flag-btn.active {
    opacity: 1;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.flag-icon {
    width: 28px;
    height: auto;
    display: block;
    border-radius: 2px;
}

/* ============ TOGGLE SWITCH ============ */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-light);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}