/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 30px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #2c3e50;
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header h1 i {
    color: #3498db;
}

.tagline {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 300;
}

/* Search Section */
.search-container {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#cityInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#cityInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#searchBtn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#searchBtn:hover {
    background: linear-gradient(135deg, #2980b9, #2575fc);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

#searchBtn:active {
    transform: translateY(0);
}

.hint {
    color: #95a5a6;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 5px;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Weather Display */
.weather-display {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.weather-header {
    text-align: center;
    margin-bottom: 30px;
}

.weather-header h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.date {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Main Weather Info */
.weather-main {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.temp-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.temperature {
    font-size: 4rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
}

.unit {
    font-size: 2rem;
    margin-top: 10px;
    color: #7f8c8d;
}

.weather-icon img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.condition p {
    text-align: center;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.feels-like {
    text-align: center;
    color: #7f8c8d;
    font-size: 1rem;
}

/* Weather Details */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
}

.detail-card i {
    font-size: 2rem;
    color: #3498db;
}

.detail-card .label {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-card p:last-child {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Error Message */
.error-message {
    background: #ffeaea;
    border-left: 5px solid #e74c3c;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message i {
    color: #e74c3c;
    font-size: 1.5rem;
}

.error-message p {
    color: #c0392b;
    font-size: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #bdc3c7;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ====================================
   WEATHER MOOD EFFECTS
   ==================================== */

/* Sunny Mood */
.weather-mood-sunny {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-sunny .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(255, 165, 0, 0.25);
}

.weather-mood-sunny header h1 {
    color: #FF8C00 !important;
    text-shadow: 2px 2px 4px rgba(255, 140, 0, 0.1);
}

.weather-mood-sunny #searchBtn {
    background: linear-gradient(135deg, #FFA500, #FF8C00) !important;
}

/* Cloudy/Gloomy Mood */
.weather-mood-cloudy {
    background: linear-gradient(135deg, #808080 0%, #696969 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-cloudy .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(128, 128, 128, 0.2);
}

.weather-mood-cloudy header h1 {
    color: #5D6D7E !important;
}

.weather-mood-cloudy #searchBtn {
    background: linear-gradient(135deg, #7F8C8D, #616A6B) !important;
}

/* Rainy Mood */
.weather-mood-rainy {
    background: linear-gradient(135deg, #2C3E50 0%, #4A6491 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-rainy .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
}

.weather-mood-rainy header h1 {
    color: #3498db !important;
}

.weather-mood-rainy #searchBtn {
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
}

/* Snowy Mood */
.weather-mood-snowy {
    background: linear-gradient(135deg, #E0F7FA 0%, #B3E5FC 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-snowy .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(179, 229, 252, 0.3);
}

.weather-mood-snowy header h1 {
    color: #00ACC1 !important;
}

.weather-mood-snowy #searchBtn {
    background: linear-gradient(135deg, #4DD0E1, #26C6DA) !important;
}

/* Clear Night Mood */
.weather-mood-night {
    background: linear-gradient(135deg, #0F0C29 0%, #302B63 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-night .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(155, 89, 182, 0.2);
}

.weather-mood-night header h1 {
    color: #9B59B6 !important;
}

.weather-mood-night #searchBtn {
    background: linear-gradient(135deg, #8E44AD, #9B59B6) !important;
}

/* Stormy Mood */
.weather-mood-stormy {
    background: linear-gradient(135deg, #0F2027 0%, #203A43 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-stormy .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(44, 62, 80, 0.3);
}

.weather-mood-stormy header h1 {
    color: #2C3E50 !important;
}

.weather-mood-stormy #searchBtn {
    background: linear-gradient(135deg, #2C3E50, #34495E) !important;
}

/* Misty/Foggy Mood */
.weather-mood-misty {
    background: linear-gradient(135deg, #95A5A6 0%, #7F8C8D 100%) !important;
    transition: background 0.8s ease !important;
}

.weather-mood-misty .container {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(149, 165, 166, 0.2);
}

.weather-mood-misty header h1 {
    color: #7F8C8D !important;
}

.weather-mood-misty #searchBtn {
    background: linear-gradient(135deg, #95A5A6, #7F8C8D) !important;
}

/* Default Mood (fallback) */
.weather-mood-default {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%) !important;
    transition: background 0.8s ease !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #searchBtn {
        justify-content: center;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .temp-section {
        flex-direction: column;
        text-align: center;
    }
    
    .weather-icon img {
        width: 100px;
        height: 100px;
    }
}