* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(145deg, #f0f4ff 0%, #d9e2ff 100%);
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 2rem;
    box-shadow: 0 20px 40px -12px rgba(0, 20, 60, 0.25);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.5);
}

/* Header */
.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2.5rem;
    color: #3b82f6;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 8px 16px -8px #3b82f680;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1e293b;
}

.search-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-box {
    background: white;
    border-radius: 3rem;
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.search-box i {
    color: #94a3b8;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 1rem;
    width: 200px;
}

.unit-toggle {
    background: white;
    border-radius: 3rem;
    display: inline-flex;
    padding: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.unit-btn {
    border: none;
    background: transparent;
    padding: 0.5rem 1.2rem;
    border-radius: 3rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.unit-btn.active {
    background: #3b82f6;
    color: white;
}

/* Status bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.cache-indicator {
    background: #e2e8f0;
    border-radius: 2rem;
    padding: 0.3rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cache-indicator i {
    color: #3b82f6;
}

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 1rem;
}

.error-message.show {
    display: flex;
}

/* Current weather */
.current-weather {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1.5rem;
    padding: 1.8rem;
    color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 15px 30px -10px #3b82f6;
}

.location h2 {
    font-size: 2.2rem;
    font-weight: 600;
}

.date {
    opacity: 0.9;
    margin: 0.3rem 0 0.8rem;
}

.condition {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.3rem;
}

.temp-main {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
    width: 100%;
}

.detail-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Forecast section */
.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.view-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

.list-view {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.forecast-card {
    background: white;
    border-radius: 1.2rem;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

/* Loading */
.loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(4px);
    border-radius: 2rem;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: #475569;
    font-size: 0.9rem;
}