* {
  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;
  padding: 20px;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 0.8s ease-out;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

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

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

        @keyframes cardSlideIn {
            from { 
                opacity: 0; 
                transform: translateY(50px) scale(0.9); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1); 
            }
        }

        @keyframes cardSlideOut {
            from {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
            to {
                opacity: 0;
                transform: translateY(-50px) scale(0.8);
            }
        }

        @keyframes shimmer {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }

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

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

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

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        /* ===== HEADER STYLES ===== */
        .header {
            text-align: center;
            margin-bottom: 40px;
            animation: slideDown 0.6s ease-out;
        }

        .header h1 {
            color: #fff;
            font-size: 2.5rem;
            margin-bottom: 10px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .header p {
            color: rgba(255,255,255,0.8);
            font-size: 1.1rem;
        }

        /* ===== SEARCH STYLES ===== */
        .search-container {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
            animation: slideUp 0.6s ease-out 0.2s both;
        }

        .search-box {
            position: relative;
            width: 100%;
            max-width: 500px;
        }

        .search-input {
            width: 100%;
            padding: 15px 60px 15px 20px;
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            background: rgba(255,255,255,0.15);
            backdrop-filter: blur(10px);
            color: #fff;
            placeholder-color: rgba(255,255,255,0.7);
            transition: all 0.3s ease;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        }

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

        .search-input:focus {
            outline: none;
            background: rgba(255,255,255,0.25);
            transform: scale(1.02);
        }

        .search-btn, .location-btn {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            background: linear-gradient(45deg, #ff6b6b, #feca57);
            color: #fff;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .location-btn {
            right: 50px;
            background: linear-gradient(45deg, #48cae4, #0077b6);
        }

        .search-btn:hover, .location-btn:hover {
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        /* ===== WEATHER CARD STYLES ===== */
        .weather-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }

        .weather-card {
            background: rgba(255,255,255,0.15);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 30px;
            color: #fff;
            box-shadow: 0 8px 32px rgba(0,0,0,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            transition: all 0.3s ease;
            animation: cardSlideIn 0.6s ease-out;
            position: relative;
            overflow: hidden;
        }

        .weather-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.2);
        }

        .weather-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, #ff6b6b, #feca57, #48cae4);
            animation: shimmer 2s ease-in-out infinite;
        }

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

        .city-name {
            font-size: 1.4rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .remove-btn {
            background: rgba(255,107,107,0.2);
            border: none;
            color: #ff6b6b;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .remove-btn:hover {
            background: rgba(255,107,107,0.4);
            transform: scale(1.1);
        }

        .weather-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 25px;
        }

        .temperature {
            font-size: 3rem;
            font-weight: bold;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .weather-icon {
            width: 80px;
            height: 80px;
            animation: float 3s ease-in-out infinite;
        }

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

        .info-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.9rem;
        }

        .info-item i {
            width: 20px;
            color: rgba(255,255,255,0.8);
        }

        /* ===== FORECAST STYLES ===== */
        .forecast-container {
            border-top: 1px solid rgba(255,255,255,0.2);
            padding-top: 20px;
        }

        .forecast-title {
            font-size: 1rem;
            margin-bottom: 15px;
            opacity: 0.9;
        }

        .forecast-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }

        .forecast-item {
            text-align: center;
            padding: 15px 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .forecast-item:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }

        .forecast-day {
            font-size: 0.8rem;
            opacity: 0.8;
            margin-bottom: 8px;
        }

        .forecast-icon {
            width: 40px;
            height: 40px;
            margin: 0 auto 8px;
        }

        .forecast-temp {
            font-size: 0.9rem;
            font-weight: 600;
        }

        /* ===== UTILITY STYLES ===== */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 200px;
            color: #fff;
            font-size: 1.1rem;
        }

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

        .error-message {
            background: rgba(255,107,107,0.2);
            border: 1px solid rgba(255,107,107,0.3);
            color: #ff6b6b;
            padding: 15px;
            border-radius: 12px;
            text-align: center;
            margin: 20px 0;
            animation: shake 0.5s ease-in-out;
        }

        .empty-state {
            text-align: center;
            color: rgba(255,255,255,0.8);
            padding: 60px 20px;
            animation: fadeIn 0.8s ease-out;
        }

        .empty-state i {
            font-size: 4rem;
            margin-bottom: 20px;
            opacity: 0.6;
        }

        .empty-state h3 {
            font-size: 1.5rem;
            margin-bottom: 10px;
        }

        .empty-state p {
            font-size: 1rem;
            opacity: 0.8;
        }

        .pulse {
            animation: pulse 2s ease-in-out infinite;
        }

        /* ===== RESPONSIVE STYLES ===== */
        @media (max-width: 768px) {
            .weather-grid {
                grid-template-columns: 1fr;
            }
            
            .header h1 {
                font-size: 2rem;
            }
            
            .search-box {
                margin: 0 10px;
            }
            
            .temperature {
                font-size: 2.5rem;
            }
            
            .weather-card {
                padding: 20px;
            }
        }