
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    animation: gradientBG 15s ease infinite;
}


body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="80" fill="url(%23a)"/></svg>') no-repeat;
    background-size: cover;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    /* %0, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(-10px) rotate(-1deg); } */
     0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

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

h1 {
    font-size: 3.5em;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: glow 3s ease-in-out infinite alternate;
    margin-bottom: 10px;
    color: #ffffff;
}

.current-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2em;
    margin-bottom: 20px;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)); }
}

.settings-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.settings-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.settings-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px;
    min-width: 250px;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.settings-panel.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

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

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: white;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 25px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #4CAF50;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.toggle-switch.active::after {
    transform: translateX(25px);
}

.api-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.api-info h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 600;
}

.api-info p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-weight: 400;
}

.search-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-container {
    flex: 2;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 25px 18px 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.suggestion-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.suggestion-item {
    padding: 12px 20px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.suggestion-item:hover {
    background: rgba(116, 185, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.btn {
    padding: 18px 25px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:disabled {
    background: linear-gradient(135deg, #b2bec3, #636e72);
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.9);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 30px;
}

.main-weather {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.6s ease-out;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weather-summary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.air-quality {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.forecast-scroll {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 300px;
    overflow-y: auto;
}

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

.weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 20px;
}

.location-info h3 {
    color: #ffffff;
    font-size: 2em;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.location-info p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    margin-bottom: 5px;
    font-weight: 400;
}

.temperature {
    font-size: 4.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    text-shadow: 0 0 30px rgba(241, 196, 15, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.detail-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #00cec9, #74b9ff);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.detail-card:hover::before {
    transform: scaleX(1);
}

.detail-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.detail-card h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.detail-card .value {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.weather-icon {
    font-size: 3em;
    margin: 10px 0;
    animation: float 3s ease-in-out infinite;
}

.forecast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.forecast-item:last-child {
    border-bottom: none;
}

.air-quality-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
    color: white;
}

.aqi-level {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.aqi-good { background: #4CAF50; }
.aqi-moderate { background: #FFC107; color: #333; }
.aqi-unhealthy { background: #FF5722; }

.error {
    background: linear-gradient(135deg, rgba(255, 99, 99, 0.9), rgba(214, 48, 49, 0.9));
    color: #ffffff;
    padding: 20px;
    border-radius: 15px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.remove-favorite {
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-weight: bold;
}

.remove-favorite:hover {
    color: #ff6b6b;
}

.comparison-mode {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comparison-mode.active {
    display: grid;
}

.export-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Weather-specific animations */
@keyframes rainFall {
    to { transform: translateY(100vh); }
}

@keyframes snowFall {
    to { transform: translateY(100vh) rotate(360deg); }
}

@keyframes sunbeamFloat {
    0%, 100% { opacity: 0.3; transform: rotate(0deg) scale(1); }
    50% { opacity: 0.8; transform: rotate(10deg) scale(1.1); }
}

@keyframes lightningFlash {
    0%, 90%, 100% { opacity: 0; }
    5%, 85% { opacity: 1; }
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .weather-grid {
        grid-template-columns: 1fr;
    }
    
    .side-panel {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .side-panel > div {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2.5em;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .temperature {
        font-size: 3.5em;
    }
    
    .weather-header {
        flex-direction: column;
        text-align: center;
    }
    
    .comparison-mode {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Weather condition animations */
.sunny { animation: rotate 20s linear infinite; }
.cloudy { animation: float 4s ease-in-out infinite; }
.rainy { animation: bounce 1s ease-in-out infinite; }

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Voice control indicator */
.voice-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.voice-indicator:hover {
    transform: scale(1.1);
}

.voice-indicator.listening {
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* Dark mode styles */
body.dark-mode {
    filter: invert(1) hue-rotate(180deg);
}

body.dark-mode img,
body.dark-mode .weather-icon {
    filter: invert(1) hue-rotate(180deg);
}

/* Notification system */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.warning {
    border-left: 4px solid #ff9800;
}
