:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    --border-radius: 16px;
    --error-color: #ff6b6b;
    --success-color: #51cf66;
}

/* Weather-based background gradients */
.weather-sunny {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #FFD23F 50%, #FF6B35 75%, #E63946 100%);
    background-size: 400% 400%;
    animation: sunnyAnimation 20s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
}

.weather-cloudy {
    background: linear-gradient(135deg, #4A90E2 0%, #7B68EE 25%, #9370DB 50%, #6A5ACD 75%, #483D8B 100%);
    background-size: 400% 400%;
    animation: cloudyAnimation 15s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
}

.weather-rainy {
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 25%, #06B6D4 50%, #0891B2 75%, #164E63 100%);
    background-size: 400% 400%;
    animation: rainyAnimation 10s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
}

.weather-stormy {
    background: linear-gradient(135deg, #000000 0%, #1F2937 25%, #4B5563 50%, #374151 75%, #111827 100%);
    background-size: 400% 400%;
    animation: stormyAnimation 8s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
}

.weather-snowy {
    background: linear-gradient(135deg, #FFFFFF 0%, #E0F2FE 25%, #BAE6FD 50%, #7DD3FC 75%, #38BDF8 100%);
    background-size: 400% 400%;
    animation: snowyAnimation 25s ease infinite;
    --text-primary: #1565C0;
    --text-secondary: rgba(21, 101, 192, 0.8);
}

.weather-misty {
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 25%, #CBD5E1 50%, #94A3B8 75%, #64748B 100%);
    background-size: 400% 400%;
    animation: mistyAnimation 18s ease infinite;
    --text-primary: #1E293B;
    --text-secondary: rgba(30, 41, 59, 0.8);
}

.weather-clear-night {
    background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 25%, #312E81 50%, #4338CA 75%, #6366F1 100%);
    background-size: 400% 400%;
    animation: nightAnimation 30s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
}

.weather-partly-cloudy {
    background: linear-gradient(135deg, #10B981 0%, #34D399 25%, #6EE7B7 50%, #A7F3D0 75%, #D1FAE5 100%);
    background-size: 400% 400%;
    animation: partlyCloudyAnimation 22s ease infinite;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
}

/* Background animations */
@keyframes sunnyAnimation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes cloudyAnimation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rainyAnimation {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

@keyframes stormyAnimation {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 50% 0%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 100%; }
}

@keyframes snowyAnimation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes mistyAnimation {
    0%, 100% { background-position: 0% 50%; }
    33% { background-position: 100% 0%; }
    66% { background-position: 0% 100%; }
}

@keyframes nightAnimation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes partlyCloudyAnimation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Weather Animation Effects */
.weather-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Rain Animation */
.rain-animation {
    background: transparent;
}

.rain-animation::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 98px,
        rgba(255,255,255,0.03) 100px
    );
    animation: rainSlant 0.6s linear infinite;
    transform: skewX(-15deg);
}

.rain-animation::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 48px,
        rgba(255,255,255,0.06) 50px
    );
    animation: rainSlant 0.4s linear infinite;
    transform: skewX(-15deg);
}

@keyframes rainSlant {
    to {
        transform: translateY(100px) skewX(-15deg);
    }
}

/* Snow Animation */
.snow-animation::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    background-image: 
        radial-gradient(3px 3px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.9), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: snowfall 8s linear infinite;
}

.snow-animation::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 110%;
    background-image: 
        radial-gradient(2px 2px at 60px 20px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 100px 60px, rgba(255,255,255,0.5), transparent),
        radial-gradient(3px 3px at 170px 90px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 250px 120px;
    animation: snowfall 12s linear infinite;
}

@keyframes snowfall {
    to {
        transform: translateY(120px);
    }
}

/* Storm Animation */
.storm-animation::before,
.storm-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.storm-animation::before {
    background: 
        radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(255,255,255,0.6) 0%, transparent 40%);
    animation: lightning1 8s ease-in-out infinite;
}

.storm-animation::after {
    background: 
        radial-gradient(ellipse at 50% 20%, rgba(255,255,255,0.9) 0%, transparent 60%),
        linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    animation: lightning2 8s ease-in-out infinite;
    animation-delay: 4s;
}

@keyframes lightning1 {
    0%, 90%, 100% { opacity: 0; }
    2%, 4% { opacity: 1; }
    6%, 8% { opacity: 0; }
    10%, 11% { opacity: 0.8; }
}

@keyframes lightning2 {
    0%, 90%, 100% { opacity: 0; }
    1%, 3% { opacity: 0.9; }
    5%, 7% { opacity: 0; }
    9%, 10% { opacity: 0.7; }
}

