@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700;900&display=swap');

/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #F5F5DC;      /* Cream Canvas */
    --bg-secondary: #FFD93D;    /* Vivid Yellow Accent */
    --surface: #FFFFFF;         /* Solid White Card */
    --foreground: #111111;      /* Heavy Black Ink */
    --accent-primary: #FF6B6B;   /* Hot Red Action */
    --accent-secondary: #C4B5FD; /* Soft Lavender Block */
    --accent-tertiary: #FFD93D;  /* Golden Accent */
    --border: #111111;          /* Uncompromising Black Outline */
    --text-primary: #111111;
    --text-secondary: #222222;
    --shadow: 8px 8px 0px 0px #111111;
    --shadow-sm: 4px 4px 0px 0px #111111;
    --shadow-lg: 12px 12px 0px 0px #111111;
    --transition: all 0.1s ease-out;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    background-image: radial-gradient(#111111 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    color: var(--text-primary);
    line-height: 1.4;
    padding-bottom: 0;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--foreground);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(32px, 6vw, 64px);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(24px, 4vw, 42px);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(20px, 3vw, 28px);
}

a {
    color: var(--foreground);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

/* Layout Elements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background-color: var(--surface);
    border-bottom: 8px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    font-weight: 900;
    font-size: 26px;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--accent-secondary);
    border: 4px solid var(--border);
    padding: 6px 16px;
    box-shadow: var(--shadow-sm);
    transform: rotate(-1deg);
}

.logo:hover {
    transform: rotate(1deg) scale(1.02);
    box-shadow: 6px 6px 0px 0px #111111;
}

.logo img {
    height: 32px;
    width: auto;
    filter: brightness(0); /* High contrast silhouette styling */
}

.nav-menu {
    display: flex;
    gap: 16px;
    list-style: none;
}

.nav-link {
    font-weight: 900;
    text-transform: uppercase;
    color: var(--foreground);
    font-size: 14px;
    padding: 8px 16px;
    border: 4px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--accent-tertiary);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    transform: translate(-2px, -2px);
}

.nav-link.active {
    background-color: var(--accent-primary);
    color: #ffffff;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: var(--accent-tertiary);
    border: 4px solid var(--border);
    font-size: 24px;
    font-weight: 900;
    color: var(--foreground);
    cursor: pointer;
    padding: 8px 14px;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background-color: var(--accent-secondary);
    border-bottom: 8px solid var(--border);
    position: relative;
    overflow: hidden;
}

/* Background grid motif for hero */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 30px 30px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    pointer-events: none;
}

.hero-tag {
    display: inline-block;
    background-color: var(--accent-tertiary);
    border: 4px solid var(--border);
    color: var(--foreground);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 8px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transform: rotate(1deg);
}

.hero h1 {
    font-size: clamp(36px, 7vw, 72px);
    color: var(--foreground);
    max-width: 950px;
    margin: 0 auto 24px auto;
    text-shadow: 4px 4px 0px var(--surface);
    -webkit-text-stroke: 1px var(--border);
}

.hero p {
    font-size: 20px;
    font-weight: 700;
    color: var(--foreground);
    max-width: 700px;
    margin: 0 auto 36px auto;
    background: var(--surface);
    border: 4px solid var(--border);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 900;
    border-radius: 0px; /* Absolutely sharp */
    text-transform: uppercase;
    border: 4px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--accent-primary);
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px 0px #111111;
}

.btn-primary:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--foreground);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background-color: var(--accent-tertiary);
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px 0px #111111;
}

.btn-secondary:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Home Highlights */
.highlights-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 80px 0;
}

.main-content-card {
    background-color: var(--surface);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 40px;
    box-shadow: var(--shadow);
}

.sidebar-card {
    background-color: var(--accent-tertiary);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 40px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.section-title-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    border-bottom: 4px solid var(--border);
    padding-bottom: 16px;
}

.section-title-area h2 {
    font-size: 32px;
}

