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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f6f8;
    color: #333;
    line-height: 1.5;
}

/* Header — solid dark, compact */
header {
    background: #1e293b;
    color: white;
    padding: 16px 20px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0;
}

.header-logo {
    height: 80px;
    width: auto;
    margin: -10px -8px -10px -14px;
}

.header-container h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.header-tagline {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: #94a3b8;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #fff;
}

/* Section Heading */
.section-heading {
    max-width: 960px;
    margin: 16px auto 8px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Bar — sticky, compact */
.filter-container {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #fff;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #334155;
}

.filter-group input[type="text"] {
    width: 160px;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.filter-group input[type="range"] {
    width: 100px;
    accent-color: #3b82f6;
}

/* Earthquake List */
.earthquake-list {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 16px;
}

/* Earthquake Card — compact row */
.earthquake-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
}

.earthquake-card:hover {
    background: #f8fafc;
}

/* Magnitude Badge — small pill, color-coded */
.magnitude-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.magnitude-badge.mag-low { background: #22c55e; }
.magnitude-badge.mag-moderate { background: #eab308; color: #422006; }
.magnitude-badge.mag-high { background: #f97316; }
.magnitude-badge.mag-severe { background: #ef4444; }

/* Card Details */
.card-details {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
}

.card-epicenter {
    flex: 1;
    min-width: 150px;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.card-epicenter a {
    color: #1e293b;
    text-decoration: none;
}

.card-epicenter a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.card-time {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-source {
    flex-shrink: 0;
}

.card-source a {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.card-source a:hover {
    text-decoration: underline;
}

/* No results */
.no-results {
    text-align: center;
    padding: 40px 16px;
    color: #94a3b8;
    font-size: 15px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px;
}

.pagination-container button {
    background: #1e293b;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
}

.pagination-container button:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

.pagination-container button:hover:not(:disabled) {
    background: #334155;
}

#pageInfo {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #94a3b8;
    margin-top: 16px;
}

footer a {
    color: #64748b;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #475569;
}

/* Responsive */
@media (max-width: 640px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .filter-group {
        justify-content: space-between;
    }

    .filter-group input[type="text"] {
        width: 100%;
        flex: 1;
    }

    .earthquake-card {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .card-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .card-time {
        white-space: normal;
    }

    .section-heading {
        padding: 0 12px;
    }

    .earthquake-list {
        padding: 0 12px 12px;
    }
}
