:root {
    
    --primary: #d81159;         
    --primary-light: #e84a7a;   
    --secondary: #8f2d56;       
    --accent: #fbb13c;          
    --background: #f8f9fa;      
    --card-bg: #ffffff;         
    --text: #333333;            
    --text-light: #6c757d;      
    --border: #dee2e6;          
    --shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

    
    --good: #8bc34a;            
    --moderate: #fbb13c;        
    --unhealthy: #d81159;       
    --severe: #8f2d56;          
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}


.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    grid-template-areas: 
        "header sidebar"
        "content sidebar"
        "forecast sidebar";
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    min-height: 100vh;
}


.main-header {
    grid-area: header;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}


.search-box {
    position: relative;
    
    min-width: 200px;
}
.search-box button {
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3sease;
    margin: 1rem;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(216, 17, 89, 0.2);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.header-controls {
    display: flex;
    gap: 10px;
}

.header-controls button {
    padding: 8px 12px;
    border: none;
    background: var(--background);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    color: var(--primary);
}

.header-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(216, 17, 89, 0.2);
}


.main-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.forecast-section {
    grid-area: forecast;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.sidebar-header {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.brand i {
    font-size: 22px;
    color: var(--primary);
}

.brand h1 {
    font-size: 20px;
    font-weight: 600;
}


.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: white;
}


.sun-card,
.uv-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}


.current-weather-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.weather-main {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.temperature {
    font-size: 42px;
    font-weight: 700;
    margin: 12px 0;
    color: var(--primary);
}

.location {
    font-weight: 500;
    color: var(--text);
}

.weather-condition {
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-condition i {
    color: var(--accent);
    font-size: 24px;
}


.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    grid-column: 1 / -1;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    border-left: 3px solid var(--accent);
}

.detail-item i {
    font-size: 18px;
    color: var(--primary);
}


.aqi-card,
.trend-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}


.aqi-display {
    height: 180px;
    position: relative;
    margin: 15px 0;
}

.aqi-card canvas {
    width: 100% !important;
    height: 100% !important;
}


.forecast-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary);
}


.aqi-indicator,
.uv-indicator {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin: 12px 0;
    overflow: hidden;
}

.aqi-level,
.uv-level {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}


.chart-container {
    width: 100%;
    height: 250px;
    margin-top: 15px;
}


.forecast-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.forecast-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    transition: all 0.2s ease;
    height: 100%;
}

.forecast-item:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid var(--accent);
}

.forecast-day {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.forecast-temp {
    font-size: 18px;
    margin-top: 8px;
    color: var(--primary);
}


.sun-viz {
    position: relative;
    height: 140px;
    margin: 20px 0;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-radius: 70px;
    overflow: hidden;
}

.sun-arc {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.sun-position {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(251, 177, 60, 0.6);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 15px rgba(251, 177, 60, 0.6);
    }
    100% {
        box-shadow: 0 0 30px rgba(251, 177, 60, 0.8);
    }
}


.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--unhealthy);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow);
}

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(143, 45, 86, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 1000;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}


.watermark {
    position: fixed;
    bottom: 15px;
    right: 15px;
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.6;
    z-index: 1000;
}

.watermark a {
    color: var(--primary);
    text-decoration: none;
}


@media (max-width: 1000px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "sidebar"
            "content"
            "forecast";
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .sidebar-header {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: flex;
        flex-direction: column;
    }
    
    .current-weather-card {
        grid-template-columns: 1fr;
    }
    
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-controls {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }
    
    .dashboard-container {
        padding: 10px;
        gap: 15px;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-list {
        grid-template-columns: 1fr;
    }
    
    .current-weather-card,
    .aqi-card,
    .trend-card,
    .forecast-card,
    .sun-card,
    .uv-card,
    .main-header,
    .sidebar-header {
        padding: 15px;
        border-radius: 8px;
    }
    
    .temperature {
        font-size: 36px;
    }
    
    .chart-container {
        height: 200px;
    }
}


@media (prefers-color-scheme: dark) {
    :root {
        --background: #232323;
        --card-bg: #2c2c2c;
        --text: #f0f0f0;
        --text-light: #b0b0b0;
        --border: #444444;
        
        
        --primary: #e63c72;     
        --primary-light: #eb5f8c;
        --secondary: #a13d67;   
        --accent: #fbb94f;      
    }
}
