/* Tour Modal */
:root {
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --accent: #ff4500;
    /* Orange course */
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-dark);
    color: var(--text-main);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    padding: 25px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
}

/* Header */
.modal-header h2 {
    margin: 10px 0 5px 0;
    font-size: 1.4rem;
}

.badge-type {
    display: inline-block;
    padding: 4px 8px;
    background: var(--accent);
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.pilot-name {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Chrono */
.chrono-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(145deg, #1a1a1a, #252525);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.main-time {
    font-family: 'Courier New', monospace;
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: -1px;
}

.ranking-badge {
    color: var(--accent);
    font-weight: bold;
    margin-top: 5px;
}

/* Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-card {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.stat-card .value {
    font-weight: 600;
    margin-top: 4px;
    font-size: 0.95rem;
}

/* Flags */
.flags-section {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.flag-badge {
    flex: 1;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 1;
}

.flag-badge.inactive {
    opacity: 0.2;
    grayscale: 1;
}

.yellow {
    background: #ffd700;
    color: #000;
}

.red {
    background: #ff0000;
    color: #fff;
}

.blue {
    background: #0000ff;
    color: #fff;
}