* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
}

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

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.weather-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    min-height: 400px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner.hidden {
    display: none;
}

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

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

.loading-spinner p {
    color: #666;
    font-size: 1rem;
}

.weather-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location {
    text-align: center;
    margin-bottom: 20px;
}

.location h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
}

.current-weather {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.temperature {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 15px;
}

.temperature span:first-child {
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.temperature .unit {
    font-size: 2rem;
    color: #666;
    margin-left: 5px;
}

.weather-icon {
    margin: 15px 0;
}

.weather-icon img {
    width: 100px;
    height: 100px;
}

.description {
    margin-top: 10px;
}

.description p {
    font-size: 1.2rem;
    color: #666;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
    text-align: center;
}

.detail-item .label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.detail-item .value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.update-time {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.update-time p {
    font-size: 0.85rem;
    color: #999;
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .temperature span:first-child {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
}
