:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);

    --low-color: #10b981;
    --low-bg: rgba(16, 185, 129, 0.15);

    --medium-color: #f59e0b;
    --medium-bg: rgba(245, 158, 11, 0.15);

    --high-color: #ef4444;
    --high-bg: rgba(239, 68, 68, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1.5rem;
}

.app-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
}

.left-col, .right-col {
    width: 100%;
}

@media (min-width: 768px) {
    .main-layout {
        display: grid;
        grid-template-columns: 4fr 6fr;
        gap: 3rem;
        align-items: start;
    }
    
    .left-col {
        position: sticky;
        top: 3rem;
    }
}

header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

select {
    width: 100%;
    appearance: none;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

select option {
    background: var(--bg-color);
}

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.results-section {
    animation: slideUp 0.4s ease-out;
}

.results-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.option-item:hover {
    transform: scale(1.02);
}

.option-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.option-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.crowd-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    min-width: 90px;
}

.crowd-low {
    color: var(--low-color);
    background: var(--low-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.crowd-medium {
    color: var(--medium-color);
    background: var(--medium-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.crowd-high {
    color: var(--high-color);
    background: var(--high-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.recommendations-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.recommendation-card.is-best {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.recommendation-card.is-best::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #10b981, #3b82f6);
}

.prediction-msg {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.score-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.score-badge .score-val {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.score-badge .score-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.score-badge.high-score {
    border-color: #10b981;
}

.score-badge.high-score .score-val {
    color: #10b981;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.alert-box {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warning {
    background: var(--high-bg);
    border: 1px solid var(--high-color);
    color: #fca5a5;
}

.alert-safe {
    background: var(--low-bg);
    border: 1px solid var(--low-color);
    color: #6ee7b7;
}

.alert-notice {
    background: var(--medium-bg);
    border: 1px solid var(--medium-color);
    color: #fcd34d;
}

.recommendation-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.recommendation-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.rec-message {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem !important;
    color: var(--text-main) !important;
    line-height: 1.5;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.bg-red {
    background-color: var(--high-color);
    box-shadow: 0 0 8px var(--high-color);
}

.bg-yellow {
    background-color: var(--medium-color);
    box-shadow: 0 0 8px var(--medium-color);
}

.bg-green {
    background-color: var(--low-color);
    box-shadow: 0 0 8px var(--low-color);
}

/* Tabs system */
.tabs-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.tabs-container::-webkit-scrollbar {
    height: 4px;
}

.tabs-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.tab-btn {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-weight: 600;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tab-panel {
    display: none;
    animation: slideUp 0.3s ease-out;
}

.tab-panel.active {
    display: block;
}

.panel-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Dashboard Styles */
.dashboard-section {
    animation: slideUp 0.4s ease-out;
    margin-bottom: 2rem;
}

.dashboard-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--primary);
}

/* Stadium Map Styles */
.map-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.stadium-map {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
}

@media (min-width: 500px) {
    .stadium-map {
        display: grid;
        grid-template-areas: 
            ". north ."
            "west field east"
            ". south .";
        grid-template-columns: 1fr 2fr 1fr;
        grid-template-rows: auto auto auto;
    }
}

.map-zone {
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.is-best-zone {
    border: 2px solid var(--primary) !important;
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.best-area-badge {
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    border-radius: 1rem;
    margin-top: 0.25rem;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.zone-north { grid-area: north; }
.zone-south { grid-area: south; }
.zone-west { grid-area: west; }
.zone-east { grid-area: east; }
.zone-field { 
    grid-area: field; 
    padding: 2rem 0.5rem; 
    border: 2px dashed rgba(255,255,255,0.2); 
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}