:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease-out;
}

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

header {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
}

.search-box {
    flex: 1;
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 5px 15px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#city-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    padding: 10px 0;
    font-size: 1rem;
}

#city-input::placeholder {
    color: var(--text-secondary);
}

#search-btn, #geo-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#geo-btn {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 10px;
    border: 1px solid var(--glass-border);
}

#search-btn:hover, #geo-btn:hover {
    transform: scale(1.1);
}

.current-weather {
    text-align: center;
    margin-bottom: 2.5rem;
}

#city-name {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

#date {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.weather-info {
    margin-bottom: 2rem;
}

#temperature {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1;
}

.unit {
    font-size: 2rem;
    vertical-align: top;
    margin-top: 1rem;
    display: inline-block;
}

.condition-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#weather-icon {
    font-size: 4rem;
}

#weather-desc {
    font-size: 1.2rem;
    text-transform: capitalize;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.value {
    font-size: 1rem;
    font-weight: 600;
}

/* Forecast */
.forecast h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.forecast-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.forecast-grid::-webkit-scrollbar {
    display: none;
}

.forecast-item {
    min-width: 80px;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 0.5rem;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border);
}

.forecast-day {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.forecast-icon {
    font-size: 1.5rem;
}

.forecast-temp {
    font-weight: 600;
}

/* Utils */
.hidden {
    display: none;
}

.loader-container {
    text-align: center;
    padding: 2rem 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px;
}

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

.error-container {
    text-align: center;
    background: rgba(255, 87, 87, 0.2);
    padding: 1rem;
    border-radius: 15px;
    color: #ffcccc;
}

/* Background Variations */
.bg-sunny { --bg-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.bg-cloudy { --bg-gradient: linear-gradient(135deg, #bdc3c7 0%, #2c3e50 100%); }
.bg-rainy { --bg-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bg-night { --bg-gradient: linear-gradient(135deg, #09203f 0%, #537895 100%); }
