/* --- Global Reset & Body --- */
*, *:before, *:after { box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; line-height: 1.7; color: #1a1a1a; max-width: 900px; margin: 0 auto; padding: 0 15px 20px 15px; background-color: #ffffff; }

/* --- Accessibility --- */
.skip-to-content { position: absolute; top: -100px; left: 0; background: #00205B; color: white !important; padding: 10px 20px; z-index: 2000; text-decoration: none; font-weight: bold; transition: top 0.3s ease; }
.skip-to-content:focus { top: 0; outline: 2px solid #fff; }

/* --- Header & Nav --- */
header { background-color: #00205B; padding: 10px 0; position: sticky; top: 0; width: 100%; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 40px; }
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 900px; margin: 0 auto; padding: 0 15px; }
#logo { 
    max-height: 60px;     /* Prevents it from getting too big on desktop */
    max-width: 100%;      /* Forces it to scale down safely on small mobile screens */
    height: auto;         /* Overrides explicit HTML height attributes to preserve aspect ratio */
    display: block; 
    object-fit: contain;  /* Keeps the image perfectly proportioned inside its bounds */
}
.nav-menu { display: flex; list-style: none; gap: 25px; margin: 0; padding: 0; }
.nav-menu li a { color: #ffffff; text-decoration: none; font-weight: 600; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; }

/* --- Mobile Menu --- */
.mobile-menu-icon { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 21px; cursor: pointer; }
.mobile-menu-icon span { display: block; width: 100%; height: 3px; background-color: #ffffff; border-radius: 3px; }
@media (max-width: 992px) {
    .mobile-menu-icon { display: flex; }
    .nav-menu { position: absolute; top: 80px; right: -100%; flex-direction: column; background-color: #00205B; width: 100%; padding: 20px 15px; visibility: hidden; transition: 0.4s ease-in-out; }
    .nav-menu.active { right: 0; visibility: visible; }
}

/* --- Standings Styles (No Logos) --- */
.standings-container { padding: 10px 0; }
.table-responsive { overflow-x: auto; margin-top: 20px; border-radius: 8px; }
#nhl-standings-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    font-size: 0.95rem;
    display: none; /* JavaScript will toggle this to 'table' */
    animation: fadeIn 0.4s ease-in;
}

#nhl-standings-table th { background-color: #00205B; color: white; padding: 12px; text-align: left; }
#nhl-standings-table td { padding: 12px 10px; border-bottom: 1px solid #eee; }
#nhl-standings-table tr:nth-child(even) { background-color: #f9f9f9; }

/* Highlight Toronto Maple Leafs (TOR) */
.leafs-highlight td { 
    background-color: #00205B !important; 
    color: #ffffff !important; 
    font-weight: bold; 
}

.leafs-highlight strong {
    color: #ffffff !important; /* Force the bold team name to white */
}

/* --- Loading Animation --- */
#loading-message { 
    text-align: center; padding: 50px; 
    background: linear-gradient(90deg, #f3f3f3 25%, #e9e9e9 50%, #f3f3f3 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    color: #00205B; font-weight: bold;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Add these mobile-specific optimizations */
@media (max-width: 600px) {
    #nhl-standings-table {
        font-size: 0.8rem; /* Smaller text = faster rendering */
    }
    #nhl-standings-table td, #nhl-standings-table th {
        padding: 8px 4px; /* Less padding = less 'math' for the phone */
    }
    /* Hide the Streak column on very small phones to save space/time */
    #nhl-standings-table th:last-child, 
    #nhl-standings-table td:last-child {
        display: none;
    }
}

/* Ensure Toronto stands out with zero lag */
.leafs-highlight {
    background-color: #00205B !important;
    color: #ffffff !important;
}
/* --- 6. Content & Typography --- */
section {
    margin-bottom: 5px; 
    padding: 5px 0;
}

h1, h2, h3 { 
    color: #00205B; 
    margin-bottom: 20px;
    word-wrap: break-word;
}

p {
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.cta-btn { 
    background: #00205B; 
    color: white !important; 
    padding: 12px 24px; 
    text-decoration: none; 
    border-radius: 5px; 
    display: inline-block;
    font-weight: bold;
}

footer { 
    margin-top: 80px; 
    padding: 40px 15px;
    border-top: 1px solid #eee;
    text-align: center; 
}