:root {
    --primary: #0a192f;
    --secondary: #e63946;
    --accent: #0077b6;
    --text-main: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --bg-gray: #f4f7f6;
    --header-height: 70px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.main-header {
    background: var(--white);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-logo {
    height: 45px;
    object-fit: contain;
}

.brand-name {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--primary);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--primary);
    color: white;
    z-index: 1100;
    transition: var(--transition);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.menu-logo {
    height: 40px;
}

.side-menu ul {
    list-style: none;
    flex-grow: 1;
}

.side-menu li {
    margin-bottom: 15px;
}

.side-menu a {
    color: #a0aec0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.side-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.menu-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: #718096;
}

/* Main Container */
.app-container {
    margin-top: var(--header-height);
    padding: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - var(--header-height));
}

/* Banner */
.alert-banner {
    background: var(--secondary);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.weather-hero {
    grid-column: span 12;
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

@media (min-width: 1024px) {
    .weather-hero { grid-column: span 4; }
    .forecast-card { grid-column: span 8; }
    .map-card { grid-column: span 8; }
    .seismic-card { grid-column: span 4; }
}

/* Weather Elements */
.location-info h2 { font-size: 2rem; margin-bottom: 4px; }
.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}
.temp-group { font-size: 5rem; font-weight: 800; line-height: 1; }
.unit { font-size: 2rem; vertical-align: top; margin-top: 10px; display: inline-block; }

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 12px;
}

.detail-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.detail-item label { font-size: 0.7rem; opacity: 0.8; text-transform: uppercase; margin-top: 4px; }

/* Forecast List */
.forecast-list {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
}

.forecast-item {
    flex: 0 0 120px;
    background: var(--bg-gray);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.forecast-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.forecast-item .day { font-weight: 700; color: var(--primary); }
.forecast-item .icon { font-size: 2rem; margin: 10px 0; }
.forecast-item .temp-range { font-size: 0.9rem; font-weight: 600; }

/* Map */
.map-card {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

#main-map {
    flex-grow: 1;
    border-radius: 12px;
    z-index: 1;
}

/* Seismic List */
.seismic-list {
    max-height: 400px;
    overflow-y: auto;
}

.seismic-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid var(--bg-gray);
}

.mag-badge {
    min-width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
}

.mag-low { background: #4caf50; }
.mag-mid { background: #ff9800; }
.mag-high { background: #f44336; }

.seismic-info h4 { font-size: 0.9rem; margin-bottom: 2px; }
.seismic-info p { font-size: 0.75rem; color: var(--text-light); }

/* Footer */
.main-footer {
    background: var(--primary);
    color: white;
    padding: 60px 20px 20px;
    margin-top: 40px;
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand img { height: 50px; margin-bottom: 20px; }
.footer-links h4, .footer-social h4 { margin-bottom: 20px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
.footer-links a { display: block; color: #a0aec0; text-decoration: none; margin-bottom: 10px; }
.tiktok-link { display: flex; align-items: center; gap: 10px; color: #a0aec0; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #718096;
}

/* Responsive */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .grid-layout { grid-template-columns: 1fr; }
    .weather-hero { grid-column: span 1; }
    .forecast-card { grid-column: span 1; }
    .map-card { grid-column: span 1; height: 350px; }
    .seismic-card { grid-column: span 1; }
    .brand-name { font-size: 1.1rem; }
}