:root {
    --primary-red: #EA0000;
    --primary-blue: #005190;
    --accent-red: #D90845;
    --text-dark: #1A1A1A;
    --text-grey: #666666;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
}

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

body {
    font-family: 'Ubuntu', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-family: 'Lemonada', cursive;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo a {
    text-decoration: none;
    color: var(--text-dark);
}

.logo span {
    color: var(--primary-red);
}

nav {
    display: flex;
    align-items: center;
}

.year-nav {
    display: flex;
    background: #f1f3f5;
    padding: 4px;
    border-radius: 50px;
    margin-right: 1.5rem;
}

.year-nav a {
    margin-left: 0;
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: 50px;
}

.year-nav a.active {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 2px 5px rgba(234, 0, 0, 0.2);
}

nav a {
    text-decoration: none;
    color: var(--text-grey);
    margin-left: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-red);
}

/* Hero Section */
.welcome-section {
    padding: 5rem 0 3rem;
    text-align: center;
}

.welcome-section h1 {
    font-family: 'Lemonada', cursive;
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 1rem;
    animation: slideUp 0.8s ease-out;
}

.welcome-section p {
    font-size: 1.2rem;
    color: var(--text-grey);
    max-width: 700px;
    margin: 0 auto;
}

/* Competition Cards */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

.comp-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.comp-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

.card-visual {
    width: 80px;
    height: 80px;
    background: rgba(234, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-red);
}

.card-visual svg {
    width: 40px;
}

.comp-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.comp-card p {
    color: var(--text-grey);
    margin-bottom: 1.5rem;
}

.btn-sm {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Competition Detail View */
.page-actions {
    padding: 2rem 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-grey);
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-red);
}

.comp-hero {
    background: var(--primary-blue);
    padding: 4rem;
    border-radius: var(--radius);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.comp-hero::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.comp-hero h2 {
    font-family: 'Lemonada', cursive;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.hero-badge {
    background: var(--primary-red);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
}

/* Results Section */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-red);
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.status-indicator {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-grey);
    font-weight: 500;
}

.pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ECC71;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse 2s infinite;
}

/* Table styling */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 5rem;
    border: 1px solid #eee;
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    /* Keeps complex headers/rows on one line */
}

th {
    background: #F1F3F5;
    color: var(--text-dark);
    text-align: left;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #EEE;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid #F1F3F5;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #F8F9FA;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.fadeIn {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Footer */
.site-footer {
    background: var(--white);
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid #EEE;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--text-grey);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1.25rem;
        padding-bottom: 0.5rem;
    }

    nav {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .year-nav {
        margin-right: 0;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px;
    }

    .year-nav a {
        padding: 8px 20px;
    }

    .external-link {
        margin-left: 0 !important;
    }

    .welcome-section {
        padding: 3rem 0 2rem;
    }

    .welcome-section h1 {
        font-size: 2.25rem;
    }

    .comp-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .comp-card {
        padding: 2rem;
    }

    .comp-hero {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem;
        margin-bottom: 2rem;
    }

    .comp-hero h2 {
        font-size: 1.75rem;
    }

    .results-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-box {
        max-width: none;
    }

    .status-indicator {
        justify-content: center;
    }

    .table-card {
        margin-bottom: 3rem;
    }

    td,
    th {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .welcome-section h1 {
        font-size: 1.8rem;
    }

    .logo {
        font-size: 1.2rem;
    }
}