/* RRM Brand Colors & Design System */
:root {
    --rrm-orange: #FF6B35;
    --rrm-navy: #1B365D;
    --rrm-cream: #FAF9F6;
    --rrm-gold: #D4AF37;
    --rrm-silver: #A8A8A8;
    --rrm-bronze: #B87333;
    --text-primary: #1B365D;
    --text-secondary: #5A6B7C;
    --border-light: #E5E7EB;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--rrm-cream) 0%, #f5f3ef 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

#game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.game-header {
    text-align: center;
    padding: 24px 16px;
    background: var(--rrm-navy);
    color: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.game-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}

/* Progress Bar */
.progress-bar {
    background: var(--border-light);
    height: 8px;
    border-radius: 4px;
    position: relative;
    margin-bottom: 24px;
}

.progress-fill {
    background: var(--rrm-orange);
    height: 100%;
    border-radius: 4px;
    width: 20%;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 12px;
    right: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Game Screen */
#game-screen {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

/* Typography */
h2 {
    font-size: 22px;
    color: var(--rrm-navy);
    margin-bottom: 16px;
    line-height: 1.3;
}

h3 {
    font-size: 18px;
    color: var(--rrm-navy);
    margin: 24px 0 12px 0;
}

p {
    margin-bottom: 16px;
    font-size: 16px;
}

/* Story Cards */
.story-card {
    background: #F8F9FA;
    border-left: 4px solid var(--rrm-orange);
    padding: 16px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
}

.story-card.narrator {
    border-left-color: var(--rrm-navy);
    font-style: italic;
}

.story-card.naomi {
    border-left-color: var(--rrm-orange);
    background: #FFF5F0;
}

.voice-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rrm-orange);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Evidence Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    margin-right: 6px;
}

.badge.gold { background: linear-gradient(135deg, #FFD700, #D4AF37); }
.badge.silver { background: linear-gradient(135deg, #E8E8E8, #A8A8A8); }
.badge.bronze { background: linear-gradient(135deg, #CD7F32, #B87333); }
.badge.clinical { background: linear-gradient(135deg, #C9B037, #B8A020); }
.badge.expert { background: linear-gradient(135deg, #9B59B6, #8E44AD); }

.evidence-tag {
    display: inline-flex;
    align-items: center;
    background: #F0F0F0;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 13px;
    margin: 4px 4px 4px 0;
}

/* Medical Records */
.medical-record {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--rrm-orange);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.record-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--rrm-navy);
}

.record-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.record-field {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.record-field:last-child {
    border-bottom: none;
}

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

.field-value {
    color: var(--text-primary);
    font-size: 14px;
    text-align: right;
}

.field-value.missing {
    color: var(--error);
    font-style: italic;
}

.field-value.present {
    color: var(--success);
}

/* Red Flag Indicator */
.red-flag {
    display: inline-block;
    background: var(--error);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Truth Patrol */
.truth-patrol {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 24px 0;
}

.truth-patrol h4 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.truth-patrol p {
    font-size: 15px;
    opacity: 0.95;
    margin-bottom: 12px;
}

.truth-patrol .badge {
    background: white;
    color: #764ba2;
}

/* Choices */
.choice-container {
    margin-top: 24px;
}

.choice-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    margin: 12px 0;
    background: white;
    border: 2px solid var(--rrm-navy);
    border-radius: 8px;
    color: var(--rrm-navy);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.choice-btn:hover {
    background: var(--rrm-navy);
    color: white;
    transform: translateX(4px);
}

.choice-btn.primary {
    background: var(--rrm-orange);
    border-color: var(--rrm-orange);
    color: white;
}

.choice-btn.primary:hover {
    background: #E55A2B;
    border-color: #E55A2B;
}

/* Evidence Legend */
.evidence-legend {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.legend-toggle {
    width: 100%;
    padding: 12px 16px;
    background: #F8F9FA;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legend-content {
    display: none;
    padding: 16px;
}

.legend-content.show {
    display: block;
}

.badge-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}

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

/* Interactive Elements */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #F8F9FA;
    border-radius: 8px;
    margin: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #F0F0F0;
}

.checkbox-item input {
    margin-right: 12px;
    margin-top: 2px;
}

.checkbox-item.checked {
    background: #E6F4EA;
    border: 2px solid var(--success);
}

/* Footer */
.game-footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.evidence-note {
    margin-top: 4px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .game-header h1 {
        font-size: 20px;
    }
    
    #game-screen {
        padding: 16px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .record-field {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .field-value {
        text-align: left;
        margin-top: 4px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.story-card, .medical-record, .choice-container {
    animation: fadeIn 0.4s ease;
}
