:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --accent-primary: #3b82f6; /* Venture Blue */
    --accent-success: #10b981; /* Growth Green */
    --accent-danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Prevent body scroll, handle inside containers */
}

/* --- LAYOUT GRID --- */
.app-container {
    display: grid;
    grid-template-columns: 300px 1fr; /* Desktop default */
    height: 100%;
}

/* --- SIDEBAR / HEADER (Stats Area) --- */
.sidebar {
    background-color: #020617;
    border-right: 1px solid #334155;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
}

.brand h1 {
    font-size: 1.2rem;
    line-height: 1.1;
    margin: 0;
    font-family: var(--font-mono);
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #334155;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.stat-bar {
    height: 4px;
    background: #334155;
    margin-top: 10px;
    border-radius: 2px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--accent-success);
    transition: width 0.5s ease;
}

/* Log is hidden on mobile to save space */
.log-container {
    flex-grow: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid #334155;
    padding-top: 1rem;
}

.log-container ul {
    list-style: none;
    padding: 0;
}

.log-container li {
    margin-bottom: 0.5rem;
    padding-left: 10px;
    border-left: 2px solid var(--accent-primary);
}

/* --- MAIN CONTENT AREA --- */
.main-content {
    display: flex;
    align-items: center; /* Center vertically on desktop */
    justify-content: center;
    padding: 4rem;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 60%);
    overflow-y: auto; /* Allow scrolling within main content */
}

.scenario-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 800px;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
    animation: fadeIn 0.5s ease-in;
}

.scenario-header {
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

.scenario-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.quote-box {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    display: none;
}

/* --- BUTTONS --- */
.choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.choice-btn {
    background: transparent;
    border: 1px solid #475569;
    color: var(--text-main);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap highlight */
}

.choice-btn:active {
    transform: scale(0.98);
}

.choice-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-primary);
}

/* Desktop Hover Effects only */
@media (hover: hover) {
    .choice-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
        background: var(--accent-primary);
    }
}

.choice-title {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.choice-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    /* Transform Sidebar into Top Bar */
    .sidebar {
        flex-direction: row;
        width: 100%;
        height: auto;
        padding: 0.75rem 1rem;
        border-right: none;
        border-bottom: 1px solid #334155;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        flex-shrink: 0; /* Don't shrink the header */
        background-color: #020617;
        z-index: 10;
    }

    /* Compact Logo */
    .brand {
        transform: scale(0.8);
        margin-left: -10px;
    }

    /* Transform Stats to Horizontal Scroll/Row */
    .stats-container {
        flex-direction: row;
        gap: 0.5rem;
        flex-grow: 1;
        justify-content: flex-end;
    }

    .stat-card {
        padding: 0.5rem 0.8rem;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 80px;
    }

    .stat-bar {
        display: none; /* Hide bars on mobile to save space */
    }

    .stat-label {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    /* Hide Log on mobile */
    .log-container {
        display: none;
    }

    /* Main Content Adjustments */
    .main-content {
        padding: 1rem;
        align-items: flex-start; /* Align to top on mobile */
    }

    .scenario-card {
        padding: 1.5rem;
        margin-bottom: 2rem; /* Space for scrolling */
    }

    h2 {
        font-size: 1.5rem;
    }

    .scenario-body p {
        font-size: 1rem;
    }

    /* Stack buttons vertically */
    .choices-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .choice-btn {
        padding: 1.2rem;
    }
}