/* ═══ Game Mode Styles ═══════════════════════════════════════════ */

/* Menu */
.game-menu {
    text-align: center;
    padding: 48px 24px;
    max-width: 640px;
    margin: 0 auto;
}

.game-logo {
    font-size: 72px;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.game-title {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.game-subtitle {
    font-size: 16px;
    opacity: 0.6;
    margin-bottom: 24px;
    font-style: italic;
}

.game-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary, #b0b8c8);
    margin-bottom: 16px;
}

.game-note {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-secondary, #b0b8c8);
    margin-bottom: 32px;
    text-align: left;
    line-height: 1.6;
}

/* Difficulty Selector */
.diff-selector {
    margin-bottom: 32px;
}

.diff-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.5;
    margin-bottom: 12px;
}

.diff-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.diff-btn {
    background: var(--card-bg, #1a1d23);
    border: 1px solid var(--border, #2a2d33);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
}

.diff-btn:hover {
    border-color: rgba(168, 85, 247, 0.4);
}

.diff-btn.active {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

.diff-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.diff-name {
    font-size: 16px;
    font-weight: 700;
    display: block;
    color: var(--text, #e0e0e0);
}

.diff-desc {
    font-size: 12px;
    opacity: 0.5;
    display: block;
    margin-top: 4px;
}

/* Start Button */
.game-start-btn {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
}

.game-start-btn.secondary {
    background: transparent;
    border: 1px solid var(--border, #2a2d33);
    color: var(--text-secondary, #b0b8c8);
}

/* Game Round */
.game-round {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 20px;
}

/* Stage Header */
.stage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #2a2d33);
}

.stage-badge {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.stage-name {
    font-size: 20px;
    font-weight: 700;
    flex-grow: 1;
}

.stage-pts {
    font-size: 13px;
    opacity: 0.5;
    font-weight: 600;
}

.stage-explainer {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary, #b0b8c8);
    margin-bottom: 20px;
}

/* Incoming Message */
.incoming-msg {
    background: var(--card-bg, #1a1d23);
    border: 1px solid var(--border, #2a2d33);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.msg-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.msg-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text, #e0e0e0);
}

/* Decision Prompt */
.decision-prompt {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text, #e0e0e0);
}

/* Verdict Buttons */
.verdict-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.verdict-btn {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    border: 2px solid var(--border, #2a2d33);
    background: var(--card-bg, #1a1d23);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text, #e0e0e0);
}

.verdict-btn.allow:hover,
.verdict-btn.allow.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.verdict-btn.review:hover,
.verdict-btn.review.selected {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.verdict-btn.refuse:hover,
.verdict-btn.refuse.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Category Buttons */
.cat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cat-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border, #2a2d33);
    background: var(--card-bg, #1a1d23);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text, #e0e0e0);
}

.cat-btn:hover,
.cat-btn.selected {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
}

/* Context Checklist */
.context-checklist,
.tool-checklist,
.audit-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.ctx-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border, #2a2d33);
    cursor: pointer;
    transition: all 0.15s ease;
}

.ctx-checkbox:hover {
    border-color: rgba(168, 85, 247, 0.3);
}

.ctx-checkbox input {
    accent-color: #a855f7;
}

.ctx-label {
    font-weight: 600;
    font-size: 14px;
}

.ctx-desc {
    font-size: 12px;
    opacity: 0.5;
}

/* Response Textarea */
.response-textarea {
    width: 100%;
    min-height: 140px;
    padding: 16px;
    background: var(--card-bg, #1a1d23);
    border: 1px solid var(--border, #2a2d33);
    border-radius: 10px;
    color: var(--text, #e0e0e0);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 12px;
}

.response-textarea:focus {
    outline: none;
    border-color: #a855f7;
}

/* Hint Block */
.hint-block {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary, #b0b8c8);
    margin-bottom: 16px;
}

/* Next Stage Button */
.next-stage-btn {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.next-stage-btn:hover {
    transform: translateY(-1px);
}

/* Result Card */
.result-card {
    margin-top: 16px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.result-card.pass {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}

.result-card.partial {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.05);
}

.result-card.fail {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.result-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.result-detail {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary, #b0b8c8);
}

/* Scorecard */
.scorecard {
    text-align: center;
    padding: 32px 20px;
}

.score-grade {
    font-size: 96px;
    font-weight: 900;
    margin-bottom: 4px;
    animation: gradeReveal 0.5s ease-out;
}

@keyframes gradeReveal {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-label {
    font-size: 18px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.score-total {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.score-breakdown {
    background: var(--card-bg, #1a1d23);
    border: 1px solid var(--border, #2a2d33);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: left;
    margin-bottom: 24px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.score-row:last-child {
    border-bottom: none;
}

.score-val {
    font-weight: 700;
}

.score-note {
    font-size: 13px;
    opacity: 0.5;
    padding: 12px 0;
    font-style: italic;
}

.score-insight {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 24px;
    color: var(--text-secondary, #b0b8c8);
}

.game-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

/* History */
.game-history {
    text-align: left;
    background: var(--card-bg, #1a1d23);
    border-radius: 12px;
    padding: 16px 20px;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.history-row.total {
    font-weight: 700;
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.history-num {
    font-weight: 700;
    width: 30px;
    opacity: 0.4;
}

.history-text {
    flex-grow: 1;
    opacity: 0.7;
}

.history-diff {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-diff.cadet {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.history-diff.operator {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.history-diff.architect {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.history-score {
    font-weight: 700;
    min-width: 30px;
    text-align: right;
}

/* Game container in nav */
#gameContainer {
    display: none;
}