/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Screen Management */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome Screen */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo i {
    font-size: 4rem;
    color: #ffffff;
    margin-bottom: 16px;
    display: block;
}

.logo h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 32px;
}

.briefing {
    text-align: left;
    margin-bottom: 32px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.briefing h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.briefing p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 24px;
}

.controls-preview {
    margin-top: 20px;
}

.swipe-demo {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.swipe-option {
    flex: 1;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.swipe-option.biased {
    background: #fed7d7;
    color: #c53030;
}

.swipe-option.fair {
    background: #c6f6d5;
    color: #38a169;
}

/* Buttons */
.btn-primary, .btn-secondary {
    background: #667eea;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #718096;
}

.btn-secondary:hover {
    background: #4a5568;
}

/* Detection Screen */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.progress-container {
    flex: 1;
    margin-right: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    width: 10%;
}

.counter {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.score-display {
    color: #2d3748;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scenario Card */
.scenario-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scenario-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
    transition: transform 0.3s ease;
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.scenario-type {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.ai-confidence {
    color: #4a5568;
    font-size: 0.9rem;
}

.client-profile, .ai-recommendation {
    margin-bottom: 24px;
}

.client-profile h3, .ai-recommendation h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.client-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.client-detail:last-child {
    margin-bottom: 0;
}

.client-detail .label {
    color: #4a5568;
    font-weight: 500;
}

.client-detail .value {
    color: #2d3748;
    font-weight: 600;
}

.recommendation {
    background: #edf2f7;
    padding: 20px;
    border-radius: 12px;
    font-style: italic;
    color: #2d3748;
    line-height: 1.6;
    border-left: 4px solid #38a169;
}

.decision-area {
    text-align: center;
}

.instruction {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.swipe-controls {
    display: flex;
    gap: 16px;
}

.swipe-btn {
    flex: 1;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.swipe-btn i {
    font-size: 1.5rem;
}

.swipe-btn.biased {
    background: #fed7d7;
    color: #c53030;
}

.swipe-btn.biased:hover {
    background: #feb2b2;
    transform: translateY(-2px);
}

.swipe-btn.fair {
    background: #c6f6d5;
    color: #38a169;
}

.swipe-btn.fair:hover {
    background: #9ae6b4;
    transform: translateY(-2px);
}

/* Feedback Screen */
.feedback-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.feedback-header {
    text-align: center;
    margin-bottom: 32px;
}

.feedback-result {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.feedback-result.correct {
    color: #38a169;
}

.feedback-result.incorrect {
    color: #e53e3e;
}

.bias-explanation {
    background: #f7fafc;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.bias-explanation h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bias-explanation p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 16px;
}

.training-data-issue {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    padding: 16px;
    border-radius: 8px;
}

.training-data-issue h4 {
    color: #c53030;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Results Screen */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.badge i {
    font-size: 2rem;
    color: white;
}

.results-header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.final-score {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 32px;
}

.final-score span {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.final-score p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-top: 8px;
}

.results-breakdown {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.results-breakdown h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.scenario-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f7fafc;
}

.scenario-result.correct {
    border-left: 4px solid #38a169;
}

.scenario-result.incorrect {
    border-left: 4px solid #e53e3e;
}

.scenario-title {
    color: #2d3748;
    font-weight: 500;
}

.result-status {
    font-weight: 600;
}

.result-status.correct {
    color: #38a169;
}

.result-status.incorrect {
    color: #e53e3e;
}

.key-insights {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.key-insights h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.insight-card {
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
    text-align: center;
}

.insight-card i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 16px;
    display: block;
}

.insight-card h3 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.insight-card p {
    color: #4a5568;
    line-height: 1.5;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
    }
    
    .progress-container {
        margin-right: 0;
    }
    
    .scenario-card {
        padding: 24px;
    }
    
    .swipe-controls {
        flex-direction: column;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .welcome-content {
        padding: 24px;
    }
    
    .swipe-demo {
        flex-direction: column;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.scenario-card.swipe-right {
    animation: slideOut 0.3s ease forwards;
}

.scenario-card.swipe-left {
    animation: slideOut 0.3s ease forwards;
}