/* ===== Global ===== */
* {
    box-sizing: border-box;
}
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top, #0b1120 0%, #020617 60%, #000 100%);
    color: #e2e8f0;
    overflow: hidden;
}
body {
    position: relative;
}
/* Background glows */
.bg-orb {
    position: fixed;
    border-radius: 999px;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}
.bg1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.8), transparent 65%);
    top: -120px;
    left: -80px;
}
.bg2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.7), transparent 65%);
    bottom: -140px;
    right: -40px;
}
/* ===== Menu Button ===== */
.menu-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
}
.menu-btn div {
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #7dd3fc);
}
/* ===== Slide Menu ===== */
.menu {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(30, 64, 175, 0.7);
    box-shadow: 25px 0 60px rgba(0, 0, 0, 0.65);
    padding: 24px 18px;
    transition: left 0.4s ease;
    z-index: 18;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.menu.open {
    left: 0;
}
.menu .user-welcome {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #cbd5f5;
}
.menu .user-welcome a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
}
.menu a {
    display: block;
    color: #e2e8f0;
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: background 0.25s ease, transform 0.15s ease;
}
.menu a:hover {
    background: rgba(56, 189, 248, 0.18);
    transform: translateX(3px);
}
/* ===== Flash Messages (if used) ===== */
.flash-messages {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    padding: 10px 16px;
    margin: 0;
    max-width: 420px;
    width: calc(100% - 32px);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(16px);
    z-index: 21;
    font-size: 0.9rem;
}
/* ===== Main Layout ===== */
.page-root {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}
#map {
    width: 100%;
    height: 100%;
}
/* ===== Floating Search Bar ===== */
.search-bar-wrapper {
    position: fixed;
    top: 16px;
    left: 72px;
    right: 16px;
    z-index: 15;
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.search-card i {
    color: #60a5fa;
    font-size: 1rem;
}
#origin {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    color: #e2e8f0;
    font-size: 0.95rem;
}
#origin::placeholder {
    color: #64748b;
}
.round-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e5e7eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s;
}
.round-icon-btn:hover {
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.9);
    border-color: rgba(129, 230, 217, 0.8);
}
/* ===== Weather + Controls Floating Stack ===== */
.fab-stack {
    position: fixed;
    right: 16px;
    bottom: 100px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fab {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #0b1120;
    font-size: 1.2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fab.secondary {
    background: rgba(15, 23, 42, 0.96);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.6);
}
.fab:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
.fab-label {
    position: absolute;
    right: 60px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e2e8f0;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
}
.fab-wrapper {
    position: relative;
}
.fab-wrapper:hover .fab-label {
    opacity: 1;
    transform: translateX(0);
}
/* ===== Bottom Sheet ===== */
.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 14;
    transform: translateY(100%);
    transition: transform 0.35s ease-out;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.sheet.open {
    transform: translateY(0);
    pointer-events: auto;
}
.sheet-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 12px;
    padding: 10px 14px 14px;
    border-radius: 18px 18px 24px 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.45);
    backdrop-filter: blur(24px);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.9);
}
.sheet-handle {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.6);
    margin: 4px auto 10px;
}
.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 4px 4px 6px;
}
.sheet-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sheet-title {
    font-size: 0.9rem;
    color: #cbd5f5;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}
.sheet-location {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
}
.sheet-header-right {
    text-align: right;
    font-size: 0.9rem;
}
.sheet-temp-main {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e0f2fe;
}
.sheet-temp-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}
.sheet-body {
    margin-top: 10px;
    max-height: 270px;
    overflow-y: auto;
    padding-right: 4px;
}
/* Weather cards */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.weather-card {
    border-radius: 14px;
    background: radial-gradient(circle at top, rgba(30, 64, 175, 0.85), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(129, 140, 248, 0.6);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}
.weather-card.small {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.5);
}
.weather-card-title {
    font-size: 0.75rem;
    color: #cbd5f5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.weather-card-value {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e7eb;
}
.weather-card-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}
.weather-icon-main {
    position: absolute;
    right: -8px;
    top: -12px;
    opacity: 0.2;
    font-size: 3.4rem;
}
.weather-desc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.75rem;
    margin-bottom: 6px;
}
.weather-desc-pill i {
    color: #facc15;
}
.weather-icon-inline {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.7);
}
/* Loader */
.loader-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #cbd5f5;
    margin-top: 4px;
}
.loader-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #38bdf8;
    animation: pulse 1s infinite alternate;
}
.loader-dot:nth-child(2) {
    animation-delay: 0.16s;
}
.loader-dot:nth-child(3) {
    animation-delay: 0.32s;
}
@keyframes pulse {
    from {
        transform: translateY(1px);
        opacity: 0.6;
    }
    to {
        transform: translateY(-1px);
        opacity: 1;
    }
}
/* Responsive tweaks */
@media (max-width: 720px) {
    .search-bar-wrapper {
        left: 68px;
        right: 8px;
    }
    .sheet-inner {
        margin-bottom: 8px;
        border-radius: 18px 18px 0 0;
    }
}