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

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;
    --border-radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1a2e 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 50px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.search-btn {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.unit-toggle {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--accent);
    border-radius: 50px;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-toggle:hover {
    background: var(--accent);
    color: white;
}

.main-content {
    flex: 1;
    display: grid;
    gap: 2rem;
}

.current-weather {
    display: flex;
    justify-content: center;
}

.weather-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-card {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.location-info h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.date-time {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.weather-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.temp-container {
    display: flex;
    align-items: flex-start;
}

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

.temp-unit {
    font-size: 2rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.weather-icon svg {
    color: var(--accent-light);
}

.weather-description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.detail-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon svg {
    color: white;
}

.detail-info {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 1.3rem;
    font-weight: 600;
}

.forecast-section {
    margin-top: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.forecast-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
}

.forecast-day {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.forecast-icon svg {
    width: 50px;
    height: 50px;
    color: var(--accent-light);
    margin: 1rem 0;
}

.forecast-temp {
    font-size: 1.5rem;
    font-weight: 700;
}

.forecast-temp-min {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer p {
    margin: 0.3rem 0;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem auto;
    max-width: 400px;
}

@media (max-width: 968px) {
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .forecast-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
    }

    .search-container {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .temperature {
        font-size: 4rem;
    }
}