:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* Default Theme */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    transition: background 1s ease-in-out;
    padding: 20px;
}

/* Glassmorphism Card */
.weather-card {
    width: 100%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-5px);
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 50px;
    margin-bottom: 25px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    flex: 1;
    font-size: 16px;
    padding: 0 10px;
}

.search-box button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.2);
}

/* Weather Main Info */
.temp-wrapper {
    font-size: 70px;
    font-weight: 600;
    margin: 10px 0;
}

.main-icon img {
    width: 120px;
    animation: float 3s ease-in-out infinite;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.detail-item i { font-size: 20px; }

.divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 25px 0;
}

/* Forecast Grid */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 5px;
    border-radius: 15px;
    font-size: 12px;
}

.forecast-item img { width: 40px; }

/* Loader */
.loader-container {
    position: fixed;
    inset: 0;
    background: #1e3c72;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hidden { display: none; }

.error-box {
    background: rgba(255, 0, 0, 0.2);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
}