/* ============================================
   ERROR PAGES STYLES
   ============================================ */

.error-404 {
    padding: 100px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-visual {
    margin-bottom: 3rem;
}

.error-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.8;
}

.error-number {
    font-size: 8rem;
    font-weight: 900;
    color: var(--wapliga-blue);
    line-height: 1;
    margin-bottom: 2rem;
    text-shadow: 0 4px 20px rgba(38, 128, 194, 0.2);
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--wapliga-dark);
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.2rem;
    color: var(--wapliga-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-suggestion {
    margin-bottom: 3rem;
}

.error-suggestion p {
    font-size: 1.1rem;
    color: var(--wapliga-dark);
    font-weight: 500;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--wapliga-blue);
    color: var(--wapliga-white);
    border: 2px solid var(--wapliga-blue);
}

.btn-primary:hover {
    background: var(--wapliga-blue-dark);
    border-color: var(--wapliga-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 128, 194, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--wapliga-blue);
    border: 2px solid var(--wapliga-blue);
}

.btn-secondary:hover {
    background: var(--wapliga-blue);
    color: var(--wapliga-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(38, 128, 194, 0.2);
}

/* Suggested Leagues */
.suggested-leagues {
    margin: 4rem 0;
    padding: 3rem 0;
    border-top: 1px solid var(--wapliga-light-gray);
}

.suggested-leagues h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wapliga-dark);
    margin-bottom: 2rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.suggestion-card {
    background: var(--wapliga-white);
    border: 2px solid var(--wapliga-light-gray);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.suggestion-card:hover {
    border-color: var(--wapliga-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(38, 128, 194, 0.15);
}

.suggestion-sport {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.suggestion-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wapliga-dark);
}

.suggestion-card:hover .suggestion-name {
    color: var(--wapliga-blue);
}

/* Error Details */
.error-details {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wapliga-light-gray);
}

.searched-url {
    font-size: 0.9rem;
    color: var(--wapliga-gray);
}

.url-label {
    font-weight: 500;
    margin-right: 8px;
}

.searched-url code {
    background: var(--wapliga-light-gray);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--wapliga-dark);
}

/* Error CTA Section */
.error-cta {
    background: var(--wapliga-light-gray);
    padding: 80px 0;
    text-align: center;
}

.error-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wapliga-dark);
    margin-bottom: 1rem;
}

.error-cta p {
    font-size: 1.1rem;
    color: var(--wapliga-gray);
    margin-bottom: 2rem;
}

.quick-email-form {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
    justify-content: center;
}

.quick-email-form .email-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--wapliga-light-gray);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--wapliga-white);
    color: var(--wapliga-dark);
    transition: border-color 0.3s ease;
}

.quick-email-form .email-input:focus {
    outline: none;
    border-color: var(--wapliga-blue);
    box-shadow: 0 0 0 3px rgba(38, 128, 194, 0.1);
}

