 :root {
            /* Light theme variables */
            --bg-primary: rgba(255, 255, 255, 0.95);
            --bg-secondary: rgba(248, 250, 252, 0.8);
            --bg-card: rgba(255, 255, 255, 0.6);
            --bg-detail: rgba(255, 255, 255, 0.8);
            --text-primary: #334155;
            --text-secondary: #64748b;
            --text-accent: #2563eb;
            --border-color: #e2e8f0;
            --border-accent: rgba(37, 99, 235, 0.1);
            --shadow-color: rgba(0, 0, 0, 0.15);
        }

        [data-theme="dark"] {
            /* Dark theme variables */
            --bg-primary: rgba(30, 41, 59, 0.95);
            --bg-secondary: rgba(15, 23, 42, 0.8);
            --bg-card: rgba(51, 65, 85, 0.6);
            --bg-detail: rgba(71, 85, 105, 0.8);
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-accent: #60a5fa;
            --border-color: #475569;
            --border-accent: rgba(96, 165, 250, 0.2);
            --shadow-color: rgba(0, 0, 0, 0.3);
        }

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

        body {
            font-family: 'Open Sans', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
            transition: all 0.3s ease;
        }

        .weather-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            transition: all 0.8s ease;
            opacity: 0.3;
            z-index: -1;
        }

        .container {
            background: var(--bg-primary);
            backdrop-filter: blur(20px);
            border-radius: 24px;
            padding: 40px;
            width: 100%;
            max-width: 480px;
            box-shadow: 0 25px 50px var(--shadow-color);
            border: 1px solid rgba(255, 255, 255, 0.2);
            position: relative;
            animation: slideUp 0.6s ease-out;
            transition: all 0.3s ease;
        }

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

        .header {
            text-align: center;
            margin-bottom: 30px;
            position: relative;
        }

        /* Added theme toggle button */
        .theme-toggle {
            position: absolute;
            top: 0;
            right: 0;
            background: var(--bg-card);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
        }

        .theme-toggle:hover {
            background: var(--bg-detail);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px var(--shadow-color);
        }

        .theme-toggle svg {
            width: 20px;
            height: 20px;
            color: var(--text-accent);
            transition: all 0.3s ease;
        }

        .app-title {
            font-family: 'Montserrat', sans-serif;
            font-weight: 900;
            font-size: 2.2rem;
            color: var(--text-accent);
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
            transition: color 0.3s ease;
        }

        .app-subtitle {
            color: var(--text-secondary);
            font-size: 1rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .search-container {
            position: relative;
            margin-bottom: 40px;
        }

        .search-wrapper {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .search-input {
            flex: 1;
            padding: 16px 20px;
            border: 2px solid var(--border-color);
            border-radius: 16px;
            font-size: 1rem;
            font-family: 'Open Sans', sans-serif;
            background: var(--bg-secondary);
            transition: all 0.3s ease;
            outline: none;
            color: var(--text-primary);
        }

        .search-input::placeholder {
            color: var(--text-secondary);
        }

        .search-input:focus {
            border-color: var(--text-accent);
            background: var(--bg-primary);
            transform: translateY(-1px);
            box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
        }

        .search-btn {
            padding: 16px;
            background: var(--text-accent);
            border: none;
            border-radius: 16px;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 56px;
        }

        .search-btn:hover {
            background: #1d4ed8;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
        }

        .search-btn:active {
            transform: translateY(0);
        }

        .weather-card {
            background: linear-gradient(135deg, var(--border-accent) 0%, rgba(14, 165, 233, 0.05) 100%);
            border-radius: 20px;
            padding: 30px;
            text-align: center;
            border: 1px solid var(--border-accent);
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateY(20px);
        }

        .weather-card.show {
            opacity: 1;
            transform: translateY(0);
        }

        .weather-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
        }

        .city-name {
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 1.5rem;
            color: var(--text-primary);
            margin-bottom: 20px;
            transition: color 0.3s ease;
        }

        .weather-main {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 30px;
        }

        .weather-icon {
            width: 80px;
            height: 80px;
            transition: all 0.3s ease;
            filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
        }

        .weather-icon:hover {
            transform: scale(1.1) rotate(5deg);
        }

        .temperature {
            font-family: 'Montserrat', sans-serif;
            font-weight: 900;
            font-size: 3.5rem;
            color: var(--text-accent);
            text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
            transition: color 0.3s ease;
        }

        .weather-description {
            font-size: 1.2rem;
            color: var(--text-secondary);
            font-weight: 500;
            margin-bottom: 25px;
            text-transform: capitalize;
            transition: color 0.3s ease;
        }

        .weather-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .detail-card {
            background: var(--bg-card);
            padding: 20px;
            border-radius: 16px;
            border: 1px solid var(--border-accent);
            transition: all 0.3s ease;
        }

        .detail-card:hover {
            background: var(--bg-detail);
            transform: translateY(-2px);
        }

        .detail-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 500;
            margin-bottom: 8px;
            transition: color 0.3s ease;
        }

        .detail-value {
            font-family: 'Montserrat', sans-serif;
            font-weight: 600;
            font-size: 1.3rem;
            color: var(--text-primary);
            transition: color 0.3s ease;
        }

        .loading {
            display: none;
            text-align: center;
            padding: 40px;
        }

        .loading.show {
            display: block;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid var(--border-color);
            border-top: 4px solid var(--text-accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

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

        .loading-text {
            color: var(--text-secondary);
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #dc2626;
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            font-weight: 500;
            display: none;
        }

        .error.show {
            display: block;
        }

        @media (max-width: 480px) {
            .container {
                padding: 30px 20px;
                margin: 10px;
            }
            
            .app-title {
                font-size: 1.8rem;
            }
            
            .temperature {
                font-size: 2.8rem;
            }
            
            .weather-details {
                grid-template-columns: 1fr;
            }

            .theme-toggle {
                position: relative;
                margin-bottom: 20px;
            }

            .header {
                display: flex;
                flex-direction: column;
                align-items: center;
            }
        }

        /* Weather background classes */
        .clear-bg {
            background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
        }
        
        .clouds-bg {
            background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
        }
        
        .rain-bg {
            background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
        }
        
        .snow-bg {
            background: linear-gradient(135deg, #ddd6fe 0%, #8b5cf6 100%);
        }
        
        .thunderstorm-bg {
            background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
        }

        /* Dark theme background adjustments */
        [data-theme="dark"] .clear-bg {
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        }
        
        [data-theme="dark"] .clouds-bg {
            background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
        }
        
        [data-theme="dark"] .rain-bg {
            background: linear-gradient(135deg, #111827 0%, #030712 100%);
        }
        
        [data-theme="dark"] .snow-bg {
            background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
        }
        
        [data-theme="dark"] .thunderstorm-bg {
            background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
        }
        