/* Modern Weather Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.weather-animation {
    position: absolute;
    width: 100%;
    height: 100%;
}

.weather-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.container {
    width: 100%;
    max-width: 1200px;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

header h1 i {
    color: #ffdd00;
    text-shadow: 0 0 10px rgba(255, 221, 0, 0.5);
}

.units-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 30px;
    padding: 5px;
}

.unit-btn {
    padding: 8px 15px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.unit-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

.weather-input {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
}

.search-container h3 {
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 1.2rem;
}

.search-box {
    display: flex;
    margin-bottom: 20px;
}

.city-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 15px 0 0 15px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.city-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 0 15px 15px 0;
    background: linear-gradient(135deg, #ffdd00, #ff9300);
    color: #000;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: linear-gradient(135deg, #ff9300, #ffdd00);
    box-shadow: 0 0 15px rgba(255, 157, 0, 0.5);
}

.search-history {
    margin-top: 20px;
}

.search-history h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.location-btn {
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.location-btn:hover {
    background: linear-gradient(135deg, #0072ff, #00c6ff);
    box-shadow: 0 0 15px rgba(0, 114, 255, 0.5);
}

.weather-data {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.current-weather {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(5px);
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    padding: 15px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 15px;
    display: none;
}

.details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.city-info h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.city-country {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.current-date {
    font-size: 1rem;
    opacity: 0.7;
}

.weather-icon {
    text-align: right;
    font-size: 5rem;
    color: #ffdd00;
    text-shadow: 0 0 15px rgba(255, 221, 0, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.temperature {
    grid-column: 1 / -1;
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.weather-description {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.other-details {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

.detail-item i {
    font-size: 1.8rem;
    color: #00c6ff;
}

.detail-item .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.7;
}

.detail-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

.days-forecast {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.days-forecast h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.weather-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.card {
    list-style: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.forecast-date {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.forecast-icon {
    font-size: 2.5rem;
    margin: 10px 0;
    color: #ffdd00;
}

.card h6 {
    font-size: 0.9rem;
    margin: 5px 0;
    font-weight: 500;
    opacity: 0.8;
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .weather-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .weather-icon {
        text-align: center;
    }
    
    .other-details {
        grid-template-columns: 1fr;
    }
    
    .weather-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-cards {
        grid-template-columns: 1fr;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .city-info h2 {
        font-size: 2rem;
    }
}