/* Contender Cards & List */
.contender-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.contender-card {
    background-color: var(--surface);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 24px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.contender-card:hover {
    transform: translate(-4px, -4px) rotate(-1deg);
    box-shadow: var(--shadow);
    background-color: var(--bg-primary);
}

.contender-rank {
    font-size: 14px;
    font-weight: 900;
    background-color: var(--accent-secondary);
    border: 2px solid var(--border);
    padding: 2px 8px;
    align-self: flex-start;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.contender-name {
    font-size: 24px;
    font-weight: 900;
    color: var(--foreground);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.contender-stat {
    margin-top: auto;
    font-size: 15px;
    font-weight: 700;
    border-top: 2px dashed var(--border);
    padding-top: 8px;
}

.contender-stat strong {
    font-size: 20px;
    color: var(--accent-primary);
    background-color: #111111;
    color: #ffffff;
    padding: 2px 6px;
}

/* Host Nation Module */
.host-module {
    margin-top: 48px;
    background-color: var(--accent-secondary);
    padding: 32px;
    border: 4px solid var(--border);
    box-shadow: var(--shadow-sm);
    transform: rotate(0.5deg);
}

.host-module h3 {
    margin-bottom: 12px;
}

.host-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.host-tag {
    background: var(--surface);
    padding: 10px 18px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 900;
    border: 4px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 4px solid var(--border);
    border-radius: 0;
    background-color: var(--surface);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.prob-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
}

.prob-table th {
    background-color: var(--accent-secondary);
    color: var(--foreground);
    font-weight: 900;
    text-transform: uppercase;
    padding: 18px 20px;
    border-bottom: 4px solid var(--border);
    white-space: nowrap;
}

.prob-table td {
    padding: 16px 20px;
    border-bottom: 4px solid var(--border);
    color: var(--foreground);
    font-weight: 700;
    white-space: nowrap;
}

.prob-table tbody tr:last-child td {
    border-bottom: none;
}

.prob-table tbody tr:hover {
    background-color: var(--accent-tertiary);
}

.prob-table td.strong {
    font-weight: 900;
    font-size: 17px;
}

.prob-table td.highlight {
    font-weight: 900;
    background-color: rgba(255, 107, 107, 0.15);
    color: var(--accent-primary);
}

/* Search and Filters */
.search-filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 280px;
    padding: 16px 20px;
    border: 4px solid var(--border);
    border-radius: 0;
    font-size: 16px;
    font-weight: 700;
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    background-color: var(--accent-tertiary);
    box-shadow: var(--shadow);
}

.select-filter {
    padding: 16px 20px;
    border: 4px solid var(--border);
    border-radius: 0;
    font-size: 16px;
    font-weight: 900;
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    min-width: 180px;
}

.select-filter:focus {
    outline: none;
    background-color: var(--accent-tertiary);
}

/* Country Grid (48 Countries) */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.country-card {
    background-color: var(--surface);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.country-card:hover {
    transform: translate(-4px, -4px) rotate(1deg);
    box-shadow: 12px 12px 0px 0px #111111;
}

.country-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 4px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.country-rank-badge {
    background-color: var(--accent-secondary);
    color: var(--foreground);
    font-size: 14px;
    font-weight: 900;
    padding: 6px 12px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.country-name-group h3 {
    font-size: 26px;
    margin-bottom: 6px;
}

.country-group-label {
    font-size: 13px;
    font-weight: 900;
    background-color: var(--accent-tertiary);
    padding: 4px 8px;
    border: 2px solid var(--border);
    text-transform: uppercase;
}

.country-stats-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.c-stat-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    padding: 10px;
    border: 2px solid var(--border);
}

.c-stat-label {
    font-size: 11px;
    font-weight: 900;
    color: var(--foreground);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.c-stat-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--foreground);
}

.c-stat-value.odds {
    color: var(--accent-primary);
}

/* Group Standings (A-L Grid) */
.groups-outer-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.group-block {
    background-color: var(--surface);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 32px;
    box-shadow: var(--shadow);
}

.group-block h3 {
    font-size: 26px;
    border-bottom: 4px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-block h3 span {
    font-size: 13px;
    font-family: 'Space Grotesk', sans-serif;
    background: var(--accent-secondary);
    border: 2px solid var(--border);
    padding: 2px 8px;
    font-weight: 900;
}

.group-team-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.group-team-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 3px solid var(--border);
    border-radius: 0;
    transition: var(--transition);
}

.group-team-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-sm);
    background-color: var(--accent-tertiary);
}

.group-team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-team-rank {
    font-size: 12px;
    background-color: var(--foreground);
    color: var(--surface);
    padding: 4px 8px;
    font-weight: 900;
}

.group-team-name {
    font-weight: 900;
    font-size: 16px;
}

.group-team-chance {
    text-align: right;
}

.group-team-chance span {
    font-size: 11px;
    font-weight: 900;
    color: var(--foreground);
    display: block;
    line-height: 1;
    text-transform: uppercase;
}

.group-team-chance strong {
    font-size: 18px;
    color: var(--accent-primary);
}

/* Guide Section */
.guide-container {
    max-width: 850px;
    margin: 60px auto 100px auto;
    background-color: var(--surface);
    border: 4px solid var(--border);
    border-radius: 0;
    padding: 48px;
    box-shadow: var(--shadow);
}

.guide-container h2 {
    font-size: 42px;
    margin-bottom: 32px;
    border-bottom: 4px solid var(--border);
    padding-bottom: 16px;
}

.guide-section {
    margin-bottom: 48px;
}

.guide-section h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--foreground);
    background-color: var(--accent-secondary);
    display: inline-block;
    padding: 4px 12px;
    border: 2px solid var(--border);
}

.guide-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 17px;
    font-weight: 700;
}

.guide-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.guide-badge {
    background-color: var(--accent-tertiary);
    border: 3px solid var(--border);
    border-radius: 0;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

/* Footer & Address Block */
footer {
    background-color: var(--foreground);
    border-top: 8px solid var(--border);
    padding: 80px 0;
    color: var(--surface);
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 28px;
    color: var(--accent-tertiary);
    margin-bottom: 24px;
}

.footer-brand p {
    margin-bottom: 24px;
    max-width: 420px;
    line-height: 1.5;
    color: #cccccc;
}

.footer-links h4, .footer-address h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--accent-secondary);
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ffffff;
}

.footer-links a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 4px solid var(--accent-secondary);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-address p {
    margin-bottom: 12px;
    line-height: 1.4;
    color: #cccccc;
}

/* Responsive Utilities */
@media (max-width: 992px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 42px;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: var(--surface);
        border-bottom: 8px solid var(--border);
        padding: 32px;
        gap: 20px;
        box-shadow: var(--shadow);
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-link {
        display: block;
        text-align: center;
        font-size: 18px;
    }
    .mobile-menu-btn {
        display: block;
    }
    .contender-grid {
        grid-template-columns: 1fr;
    }
    .guide-container {
        padding: 32px 24px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}