/* CSS RESET & BASE STYLES */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f7fafc;
    overflow-x: hidden;
    width: 100%;
}

/* HEADER & NAVIGATION */
header {
    background-color: #0f172a;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 400;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    padding: 6px 0;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #38bdf8;
    border-bottom: 2px solid #38bdf8;
}

/* MAIN CONTENT CONTAINER */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

h1, h2, h3 {
    color: #0f172a;
    margin-bottom: 16px;
}

h1 { font-size: 1.8rem; border-left: 4px solid #0284c7; padding-left: 12px; }
h2 { font-size: 1.4rem; margin-top: 10px; }

/* HERO SECTION FOR GSC / INDEX */
.hero-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 32px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.hero-section h1 {
    color: #ffffff;
    border-left: 4px solid #38bdf8;
    margin-bottom: 12px;
}

/* INFO GRID & TABLES */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.info-item {
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border-left: 3px solid #0284c7;
}

.info-item strong {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item span {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin: 8px 0;
}

.stat-card .label {
    color: #64748b;
    font-size: 0.9rem;
}

/* RESPONSIVE TABLE TO CARDS */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.responsive-table th, .responsive-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.responsive-table th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 600;
}

/* FOOTER & RANDOM LINKS */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

#random-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

#random-links h3 {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 10px;
}

#random-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

#random-links a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
}

#random-links a:hover {
    text-decoration: underline;
}

/* MOBILE RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #0f172a;
        padding: 16px 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        gap: 12px;
        align-items: flex-start;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu a {
        width: 100%;
        padding: 8px 0;
    }

    /* Table to Card conversion for mobile */
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        margin-bottom: 16px;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        padding: 12px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

    .responsive-table td {
        text-align: right;
        padding: 8px 0;
        position: relative;
        border-bottom: 1px dashed #e2e8f0;
    }

    .responsive-table td:last-child {
        border-bottom: none;
    }

    .responsive-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: #475569;
    }
}
