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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.location-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.loading {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.current-weather {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.location-info h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.location-info p {
    color: #666;
    font-size: 1rem;
}

.current-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

#currentIcon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.temperature {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
}

.current-details {
    text-align: center;
}

#weatherDescription {
    font-size: 1.5rem;
    color: #666;
    text-transform: capitalize;
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.detail-item .label {
    font-size: 0.9rem;
    color: #666;
}

.detail-item span:last-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.hourly-forecast, .daily-forecast {
    background: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hourly-forecast h3, .daily-forecast h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.hourly-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.hourly-container::-webkit-scrollbar {
    height: 8px;
}

.hourly-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hourly-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.hourly-item {
    min-width: 100px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.hourly-item:hover {
    transform: translateY(-5px);
    background: #e9ecef;
}

.hourly-item .time {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
}

.hourly-item img {
    width: 50px;
    height: 50px;
    margin: 10px 0;
}

.hourly-item .temp {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.hourly-item .desc {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.daily-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.daily-item {
    display: grid;
    grid-template-columns: 150px 80px 1fr 100px 100px;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.2s;
}

.daily-item:hover {
    transform: translateX(5px);
    background: #e9ecef;
}

.daily-item .day {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.daily-item img {
    width: 60px;
    height: 60px;
}

.daily-item .desc {
    color: #666;
    text-transform: capitalize;
}

.daily-item .temp-range {
    font-weight: 600;
    color: #333;
    text-align: right;
}

.daily-item .temp-range .max {
    color: #ff6b6b;
}

.daily-item .temp-range .min {
    color: #4ecdc4;
    margin-left: 10px;
}

.daily-item .humidity {
    text-align: right;
    color: #666;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .temperature {
        font-size: 3rem;
    }

    .current-main {
        flex-direction: column;
    }

    .daily-item {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .daily-item .temp-range,
    .daily-item .humidity {
        text-align: center;
    }

    #currentIcon {
        width: 100px;
        height: 100px;
    }
}
