/* THE MAGIC RULE: Keeps all boxes behaving */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- RETRO VARIABLES --- */
:root {
    --bg-color: #ffd1dc;
    --box-bg: #ffffff;        /* White paper look */
    --team-pink: #ff00aa;     /* Hot Pink */
    --text-main: #000000;
    --border-style: 2px solid var(--text-main);
}

body {
    background-color: var(--bg-color);
    font-family: 'Courier New', Courier, monospace; /* The "Typewriter" look */
    margin: 0;
    padding: 20px;
    color: var(--text-main);
}

/* --- THE BOXED LAYOUT --- */
.main-container {
    max-width: 900px;
    margin: 0 auto; /* Centers the box */
    background-color: var(--box-bg);
    border: var(--border-style);
    padding: 20px;
}

/* --- HEADER --- */
header {
    text-align: center;
    border-bottom: 2px solid black;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background-color: #000;
    color: var(--team-pink);
    border: 2px dashed var(--team-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    border-radius: 50%; /* Makes it circular */
    font-weight: bold;
}

.team-logo {
    width: 220px;  /* Desktop size */
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.tagline {
    margin-top: 5px;
    font-style: italic;
    color: var(--team-pink);
    font-weight: bold;
}

/* --- CONTENT WRAPPER (Sidebar + Main) --- */
.content-wrapper {
    display: flex;
    gap: 20px;
}

/* --- SIDEBAR --- */
aside.sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: #fff0f5; 
    border-right: 2px solid black; /* Solid black line separator */
    padding: 15px;
}

aside h3 {
    background-color: var(--team-pink);
    color: white;
    padding: 5px;
    margin-top: 0;
    text-align: center;
}

nav ul {
    list-style-type: none; /* Removes bullet points */
    padding: 0;
}

nav ul li {
    margin-bottom: 10px;
}

nav ul li a {
    display: block;
    text-decoration: none;
    color: black;
    background: white;
    border: 1px solid black;
    padding: 8px;
    transition: 0.2s;
    font-weight: bold;
}

/* Hover effect for links */
nav ul li a:hover {
    background-color: var(--team-pink); /* The hot pink "pop" */
    color: white;
    border-color: black;
}

.sidebar-widget {
    margin-top: 30px;
    border: 2px dotted black;
    padding: 10px;
    text-align: center;
}

/* --- MAIN BLOG AREA --- */
main.blog-post {
    flex-grow: 1;
    padding: 0 10px;
}

h2 {
    border-bottom: 1px solid black;
    padding-bottom: 5px;
    color: var(--team-pink);
}

.date {
    font-size: 0.8rem;
    color: #666;
    margin-top: -10px;
    margin-bottom: 20px;
}

hr {
    border: 0;
    border-top: 1px dashed black;
    margin: 20px 0;
}

/* --- FOOTER --- */
footer {
    margin-top: 20px;
    border-top: var(--border-style);
    text-align: center;
    padding-top: 10px;
    font-size: 0.8rem;
}

/* --- BUTTON STYLES (Default: Hidden on Desktop) --- */
.mobile-menu-btn {
    display: none; /* We don't need this button on big screens */
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    
    /* 1. Main Container adjustments */
    .main-container {
        width: 95%;
        padding: 10px;
        margin: 10px auto;
    }

    /* 2. Stack the layout */
    .content-wrapper {
        flex-direction: column;
    }

    /* 3. SHOW the Menu Button on Mobile */
    .mobile-menu-btn {
        display: block; /* Now we see it */
        width: 100%;
        padding: 12px;
        background-color: var(--team-pink); /* Hot pink button */
        color: white;
        border: 2px solid black;
        font-family: 'Courier New', Courier, monospace;
        font-weight: bold;
        text-transform: uppercase;
        cursor: pointer;
        margin-bottom: 15px;
        font-size: 1rem;
    }

    .mobile-menu-btn:hover {
        background-color: black;
        color: var(--team-pink);
    }

    /* 4. HIDE the Sidebar by default on Mobile */
    aside.sidebar {
        display: none; /* Invisible! */
        width: 100%;
        border-right: none;
        border-bottom: 2px solid black;
        margin-bottom: 20px;
        background-color: #fff0f5;
    }

    /* 5. The 'Open' State - This class is added by JS */
    aside.sidebar.open {
        display: block !important;/* Visible! */
    }

    .team-logo { width: 100px; }
}

/* --- SORTABLE TABLES --- */
table.stats-table th {
    cursor: pointer; /* Shows hand icon */
    user-select: none; /* Prevents highlighting text when clicking quickly */
    position: relative; 
}

table.stats-table th:hover {
    background-color: #ddd; /* Highlight on hover */
}

/* The arrow indicator */
.sort-icon {
    font-size: 0.8em;
    margin-left: 5px;
    opacity: 0.5;
}

.sort-icon.active {
    opacity: 1;
    color: var(--team-pink);
}


/* --- MATCH RESULT COLORS --- */
.match-card.win-bg {
    border-left: 8px solid #008000; /* Green Left Border */
}
.match-card.draw-bg {
    border-left: 8px solid #ffc107; /* Yellow Left Border */
}
.match-card.loss-bg {
    border-left: 8px solid #cc0000; /* Red Left Border */
}

/* --- PALMARES / TROPHY ROOM --- */

.trophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.trophy-card {
    background-color: white;
    border: 3px solid black;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
    position: relative;
}

.trophy-card:hover {
    transform: translateY(-5px);
}

/* Big Emoji Icon */
.trophy-icon {
    font-size: 4rem; 
    margin-bottom: 10px;
    display: block;
}

/* Text Styles */
.trophy-count {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.trophy-card h3 {
    margin: 10px 0;
    font-size: 1.4rem;
}

.season-list {
    font-family: 'Courier New', Courier, monospace;
    color: #555;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* --- COLOR THEMES --- */

/* Gold Styling */
.gold-tier {
    border-color: #daa520; /* Goldenrod */
    box-shadow: 8px 8px 0px #daa520;
}
.gold-tier .trophy-count {
    color: #daa520;
    background: #fff8e1; /* Light yellow bg */
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #daa520;
}

/* Silver Styling */
.silver-tier {
    border-color: #7f8c8d; /* Silver/Grey */
    box-shadow: 8px 8px 0px #7f8c8d;
}
.silver-tier .trophy-count {
    color: #7f8c8d;
    background: #f0f0f0; /* Light grey bg */
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #7f8c8d;
}

/* Divider line inside card */
.divider {
    border: 0;
    border-top: 1px dashed #ccc;
    margin: 15px 0;
}

/* --- GALLERY GRID --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border: 2px solid black;
    background: white;
    padding: 5px;
    transition: transform 0.2s;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: var(--team-pink);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px; /* Fixed height for uniformity */
    object-fit: cover; /* Crops image nicely */
    display: block;
}

/* --- LIGHTBOX (Popup) --- */
.lightbox {
    display: none; /* Hidden */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9); /* Dark overlay */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--team-pink);
}

/* --- LIGHTBOX NAVIGATION --- */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    user-select: none;
    z-index: 10001; /* Above image */
}

/* Position them on sides */
.prev { left: 0; border-radius: 0 3px 3px 0; }
.next { right: 0; border-radius: 3px 0 0 3px; }

/* Hover effect */
.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--team-pink);
}

/* Fix for mobile to prevent overlapping */
@media (max-width: 600px) {
    .prev, .next { font-size: 30px; padding: 10px; }
    .lightbox-content { max-width: 95%; }
}