.quick-email-form .submit-btn {
    padding: 15px 25px;
    background: var(--wapliga-orange);
    color: var(--wapliga-white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.quick-email-form .submit-btn:hover {
    background: var(--wapliga-orange-dark);
}

.quick-email-form .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 500 Error Page */
.error-500 {
    padding: 100px 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.error-500 .error-number {
    color: var(--wapliga-red);
}

/* Responsive Error Pages */
@media (max-width: 768px) {
    .error-number {
        font-size: 6rem;
    }

    .error-title {
        font-size: 2rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .quick-email-form {
        flex-direction: column;
        max-width: 300px;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones para error pages */
.error-visual {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.error-message {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.error-actions {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.suggested-leagues {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Estados de hover mejorados */
.suggestion-card {
    position: relative;
    overflow: hidden;
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(38, 128, 194, 0.1), transparent);
    transition: left 0.5s ease;
}

.suggestion-card:hover::before {
    left: 100%;
}

/* Loading states */
.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--wapliga-green);
    border: 1px solid var(--wapliga-green);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--wapliga-red);
    border: 1px solid var(--wapliga-red);
}

/* Accesibilidad mejorada */
.btn:focus,
.suggestion-card:focus {
    outline: 2px solid var(--wapliga-orange);
    outline-offset: 2px;
}

/* Efectos de pulso para llamar la atención */
.btn-primary {
    position: relative;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}/* Variables de colores WapLiga */
:root {
    /* Primarios */
    --wapliga-blue: #2680C2;
    --wapliga-blue-dark: #0F609B;
    --wapliga-blue-light: #84C5F4;

    /* Acentos */
    --wapliga-orange: #F0B429;
    --wapliga-orange-dark: #DE911D;

    /* Neutrales */
    --wapliga-dark: #243B53;
    --wapliga-gray: #627D98;
    --wapliga-light-gray: #F0F4F8;
    --wapliga-white: #FFFFFF;

    /* Estados */
    --wapliga-green: #10B981;
    --wapliga-red: #EF4444;

    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--wapliga-dark);
    background-color: var(--wapliga-white);
}

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

/* Header */
.header {
    background: var(--wapliga-white);
    box-shadow: 0 2px 10px rgba(36, 59, 83, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--wapliga-blue);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--wapliga-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--wapliga-blue);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--wapliga-blue) 0%, var(--wapliga-blue-dark) 100%);
    color: var(--wapliga-white);
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.highlight {
    color: var(--wapliga-orange);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Animación de URL */
.url-animation {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px 30px;
    margin: 3rem auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.4rem;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.url-base {
    color: rgba(255, 255, 255, 0.7);
}

.url-variable {
    color: var(--wapliga-orange);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--wapliga-orange);
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 8px;
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--wapliga-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--wapliga-gray);
    margin-bottom: 4rem;
}

/* How it Works */
.how-it-works {
    padding: 100px 0;
    background: var(--wapliga-light-gray);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.step {
    background: var(--wapliga-white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(36, 59, 83, 0.1);
}

.step-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.step h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--wapliga-dark);
}

.step p {
    color: var(--wapliga-gray);
    font-size: 1.1rem;
}

/* Sports */
.sports {
    padding: 100px 0;
}

.sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.sport-card {
    background: var(--wapliga-white);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    border: 2px solid var(--wapliga-light-gray);
    transition: all 0.3s ease;
}

.sport-card.primary {
    border-color: var(--wapliga-blue);
    background: linear-gradient(135deg, var(--wapliga-blue) 0%, var(--wapliga-blue-dark) 100%);
    color: var(--wapliga-white);
}

.sport-card:hover {
    border-color: var(--wapliga-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(38, 128, 194, 0.2);
}

.sport-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.sport-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.sport-card.primary h3,
.sport-card.primary p {
    color: var(--wapliga-white);
}

/* Leagues */
.leagues {
    padding: 100px 0;
    background: var(--wapliga-light-gray);
}

.leagues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.league-card {
    background: var(--wapliga-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(36, 59, 83, 0.1);
    transition: transform 0.3s ease;
}

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

.league-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.league-sport {
    font-size: 1.1rem;
    font-weight: 500;
}

.league-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.league-status.activa {
    background: var(--wapliga-green);
    color: var(--wapliga-white);
}

.league-status.playoffs {
    background: var(--wapliga-orange);
    color: var(--wapliga-white);
}

.league-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--wapliga-dark);
}

.league-description-card {
    color: var(--wapliga-gray);
    margin-bottom: 20px;
}

.league-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.league-stat {
    text-align: center;
}

.league-stat .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wapliga-blue);
    display: block;
}

.league-stat .stat-label {
    font-size: 0.9rem;
    color: var(--wapliga-gray);
}

.league-link {
    color: var(--wapliga-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.league-link:hover {
    color: var(--wapliga-blue-dark);
}

/* CTA Section */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--wapliga-dark) 0%, #1e293b 100%);
    color: var(--wapliga-white);
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.email-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.email-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--wapliga-white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.email-input:focus {
    outline: none;
    border-color: var(--wapliga-orange);
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.2);
}

.submit-btn {
    padding: 15px 30px;
    background: var(--wapliga-orange);
    color: var(--wapliga-white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: var(--wapliga-orange-dark);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--wapliga-green);
    border: 1px solid var(--wapliga-green);
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--wapliga-red);
    border: 1px solid var(--wapliga-red);
    display: block;
}

.cta-note {
    margin-top: 2rem;
    opacity: 0.8;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--wapliga-dark);
    color: var(--wapliga-white);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-brand p {
    margin-top: 10px;
    opacity: 0.8;
}