/* Clouds Animation */
.cloudy-animation::before,
.cloudy-animation::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    filter: blur(2px);
}

.cloudy-animation::before {
    width: 300px;
    height: 80px;
    top: 10%;
    left: -150px;
    animation: floatClouds1 40s ease-in-out infinite;
}

.cloudy-animation::after {
    width: 250px;
    height: 60px;
    top: 30%;
    right: -125px;
    animation: floatClouds2 50s ease-in-out infinite;
}

@keyframes floatClouds1 {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(calc(100vw + 300px)) scale(1.2); }
}

@keyframes floatClouds2 {
    0%, 100% { transform: translateX(0) scale(1.1); }
    50% { transform: translateX(calc(-100vw - 250px)) scale(0.9); }
}

/* Mist Animation */
.misty-animation::before,
.misty-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%, transparent);
    filter: blur(3px);
}

.misty-animation::before {
    animation: mistWave1 15s ease-in-out infinite;
}

.misty-animation::after {
    animation: mistWave2 20s ease-in-out infinite;
    animation-delay: 7s;
}

@keyframes mistWave1 {
    0%, 100% { transform: translateX(-100%) rotate(0deg); opacity: 0; }
    50% { transform: translateX(100%) rotate(2deg); opacity: 1; }
}

@keyframes mistWave2 {
    0%, 100% { transform: translateX(100%) rotate(0deg); opacity: 0; }
    50% { transform: translateX(-100%) rotate(-1deg); opacity: 0.8; }
}

/* Sunny Animation (floating particles) */
.sunny-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 30px 40px, rgba(255,215,0,0.6), transparent),
        radial-gradient(1px 1px at 80px 70px, rgba(255,165,0,0.4), transparent),
        radial-gradient(1px 1px at 150px 30px, rgba(255,140,0,0.3), transparent),
        radial-gradient(2px 2px at 200px 80px, rgba(255,215,0,0.5), transparent);
    background-repeat: repeat;
    background-size: 250px 120px;
    animation: sunParticles 20s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes sunParticles {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-30px) scale(1.1); }
    50% { transform: translateY(-10px) scale(0.9); }
    75% { transform: translateY(-25px) scale(1.05); }
}

/* Night Stars Animation */
.clear-night-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 50px 80px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 150px 30px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 90px 150px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 200px 100px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 300px 50px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 350px 200px;
    animation: twinkleStars 8s ease-in-out infinite;
}

@keyframes twinkleStars {
    0%, 100% { opacity: 0.8; filter: brightness(1); }
    25% { opacity: 1; filter: brightness(1.2); }
    50% { opacity: 0.6; filter: brightness(0.8); }
    75% { opacity: 1; filter: brightness(1.1); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 1.5s ease-in-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounceIn 1.2s ease-out;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
    animation: fadeIn 1.5s ease-out;
}

/* Search Container */
.search-container {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    align-items: center;
    animation: slideInUp 1s ease-out 0.3s both;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-box {
    flex: 1;
    display: flex;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn,
.location-btn,
.refresh-btn {
    position: relative;
    padding: 12px 16px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn {
    border-radius: 0 25px 25px 0;
    border-left: none;
    border-radius: 0 25px 25px 0;
}

.location-btn,
.refresh-btn {
    border-radius: 50%;
}

.search-btn::before, .location-btn::before, .refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 0;
}

.search-btn::after, .location-btn::after, .refresh-btn::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-btn:hover, .location-btn:hover, .refresh-btn:hover {
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.25);
    border-color: rgba(79, 172, 254, 0.6);
}

.search-btn:hover::before, .location-btn:hover::before, .refresh-btn:hover::before {
    opacity: 0.2;
}

.search-btn:hover::after, .location-btn:hover::after, .refresh-btn:hover::after {
    opacity: 0.3;
}

.search-btn:active, .location-btn:active, .refresh-btn:active {
    transform: translateY(-1px);
}

.search-icon, .location-icon, .refresh-icon {
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 5px rgba(79, 172, 254, 0.5));
}

.refresh-btn:hover .refresh-icon {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Weather Container */
.weather-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card Base Styles */
.weather-card,
.loading-card,
.error-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    animation: cardSlideIn 0.8s ease-out;
}

.weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

/* Loading Card */
.loading-card {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.6s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Card */
.error-card {
    text-align: center;
    border-color: var(--error-color);
    animation: fadeIn 0.6s ease-out;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.retry-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Weather Card Sections */
.location-info {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.location-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

/* Current Weather */
.current-weather {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.temperature {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.temp-unit {
    font-size: 2rem;
    font-weight: 300;
}

.weather-icon {
    font-size: 4rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Landing Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes detailStagger {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 3px rgba(79, 172, 254, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 6px rgba(79, 172, 254, 0.8));
    }
}

.weather-description {
    color: var(--text-secondary);
}

.weather-description p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Weather Details Grid */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    animation: fadeIn 1.4s ease-out 0.5s both;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: detailStagger 0.8s ease-out both;
    transform: translateX(-30px);
    opacity: 0;
}

.detail-item:nth-child(1) { 
    animation-delay: 0.6s; 
    animation-name: slideInLeft;
}
.detail-item:nth-child(2) { 
    animation-delay: 0.7s; 
    animation-name: slideInRight;
}
.detail-item:nth-child(3) { 
    animation-delay: 0.8s; 
    animation-name: slideInLeft;
}
.detail-item:nth-child(4) { 
    animation-delay: 0.9s; 
    animation-name: slideInRight;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
    border-color: rgba(79, 172, 254, 0.5);
}

.detail-item:hover .detail-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 8px rgba(79, 172, 254, 0.8));
}

.detail-item:hover .detail-value {
    transform: scale(1.05);
    color: #4facfe;
}

.detail-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    filter: drop-shadow(0 0 3px rgba(79, 172, 254, 0.5));
    transition: all 0.3s ease;
    animation: iconPulse 2s ease-in-out infinite;
}

.detail-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    animation: chatBounce 2s ease-in-out infinite;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.6);
}

