/* --- General Layout --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    margin: 0;
    transition: background 0.8s ease;
}

/* --- Container (Premium Glass) --- */
.container {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 35px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    width: 360px;
    transition: transform 0.3s ease;
}

h1 { color: #fff; margin-bottom: 25px; font-size: 28px; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }

/* --- Inputs & Buttons --- */
.search-box { display: flex; gap: 10px; justify-content: center; margin-bottom: 25px; }

#cityInput {
    padding: 12px 15px;
    width: 180px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    outline: none;
}

#searchBtn, #locationBtn {
    padding: 12px 15px;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    transition: 0.3s;
}

#searchBtn { background: #007bff; color: white; }
#locationBtn { background: #28a745; color: white; }
#searchBtn:hover, #locationBtn:hover { transform: scale(1.05); filter: brightness(1.2); }

/* --- Weather Display (Layered Card) --- */
#weatherDisplay {
    padding: 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.6s ease-in-out;
}

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

#weatherDisplay h2 { color: #fff; margin: 0 0 15px 0; font-size: 26px; }
.weather-info { 
    background: rgba(0,0,0,0.2); 
    padding: 20px; 
    border-radius: 18px; 
    margin-top: 15px; 
    width: 100%;
    box-sizing: border-box;
}

/* --- History Section --- */
#historySection { margin-top: 25px; color: #fff; }
#historyList { list-style: none; padding: 0; }
#historyList li {
    padding: 12px;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,0.05);
    margin: 8px 0;
    border-radius: 10px;
    transition: 0.3s;
}
#historyList li:hover { background: rgba(255,255,255,0.2); }

/* --- Utilities --- */
.spinner { border: 4px solid rgba(255,255,255,0.2); border-top: 4px solid #fff; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 20px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#offlineBanner { display: none; background: #ff4757; color: white; padding: 10px; position: fixed; top: 0; width: 100%; text-align: center; z-index: 1000; }
.status { color: #fff; opacity: 0.7; }