/* ==========================================================================
   STORMX CENTRAL INTERFACE SYSTEM STYLESHEET
   ========================================================================== */

:root {
    --bg-hollow: rgba(10, 11, 16, 0.4);
    --border-hollow: rgba(255, 255, 255, 0.07);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-sky: #38bdf8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: var(--text-main);
    background-color: #050508;
}       

/* 4K Backdrop Configuration Layer */
#app-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(8, 14, 24, 0.45), rgba(5, 6, 10, 0.96)), 
                url('https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?auto=format&fit=crop&w=3840&q=90');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#main-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Header & Navigation Shell Components */
#app-header {
    background: var(--bg-hollow);
    border-bottom: 1px solid var(--border-hollow);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.brand { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.brand h1 { 
    font-size: 1.2rem; 
    font-weight: 800; 
    letter-spacing: -0.3px; 
}

/* Global Location Array Search Bar Component */
.search-box { 
    position: relative; 
    flex: 1; 
    max-width: 360px; 
    display: flex; 
    gap: 6px; 
}
#search-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-hollow);
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}
#search-input:focus { 
    border-color: var(--accent-sky); 
    background: rgba(255,255,255,0.08); 
}

#search-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-hollow);
    color: #fff;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
#search-btn:hover {
    background: rgba(255,255,255,0.15);
}

#search-results {
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    background: #0f111a;
    border: 1px solid var(--border-hollow);
    border-radius: 6px;
    z-index: 100;
    max-height: 180px;
    overflow-y: auto;
}
.search-item { 
    padding: 10px; 
    cursor: pointer; 
    font-size: 0.85rem; 
    border-bottom: 1px solid rgba(255,255,255,0.02); 
}
.search-item:hover { 
    background: rgba(255,255,255,0.05); 
}
.dropdown-hide { 
    display: none; 
}

#current-city-label { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    width: 100%; 
}

/* Tab Management Routing Panels */
#content-display { 
    flex: 1; 
    overflow-y: auto; 
    padding: 16px; 
}
.tab-panel { 
    display: none; 
    width: 100%; 
    height: 100%; 
    animation: panelFade 0.25s ease-out forwards; 
}
.panel-active { 
    display: block !important; 
}

@keyframes panelFade {
    from { opacity: 0; transform: scale(0.99) translateY(2px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* TAB 1: CURRENT CONDITIONS DISPLAY ELEMENTS */
.main-weather-block { 
    text-align: center; 
    margin-bottom: 20px; 
}
#curr-icon { 
    width: 80px; 
    height: 80px; 
}
#curr-temp { 
    font-size: 3.2rem; 
    font-weight: 200; 
}
#curr-desc { 
    color: var(--text-muted); 
    text-transform: capitalize; 
    font-size: 0.95rem; 
}

.hollow-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
    gap: 10px; 
}
.grid-card { 
    background: var(--bg-hollow); 
    border: 1px solid var(--border-hollow); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
    border-radius: 10px; 
    padding: 12px; 
}
.grid-card h4 { 
    font-size: 0.7rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    margin-bottom: 4px; 
}
.grid-card p { 
    font-size: 1.1rem; 
    font-weight: 600; 
}

/* Location-Locked NWS Tab 1 Warning Interface Styles */
#nws-live-alert-card {
    margin: 0 auto 16px auto;
    max-width: 600px;
    width: 100%;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-flash-active {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.08);
}
.alert-flash-active:hover {
    transform: scale(1.01);
    background: rgba(239, 68, 68, 0.22) !important;
}

.alert-none-state {
    background: rgba(34, 197, 94, 0.05) !important;
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: #4ade80;
    text-align: center;
    cursor: default;
}

.alert-header-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-weight: 700;
}

.pulse-indicator {
    color: #ef4444;
    font-size: 1rem;
    animation: alertPulse 1.4s infinite ease-in-out;
}

@keyframes alertPulse {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* TAB 2: 24 HOURLY FORECAST HORIZONTAL COMPONENT */
.scroll-container { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding-bottom: 8px; 
}
.hour-card { 
    min-width: 105px; 
    background: var(--bg-hollow); 
    border: 1px solid var(--border-hollow); 
    border-radius: 10px; 
    padding: 12px; 
    text-align: center; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
}
.hour-card img { 
    width: 42px; 
    height: 42px; 
}
.hour-card .temp { 
    font-size: 1rem; 
    font-weight: 700; 
    margin-bottom: 4px; 
}
.hour-card .meta { 
    font-size: 0.7rem; 
    color: var(--text-muted); 
    margin-top: 2px; 
}

/* TAB 3: 7 DAY & NIGHT FORECAST VERTICAL MATRIX */
.vertical-container { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
}
.day-row { 
    background: var(--bg-hollow); 
    border: 1px solid var(--border-hollow); 
    border-radius: 10px; 
    padding: 12px; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
}
.day-title { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    font-weight: 600; 
    font-size: 0.9rem; 
    padding-bottom: 4px; 
    border-bottom: 1px solid rgba(255,255,255,0.03); 
}
.day-split { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    margin-top: 6px; 
}
.split-col h5 { 
    font-size: 0.7rem; 
    color: var(--accent-sky); 
    text-transform: uppercase; 
    margin-bottom: 2px; 
}
.split-col div { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    display: flex; 
    justify-content: space-between; 
}

/* TAB 4: ALERTS ARCHIVE MODULES */
.alert-node { 
    background: rgba(220, 38, 38, 0.12); 
    border: 1px solid rgba(220, 38, 38, 0.3); 
    border-radius: 10px; 
    padding: 14px; 
    margin-bottom: 10px; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
}
.alert-node h3 { 
    color: #f87171; 
    font-size: 1rem; 
    margin-bottom: 4px; 
}
.alert-node p { 
    font-size: 0.8rem; 
    line-height: 1.4; 
    white-space: pre-wrap; 
}
.no-alerts { 
    text-align: center; 
    color: var(--text-muted); 
    padding: 30px; 
    font-size: 0.85rem; 
}

/* TAB 5: NWS RIDGE2 VIEWPORT SYSTEM CONTAINER */
.radar-container { 
    width: 100%; 
    height: 100%; 
    min-height: 62vh; 
    border-radius: 10px; 
    overflow: hidden; 
    border: 1px solid var(--border-hollow); 
}
#radar-frame { 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: #08080c; 
}

/* 5-TAB ANIMATED NAVIGATION SYSTEM PANEL BAR */
#app-nav { 
    background: var(--bg-hollow); 
    border-top: 1px solid var(--border-hollow); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    display: flex; 
    padding: 6px 0; 
}
.nav-btn { 
    background: transparent; 
    border: none; 
    color: var(--text-muted); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    flex: 1; 
    cursor: pointer; 
    transition: color 0.15s ease;
}
.nav-btn .icon { 
    font-size: 1.1rem; 
}
.nav-btn .label { 
    font-size: 0.65rem; 
    margin-top: 2px; 
}
.nav-btn.active { 
    color: var(--accent-sky); 
}
.nav-btn:hover:not(.active) {
    color: #cbd5e1;
}