/* =====================================================
   INSIDER GAME - Screen-Specific Styles
   ===================================================== */

/* ════════════════════════════════════
   TITLE SCREEN
════════════════════════════════════ */
#screen-title {
    justify-content: center;
    align-items: center;
    min-height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(57, 255, 20, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 231, 0.03) 0%, transparent 50%),
        var(--bg-dark);
    overflow: hidden;
}

.title-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.title-sub {
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.8;
}

.game-title {
    font-family: var(--font-title);
    font-size: clamp(52px, 15vw, 96px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0.05em;
    color: var(--neon-green);
    text-shadow: var(--glow-green);
}

.title-description {
    font-size: 13px;
    line-height: 1.8;
    max-width: 300px;
}

.title-roles {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.role-badge {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    letter-spacing: 0.2em;
    font-weight: 700;
}

.role-badge.role-master {
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    box-shadow: 0 0 6px rgba(0, 255, 231, 0.2);
}

.role-badge.role-insider {
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    text-shadow: var(--glow-red);
    box-shadow: 0 0 6px rgba(255, 41, 82, 0.2);
}

.role-badge.role-common {
    border: 1px solid var(--neon-green-dim);
    color: var(--neon-green-dim);
    box-shadow: 0 0 6px rgba(57, 255, 20, 0.1);
}

/* ════════════════════════════════════
   SETUP SCREEN
════════════════════════════════════ */
.form-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.player-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

.player-number {
    color: var(--text-dim);
    font-size: 12px;
    min-width: 18px;
    text-align: right;
}

.player-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Timer selector */
.timer-selector {
    display: flex;
    align-items: center;
    gap: 16px;
}

.timer-display {
    font-size: 42px;
    font-family: var(--font-title);
    min-width: 60px;
    text-align: center;
}

.timer-unit {
    font-size: 18px;
}

/* Category label row */
.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}

.category-btn {
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 12px;
    text-align: left;
    transition: all var(--transition);
    background: var(--bg-card2);
    cursor: pointer;
    line-height: 1.4;
}

.category-btn:hover {
    border-color: var(--neon-green-dim);
    color: var(--neon-green);
}

.category-btn.selected {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.06);
    box-shadow: var(--glow-green-sm);
}

.category-btn .cat-icon {
    font-size: 18px;
    display: block;
    margin-bottom: 2px;
}

/* ════════════════════════════════════
   REVEAL SCREEN
════════════════════════════════════ */
.reveal-body {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.reveal-instruction {
    font-size: 13px;
    letter-spacing: 0.1em;
    min-height: 20px;
}

.reveal-player-name {
    font-family: var(--font-title);
    font-size: clamp(22px, 6vw, 36px);
    letter-spacing: 0.1em;
}

.reveal-card-area {
    perspective: 1000px;
    width: 100%;
    max-width: 280px;
    height: 340px;
}

.reveal-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-card.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}

.card-back {
    background: var(--bg-card);
    border: 2px solid #2a2a2a;
}

.card-back-icon {
    font-size: 72px;
    color: #2a2a2a;
    text-shadow: none;
    line-height: 1;
    font-family: var(--font-title);
}

.card-tap-hint {
    font-size: 12px;
    letter-spacing: 0.15em;
}

.card-front {
    background: var(--bg-card);
    border: 2px solid var(--neon-green);
    box-shadow: var(--glow-green);
    transform: rotateY(180deg);
}

.card-front.role-master-card {
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.card-front.role-insider-card {
    border-color: var(--neon-red);
    box-shadow: var(--glow-red);
}

.role-icon {
    font-size: 48px;
    line-height: 1;
}

.role-name {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.role-word {
    font-size: 20px;
    letter-spacing: 0.1em;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.role-desc {
    font-size: 12px;
    color: #4a6a4a;
    line-height: 1.6;
}

/* ════════════════════════════════════
   PLAY SCREEN
════════════════════════════════════ */
.play-body {
    align-items: center;
    justify-content: center;
    gap: 28px;
    position: relative;
}

.timer-ring-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    padding: 10px;
    box-sizing: content-box;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.timer-ring-bg {
    fill: none;
    stroke: #1a2a1a;
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--neon-green);
    stroke-width: 6;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.8)) drop-shadow(0 0 8px rgba(57, 255, 20, 0.3));
    stroke-dasharray: 326.7;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-time {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.play-rules {
    font-size: 12px;
    line-height: 1.9;
    text-align: center;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}

.play-rules p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.play-btns .btn {
    width: 100%;
}

.time-up-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(4px);
}

.time-up-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.time-up-text {
    font-family: var(--font-title);
    font-size: clamp(48px, 14vw, 80px);
    font-weight: 900;
    animation: neonFlicker 1.5s infinite;
}

/* ════════════════════════════════════
   VOTE SCREEN
════════════════════════════════════ */
.vote-body {
    gap: 16px;
}

.vote-instruction {
    font-size: 13px;
    letter-spacing: 0.1em;
}

.vote-player-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vote-player-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid #222;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.vote-player-card:not(.is-voter) {
    cursor: default;
}

.vote-player-name-text {
    font-size: 15px;
    letter-spacing: 0.08em;
}

.vote-choices {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vote-choice-btn {
    padding: 5px 12px;
    border: 1px solid #2a2a2a;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--font-body);
    background: var(--bg-card2);
    cursor: pointer;
    transition: all var(--transition);
}

.vote-choice-btn:hover {
    border-color: var(--neon-green-dim);
    color: var(--neon-green);
}

.vote-choice-btn.selected {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.08);
    box-shadow: var(--glow-green-sm);
}

.vote-status {
    font-size: 13px;
    color: var(--text-dim);
    text-align: center;
}

/* ════════════════════════════════════
   RESULT SCREEN
════════════════════════════════════ */
.result-body {
    align-items: center;
    gap: 20px;
}

.result-reveal-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid #222;
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease;
}

.result-label {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.result-word {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.result-insider {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.result-outcome {
    margin-top: 8px;
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.result-outcome.win {
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    text-shadow: var(--glow-green);
    background: rgba(57, 255, 20, 0.05);
}

.result-outcome.lose {
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    text-shadow: var(--glow-red);
    background: rgba(255, 41, 82, 0.05);
}

.result-breakdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-card2);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.breakdown-role {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-dim);
}

.breakdown-votes {
    color: var(--neon-green-dim);
    font-size: 12px;
}

.result-btns {
    display: flex;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}

.result-btns .btn {
    flex: 1;
    min-width: 130px;
    max-width: 200px;
}

/* ── PC responsive: larger timer ── */
@media (min-width: 768px) {
    .timer-ring-wrap {
        width: 220px;
        height: 220px;
        padding: 12px;
    }

    .timer-time {
        font-size: 48px;
    }

    .game-title {
        font-size: clamp(70px, 10vw, 120px);
    }

    .reveal-card-area {
        max-width: 320px;
        height: 380px;
    }

    .play-rules {
        font-size: 14px;
    }
}