:root {
    --background-color: #1a1a1a;
    --surface-color: #2a2a2a;
    --primary-color: #03DAC6;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --border-color: #3a3a3a;
    --success-color: #2ecc71;
    --failure-color: #e74c3c;
}
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystem-Font, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    margin: 0;
}
.main-container { max-width: 1200px; margin: 0 auto; padding: 40px; }
header { text-align: center; margin-bottom: 40px; }
header h1 { font-size: 2.8rem; margin: 0; }
header .subtitle { font-size: 1.2rem; color: var(--text-secondary); margin-top: 10px; }
.dashboard { display: grid; grid-template-columns: 1fr 400px; gap: 40px; }
.simulator-panel { display: flex; flex-direction: column; gap: 20px; }
#simulator-section {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.results { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 20px; }
.result-display { background-color: var(--background-color); padding: 20px; border-radius: 8px; width: 100%; text-align: center; }
.result-display p { margin: 0; font-size: 1.2rem; }
.result-display .weekly-average { margin-top: 15px; font-size: 1rem; color: var(--text-secondary); }
#sales-output { font-size: 3rem; margin: 10px 0 0 0; color: var(--primary-color); }
.analyst-panel {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
#analyst-challenge-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.analyst-header { text-align: center; }
#analyst-avatar {
    width: 180px;
    height: 180px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}
.analyst-card {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    width: 100%;
    text-align: left;
}
.analyst-card h4 { margin-top: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.analyst-card p, .analyst-card strong { color: var(--text-secondary); line-height: 1.6; }
.analyst-card strong { font-weight: bold; color: var(--text-primary); }
.mode-selector { display: flex; justify-content: center; background-color: var(--background-color); border-radius: 10px; padding: 5px; }
.mode-selector input[type="radio"] { display: none; }
.mode-selector label { flex-grow: 1; text-align: center; padding: 10px; cursor: pointer; border-radius: 7px; transition: background-color 0.2s ease; }
.mode-selector input[type="radio"]:checked + label { background-color: var(--primary-color); color: #000; font-weight: bold; }
.control-group { margin-bottom: 20px; text-align: left; }
label { display: block; margin-bottom: 10px; font-weight: bold; }
input[type="range"] { width: 100%; cursor: pointer; }
input[type="range"]:disabled { opacity: 0.5; cursor: not-allowed; }
button { width: 100%; padding: 15px; font-size: 1rem; font-weight: bold; background-color: var(--primary-color); color: #000000; border: none; border-radius: 8px; cursor: pointer; transition: transform 0.1s ease, background-color 0.2s ease; }
button:active { transform: scale(0.98); }
button:disabled { background-color: var(--text-secondary); cursor: not-allowed; }
#about-btn { background-color: var(--surface-color); color: var(--text-primary); }
#about-btn:hover { background-color: #333; }
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    display: flex;
}
#modal-content { position: relative; padding: 30px 40px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 16px; max-width: 600px; }
#close-btn { position: absolute; top: 15px; right: 20px; font-size: 28px; color: var(--text-secondary); cursor: pointer; }
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: 125%; transform: translateX(-50%); background-color: #333; color: #fff; padding: 8px 12px; border-radius: 5px; font-size: 13px; width: 200px; text-align: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 20; }
[data-tooltip]:hover::after { opacity: 1; visibility: visible; }
footer { text-align: center; padding: 20px; color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid var(--border-color); margin-top: 40px; }
footer a { color: var(--primary-color); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ### THIS IS THE FINAL FIX ### */
.hidden {
    display: none !important;
}

/* This rule is more specific than .hidden, so it will win */
#modal-overlay.visible {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}
/* ########################### */

h1 i, h2 i, h4 i, label i { margin-right: 10px; }