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

:root {
    --accent-primary: #f59e0b;
    --accent-primary-dark: #d97706;
    --accent-secondary: #fb923c;
    --accent-green: #4ade80;
}

/* ==================== */
/* Screen System        */
/* ==================== */

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== */
/* Typography           */
/* ==================== */

/* ==================== */
/* Buttons              */
/* ==================== */

@media (hover: hover) {
    .btn-join:hover {
        background: var(--accent-primary);
        color: var(--text-primary);
    }
}

.btn-join.active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-play.outlined {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: none;
}

@media (hover: hover) {
    .btn-copy:hover {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .btn-secondary:hover {
        border-color: var(--accent-blue);
    }
}

/* ==================== */
/* Inputs               */
/* ==================== */

.name-input {
    margin-bottom: 20px;
    text-align: center;
}

.code-input {
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

/* ==================== */
/* Main Screen          */
/* ==================== */

.main-content {
    justify-content: center;
    align-items: center;
}

.game-logo {
    font-size: 80px;
    margin-bottom: 16px;
}

.actions-columns {
    display: flex;
    gap: 16px;
    width: 100%;
    align-items: stretch;
    margin-top: 24px;
}

.action-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    min-width: 0;
}

.col-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.error-message {
    color: var(--error);
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    margin-top: 16px;
}

/* ==================== */
/* Lobby Screen         */
/* ==================== */

.qr-code-block {
    display: flex;
    justify-content: center;
    margin: 0 0 16px;
}

.qr-code-img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #ffffff;
    padding: 8px;
}

/* ==================== */
/* Rounds Selector      */
/* ==================== */

.rounds-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 12px 0;
}

.rounds-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rounds-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
}

.rounds-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==================== */
/* Game Header          */
/* ==================== */

.game-content {
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 16px 0 40px;
}

.round-badge {
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.timer-badge {
    width: 48px;
    height: 48px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.timer-badge.warning {
    background: var(--error);
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* ==================== */
/* Question Card        */
/* ==================== */

.question-card {
    text-align: center;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ==================== */
/* Writing Screen       */
/* ==================== */

.fake-input-section .btn-play {
    margin-top: 10px;
}

.writing-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    position: relative;
}

.writing-actions {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.writing-actions .btn-play {
    flex: 1;
}

.submitted-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(13, 19, 41, 0.85);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    z-index: 5;
    border-radius: 12px;
}

.submitted-overlay.visible {
    display: flex;
}

.submitted-icon {
    font-size: 48px;
}

.submitted-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
}

.submitted-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== */
/* Voting Screen        */
/* ==================== */

.vote-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.vote-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
    font-size: 16px;
}

@media (hover: hover) {
    .vote-option:hover:not(.selected):not(.disabled) {
        border-color: var(--accent-blue);
        transform: translateX(4px);
    }
}

.vote-option.selected {
    border-color: var(--accent-blue);
    background: rgba(74, 108, 247, 0.15);
    cursor: default;
}

.vote-option.disabled {
    cursor: default;
    opacity: 0.7;
}

.option-letter {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 16px;
    flex-shrink: 0;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.vote-confirmed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}

.vote-confirmed-icon {
    font-size: 20px;
    color: var(--success);
}

.vote-confirmed-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--success);
}

/* ==================== */
/* Reveal Screen        */
/* ==================== */

.reveal-content {
    align-items: center;
}

.reveal-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.reveal-option {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.reveal-option.is-real {
    border-color: var(--rp-correct);
    background: color-mix(in srgb, var(--rp-correct) 10%, transparent);
}

.reveal-option.is-fake {
    border-color: var(--accent-secondary);
    background: rgba(251, 146, 60, 0.05);
}

.reveal-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.reveal-option-text {
    font-size: 16px;
    font-weight: 600;
}

.reveal-option-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.reveal-option-tag.real {
    background: var(--rp-correct);
    color: #000;
}

.reveal-option-tag.fake {
    background: var(--accent-secondary);
    color: #000;
}

.reveal-option-author {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.reveal-option-voters {
    font-size: 13px;
    color: var(--accent-blue);
}

/* ==================== */
/* Mini Scoreboard      */
/* ==================== */

.mini-scoreboard::-webkit-scrollbar {
    display: none;
}

/* ==================== */
/* Scoreboard           */
/* ==================== */

/* ==================== */
/* Results Screen       */
/* ==================== */

/* ==================== */
/* Connection Overlay   */
/* ==================== */
/* Base styles: ../connection-overlay.css */

/* ==================== */
/* Responsive           */
/* ==================== */

@media (max-width: 480px) {
    .screen-content {
        padding: 24px 16px;
        padding-top: calc(24px + env(safe-area-inset-top, 0px));
    }
    .title { font-size: 24px; }
    .game-logo { font-size: 60px; }
    .room-code-display {
        font-size: 36px;
        padding: 12px 24px;
        letter-spacing: 8px;
    }
    .timer-badge { width: 42px; height: 42px; font-size: 18px; }
}

@media (min-width: 768px) {
    .screen-content { padding: 50px 40px; }
    .title { font-size: 32px; }
    .timer-badge { width: 56px; height: 56px; font-size: 24px; }
}
