:root {
    --primary: #60a5fa;           /* Light blue - primary actions */
    --primary-dark: #3b82f6;      /* Darker blue for gradients */
    --accent: #f97316;            /* Orange accent */
    --accent-light: #fb923c;      /* Lighter orange */
    --bg: #0a1628;                /* Dark blue background */
    --bg-gradient: #0d1b2a;       /* Slightly lighter for gradients */
    --surface: #1a2332;           /* Card/surface color */
    --surface-light: #243447;     /* Lighter surface for hover */
    --text-main: #ffffff;         /* White text */
    --text-muted: #94a3b8;        /* Muted text */
    --border: #334155;            /* Border color */
    --green: #22c55e;             /* Success green */
    --purple: #a855f7;            /* Purple accent */
    --accent-bar-width: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-gradient) 100%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-y: scroll;
    min-height: 100vh;
}

/* Add subtle animated background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* --- Navbar --- */
.navbar {
    background: rgba(26, 35, 50, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
}

.logo { 
    font-weight: 800; 
    font-size: 1.5rem; 
    color: var(--text-main); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: color 0.2s; 
}
.nav-links a:hover { 
    color: var(--primary); 
}
.btn-login { 
    background: var(--accent); 
    color: white !important; 
    padding: 0.5rem 1rem; 
    border-radius: 6px; 
    transition: background 0.2s;
}
.btn-login:hover {
    background: var(--accent-light);
}

/* --- Tabs --- */
.tabs-container {
    background: rgba(26, 35, 50, 0.8);
    backdrop-filter: blur(10px);
    padding: 0 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.tab {
    padding: 1rem 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-size: 1rem;
}

.tab:hover { color: var(--primary); }
.tab.active { 
    color: var(--primary); 
    border-bottom-color: var(--accent); 
}

/* --- Layout --- */
.container { 
    max-width: 1600px;
    width: 95%;
    margin: 0 auto; 
    padding: 2rem 0; 
}

.city-content { display: none; }
.city-content.active { display: block; }

.bucket-header { 
    margin: 2.5rem 0 1rem 0; 
    color: var(--primary); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 700; 
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* --- Professional Event Card --- */
.event-card {
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    display: flex; 
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}

.event-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    background: var(--surface-light);
}

.card-left-bar {
    width: var(--accent-bar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    display: grid;
    grid-template-columns: 140px 1fr 180px; 
    padding: 1.25rem;
}

/* Column 1: Date & Time */
.col-date-time {
    display: flex;
    flex-direction: column;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
    margin-right: 1.5rem;
    justify-content: flex-start;
}

.dt-day { 
    font-weight: 800; 
    text-transform: uppercase; 
    text-align: center; 
    font-size: 1.1rem; 
    color: var(--text-main); 
    margin-bottom: 0.25rem;
}
.dt-date { 
    text-align: center; 
    color: var(--text-muted); 
    font-weight: 500; 
    margin-bottom: 1.5rem; 
}

.time-block { 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
    display: flex; 
    justify-content: space-between;
}
.time-label { 
    color: var(--text-muted); 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-right: 8px;
}
.t-start { color: var(--green); }
.t-end { color: var(--purple); }

/* Column 2: Main Info & Weather */
.col-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.evt-title { 
    font-size: 1.25rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin: 0 0 0.25rem 0; 
}
.evt-venue { 
    color: var(--primary); 
    font-weight: 600; 
    font-size: 0.95rem; 
    margin-bottom: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
}

/* Weather Scroll Strip */
.weather-strip {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    align-items: center;
}
.weather-strip::-webkit-scrollbar { height: 4px; }
.weather-strip::-webkit-scrollbar-thumb { 
    background: var(--primary); 
    border-radius: 4px; 
}
.weather-strip::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 4px;
}

.weather-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.wx-icon { 
    width: 30px; 
    height: 30px; 
    object-fit: contain; 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 80%;
    padding: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 4px;
    transition: transform 0.2s;
}

.wx-icon:hover {
    transform: scale(1.1);
}

.wx-temp { 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--text-main); 
    margin-top: 2px;
}
.wx-time { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    font-weight: 600; 
}

/* Column 3: Stats */
.col-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    text-align: right;
    padding-left: 1rem;
    position: relative;
}

.stat-group { margin-bottom: 1rem; }
.stat-label { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    font-weight: 600; 
    display: block; 
}
.stat-value { 
    font-size: 1.1rem; 
    font-weight: 700; 
    color: var(--text-main); 
}
.confidence-bar-bg { 
    width: 100%; 
    height: 4px; 
    background: var(--border); 
    border-radius: 2px; 
    margin-top: 4px; 
}
.confidence-bar-fill { 
    height: 100%; 
    background: linear-gradient(90deg, var(--green) 0%, #16a34a 100%); 
    border-radius: 2px; 
    width: 85%; 
}

/* Multi-Day Event Badge */
.multi-day-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    min-width: 120px;
}

.multi-day-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    font-weight: 700;
}

.multi-day-dates {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile */
@media (max-width: 900px) {
    .card-content { grid-template-columns: 1fr; gap: 1rem; }
    .col-date-time { 
        flex-direction: row; 
        border-right: none; 
        border-bottom: 1px solid var(--border); 
        padding-bottom: 1rem; 
        padding-right: 0; 
        margin-right: 0; 
        align-items: center; 
        gap: 2rem;
    }
    .dt-day, .dt-date { text-align: left; margin: 0; }
    .col-stats { 
        align-items: flex-start; 
        text-align: left; 
        flex-direction: row; 
        gap: 2rem;
    }
}

/* --- DARK MODE VARIABLES (keeping for compatibility, but default is now dark) --- */
body.dark-mode {
    --bg: #0a1628;
    --bg-gradient: #0d1b2a;
    --surface: #1a2332;
    --surface-light: #243447;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: #334155;
}

/* Dark Mode adjustments for specific elements */
body.dark-mode .logo { color: #ffffff; }
body.dark-mode .wx-icon { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
body.dark-mode .event-card { 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}
body.dark-mode .tabs-container { 
    border-bottom: 1px solid var(--border); 
}
body.dark-mode .bucket-header { 
    color: var(--primary); 
}

/* --- TOGGLE SWITCH STYLING (For Profile) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
input:checked + .slider:before { transform: translateX(22px); }