/* Hide chat button when modal is active */
.chat-modal.active ~ .chat-button {
    opacity: 0.7;
    transform: scale(0.8);
}

.chat-icon {
    font-size: 1.5rem;
    color: white;
}

.chat-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(79, 172, 254, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes chatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Chat Modal */
.chat-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 420px;
    height: 600px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.4);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(50px) scale(0.9);
    transition: all 0.3s ease;
}

.chat-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-container {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(31, 38, 135, 0.4);
}

@keyframes chatSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-avatar {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-info h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.bot-status {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: messageSlideIn 0.4s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.message-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 20px;
    max-width: 70%;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.message-content p {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
    font-size: 1rem;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
}

/* Chat Input */
.chat-input-container {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 1.2rem 1.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    min-height: 50px;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-send {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.chat-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.send-icon {
    font-size: 1.1rem;
}

/* Suggestion Chips */
.chat-suggestions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.7rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-chip:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 1rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design for Chat */
@media (max-width: 768px) {
    .chat-button {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .chat-modal {
        width: 380px;
        height: 550px;
        right: 20px;
        bottom: 85px;
    }

    .chat-header {
        padding: 1.5rem;
    }

    .chat-messages {
        padding: 1.5rem;
    }

    .chat-input-container {
        padding: 1.5rem;
    }

    .chat-input-wrapper {
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .chat-input {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }

    .chat-send {
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
        flex-shrink: 0;
    }

    .send-icon {
        font-size: 1rem;
    }

    .message-content {
        max-width: 85%;
    }

    .suggestion-chip {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 480px) {
    .chat-modal {
        width: calc(100vw - 40px);
        height: 500px;
        right: 20px;
        bottom: 85px;
        max-width: 360px;
    }

    .chat-header {
        padding: 1.2rem;
    }

    .chat-messages {
        padding: 1.2rem;
    }

    .chat-input-container {
        padding: 1.2rem;
    }

    .chat-input-wrapper {
        gap: 0.6rem;
        margin-bottom: 0.8rem;
        align-items: center;
    }

    .chat-input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        min-height: 40px;
        border-radius: 20px;
    }

    .chat-send {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        flex-shrink: 0;
        border: none;
        outline: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .chat-send:active {
        transform: scale(0.95);
    }

    .send-icon {
        font-size: 0.9rem;
    }

    .message-content {
        max-width: 90%;
    }

    .suggestion-chip {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .chat-modal {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 75px;
    }

    .chat-input-wrapper {
        gap: 0.5rem;
    }

    .chat-input {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
        min-height: 36px;
    }

    .chat-send {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .send-icon {
        font-size: 0.8rem;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .weather-card,
    .loading-card,
    .error-card {
        padding: 1.5rem;
    }
    
    .weather-main {
        flex-direction: column;
        gap: 1rem;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .weather-icon {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .detail-item {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .weather-card,
    .loading-card,
    .error-card {
        padding: 1rem;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
    
    .weather-icon {
        font-size: 2.5rem;
    }
    
    .detail-item {
        padding: 0.7rem;
    }
}

@media (min-width: 1024px) {
    .weather-container {
        min-height: 70vh;
    }
    
    .weather-card {
        max-width: 700px;
        padding: 3rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
}