.footer-links a {
    color: var(--wapliga-orange);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .form-group {
        flex-direction: column;
    }

    .nav {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.league-card {
    animation: fadeInUp 0.6s ease-out;
}

/* URL Animation específica */
.url-variable {
    position: relative;
    display: inline-block;
    min-width: 200px;
    text-align: left;
}

.url-variable::after {
    content: '|';
    position: absolute;
    right: -5px;
    animation: blink 1s infinite;
    color: var(--wapliga-orange);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states para accesibilidad */
.nav-link:focus,
.email-input:focus,
.submit-btn:focus {
    outline: 2px solid var(--wapliga-orange);
    outline-offset: 2px;
}

/* ============================================
   LEAGUE PAGE STYLES
   ============================================ */

/* League Header */
.league-header {
    background: linear-gradient(135deg, var(--wapliga-blue) 0%, var(--wapliga-blue-dark) 100%);
    color: var(--wapliga-white);
    padding: 60px 0;
}

.league-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.league-main {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
}

.league-icon {
    font-size: 4rem;
    opacity: 0.9;
}

.league-details {
    flex: 1;
}

.league-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.league-description {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.league-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.meta-item strong {
    color: var(--wapliga-orange);
}

.status-activa {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--wapliga-green);
}

.status-playoffs {
    background: rgba(240, 180, 41, 0.2);
    border: 1px solid var(--wapliga-orange);
}

/* League Stats */
.league-stats {
    display: flex;
    gap: 20px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--wapliga-orange);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Team Filter */
.team-filter {
    background: var(--wapliga-light-gray);
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-weight: 600;
    color: var(--wapliga-dark);
    font-size: 1rem;
}

.team-select {
    padding: 10px 15px;
    border: 2px solid var(--wapliga-light-gray);
    border-radius: 8px;
    background: var(--wapliga-white);
    color: var(--wapliga-dark);
    font-size: 1rem;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.team-select:focus {
    outline: none;
    border-color: var(--wapliga-blue);
    box-shadow: 0 0 0 3px rgba(38, 128, 194, 0.1);
}

.clear-btn {
    background: var(--wapliga-gray);
    color: var(--wapliga-white);
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clear-btn:hover {
    background: var(--wapliga-dark);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--wapliga-dark);
    margin-bottom: 2rem;
}

.title-icon {
    font-size: 2.5rem;
}

/* League Table */
.league-table {
    padding: 60px 0;
    background: var(--wapliga-white);
}

.table-wrapper {
    overflow-x: auto;
    background: var(--wapliga-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.standings-table th {
    background: var(--wapliga-blue);
    color: var(--wapliga-white);
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.standings-table td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid var(--wapliga-light-gray);
}

.table-row:hover {
    background: rgba(38, 128, 194, 0.05);
}

.table-row.filtered {
    display: none;
}

/* Table Columns */
.pos-col, .position { width: 60px; }
.team-col { width: 200px; text-align: left !important; }
.matches-col, .matches { width: 60px; }
.wins-col, .wins { width: 60px; }
.losses-col, .losses { width: 60px; }
.goals-col { width: 60px; }
.diff-col { width: 80px; }
.points-col, .points { width: 80px; }

.position {
    font-weight: 700;
}

.pos-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--wapliga-white);
    font-weight: 700;
    font-size: 0.9rem;
}

.pos-1 { background: #FFD700; color: var(--wapliga-dark) !important; }
.pos-2 { background: #C0C0C0; color: var(--wapliga-dark) !important; }
.pos-3 { background: #CD7F32; }
.pos-number:not(.pos-1):not(.pos-2):not(.pos-3) {
    background: var(--wapliga-gray);
}

.team-info {
    text-align: left;
    padding-left: 15px !important;
}

.team-name {
    font-weight: 600;
    color: var(--wapliga-dark);
    font-size: 1rem;
}

.team-short {
    font-size: 0.8rem;
    color: var(--wapliga-gray);
    margin-top: 2px;
}

.goal-diff.positive { color: var(--wapliga-green); font-weight: 600; }
.goal-diff.negative { color: var(--wapliga-red); font-weight: 600; }
.goal-diff.neutral { color: var(--wapliga-gray); }

.points {
    font-weight: 700;
    color: var(--wapliga-blue);
    font-size: 1.1rem;
}

/* Matches Sections */
.upcoming-matches, .match-history {
    padding: 60px 0;
}

.upcoming-matches {
    background: var(--wapliga-light-gray);
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.match-card {
    background: var(--wapliga-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--wapliga-blue);
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.match-card.filtered {
    display: none;
}

.match-card.upcoming {
    border-left-color: var(--wapliga-orange);
}

.match-card.finished {
    border-left-color: var(--wapliga-green);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wapliga-light-gray);
}

.match-date {
    font-weight: 600;
    color: var(--wapliga-dark);
    font-size: 0.95rem;
}

.match-time {
    background: var(--wapliga-blue);
    color: var(--wapliga-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.match-status.finished {
    background: var(--wapliga-green);
    color: var(--wapliga-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.team {
    flex: 1;
    text-align: center;
}

.team.home-team {
    text-align: left;
}

.team.away-team {
    text-align: right;
}

.team-name {
    font-weight: 600;
    color: var(--wapliga-dark);
    font-size: 1rem;
    margin-bottom: 4px;
}

.team-short {
    font-size: 0.8rem;
    color: var(--wapliga-gray);
    text-transform: uppercase;
    font-weight: 500;
}

.match-vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 0 20px;
}

.vs-text {
    font-size: 0.8rem;
    color: var(--wapliga-gray);
    font-weight: 600;
}

.sport-icon {
    font-size: 1.5rem;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 20px;
}

.score {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--wapliga-blue);
    min-width: 30px;
    text-align: center;
}

.score-separator {
    font-size: 1.2rem;
    color: var(--wapliga-gray);
    font-weight: 600;
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--wapliga-gray);
}

.venue, .round {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .league-info {
        flex-direction: column;
        gap: 30px;
    }

    .league-main {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .league-stats {
        justify-content: center;
    }

    .stat-box {
        min-width: 70px;
        padding: 15px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .team-select {
        min-width: auto;
        width: 100%;
    }

    .league-meta {
        justify-content: center;
    }

    .table-wrapper {
        font-size: 0.85rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 10px 5px;
    }

    /* Mobile: remove white card + horizontal scroll from table wrapper */
    .table-wrapper {
        overflow-x: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }

    /* Ensure the custom card layout doesn't trigger overflow */
    .standings-table {
        width: 100%;
        table-layout: fixed;
    }

    /* Standings as cards on mobile */
    .standings-table { display: block; border-collapse: separate; }
    .standings-table thead { display: none; }
    .standings-table tbody { display: block; }

    .standings-table .table-row {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        grid-template-areas:
            "pos team team team team team team"
            "matches wins losses gf ga diff points";
        gap: 8px 12px;
        padding: 12px;
        margin: 10px 0;
        border: 1px solid var(--wapliga-light-gray);
        border-radius: 12px;
        background: var(--wapliga-white);
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    }

    /* Make table cells behave as blocks */
    .standings-table td { display: block; text-align: left; border-bottom: none; padding: 6px 0; }

    /* Top row: position + team */
    .standings-table td.position { grid-area: pos; align-self: center; padding: 0; }
    .standings-table td.team-info { grid-area: team; padding: 0 !important; }

    /* Second/third line stats */
    .standings-table td.matches { grid-area: matches; }
    .standings-table td.wins { grid-area: wins; }
    .standings-table td.losses { grid-area: losses; }
    .standings-table td.goals-for { grid-area: gf; }
    .standings-table td.goals-against { grid-area: ga; }
    .standings-table td.goal-diff { grid-area: diff; }
    .standings-table td.points { grid-area: points; }

    /* Compact tweaks for the top area */
    .standings-table .pos-number { width: 28px; height: 28px; font-size: 0.85rem; }
    .standings-table .team-name { font-size: 1rem; }
    .standings-table .team-short { font-size: 0.75rem; }

    /* Optional subtle labels for clarity (only if you later add data-label attributes) */
    /* .standings-table td:not(.position):not(.team-info)::before { content: attr(data-label); display:block; font-size: 0.72rem; color: var(--wapliga-gray); margin-bottom: 2px; } */

    /* Labels above values for mobile cards */
    .standings-table td { position: relative; }
    .standings-table td::before {
        display: block;
        font-size: 0.72rem;
        line-height: 1;
        color: var(--wapliga-gray);
        margin-bottom: 2px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        content: '';
    }
    /* No labels for top row */
    .standings-table td.position::before,
    .standings-table td.team-info::before { content: none; }

    /* Per-column labels */
    .standings-table td.matches::before { content: 'PJ'; }
    .standings-table td.wins::before { content: 'G'; }
    .standings-table td.losses::before { content: 'P'; }
    .standings-table td.goals-for::before { content: 'GF'; }
    .standings-table td.goals-against::before { content: 'GC'; }
    .standings-table td.goal-diff::before { content: 'Dif'; }
    .standings-table td.points::before { content: 'Pts'; }

    .team-info {
        padding-left: 10px !important;
    }

    .team-name {
        font-size: 0.9rem;
    }

    .matches-grid {
        grid-template-columns: 1fr;
    }

    .match-teams {
        flex-direction: column;
        gap: 10px;
    }

    .team.home-team,
    .team.away-team {
        text-align: center;
    }

    .match-vs,
    .match-score {
        margin: 10px 0;
    }
}

/* Animations */
.table-row {
    transition: all 0.3s ease;
}

.match-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter highlight effect */
.team-select:focus {
    transform: scale(1.02);
}

.clear-btn {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
}

.clear-btn:not([style*="display: none"]) {
    transform: scale(1);
    opacity: 1;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--wapliga-light-gray);
    border-top: 2px solid var(--wapliga-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}