/* Champions League Container */
.champions-league-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

/* Header Styles */
.champions-league-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 2rem;
}

.champions-league-logo {
    width: 120px;
    height: 120px;
    background: #37003C;
    border-radius: 50%;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(26, 62, 140, 0.3);
}

.champions-league-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(2.5);
}

.champions-league-title h2 {
    font-size: 2rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.champions-league-title p {
    font-size: 1.1rem;
    color: #FFD700;
    margin: 0.5rem 0 0;
}

/* Content Section */
.champions-league-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Groups Section */
.champions-league-groups {
    width: 100%;
}

.groups-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.group h4 {
    color: #FFD700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
}

/* Table Container */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--card-shadow);
    position: relative;
}

.table-container::after {
    content: '→';
    position: absolute;
    right: 10px;
    bottom: 10px;
    color: var(--accent-color);
    font-size: 1.2rem;
    opacity: 0.7;
    pointer-events: none;
    animation: bounce 2s infinite;
    display: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(-5px);
    }
    60% {
        transform: translateX(-3px);
    }
}

/* Standings Table Styles */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    min-width: 800px;
}

.standings-table th,
.standings-table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    text-align: left;
    padding-left: 1rem;
}

.standings-table th {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0.75rem;
}

/* Semi-final qualification highlighting */
.standings-table tr:nth-child(1),
.standings-table tr:nth-child(2) {
    background: rgba(0, 255, 135, 0.1);
}

.table-legend {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: rgba(0, 255, 135, 0.1);
}

.legend-text {
    color: var(--text-color);
}

.standings-table tr:hover {
    background-color: var(--hover-color);
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    text-align: left;
    min-width: 180px;
}

.standings-table .team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-table .team-name {
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    font-size: 0.9rem;
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar {
    height: 4px;
    display: none;
}

.table-container:hover::-webkit-scrollbar {
    display: block;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* Show scrollbar only on small screens */
@media (min-width: 768px) {
    .table-container::-webkit-scrollbar {
        display: none;
    }
}

/* Remove the scroll indicator arrow */
.table-container::after {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .champions-league-container {
        padding: 1.5rem;
    }

    .groups-container {
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .groups-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .champions-league-container {
        padding: 1rem;
    }

    .champions-league-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .champions-league-logo {
        width: 80px;
        height: 80px;
    }

    .champions-league-title h2 {
        font-size: 1.75rem;
    }

    .group {
        padding: 1rem;
        margin: 0 1rem;
    }

    .table-container {
        margin: 1rem;
        padding: 0.5rem;
    }

    .standings-table {
        min-width: 600px;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .standings-table .team-cell {
        min-width: 160px;
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .standings-table .team-name {
        max-width: 120px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .champions-league-container {
        padding: 0.75rem;
    }

    .champions-league-title h2 {
        font-size: 1.5rem;
    }

    .champions-league-title p {
        font-size: 1rem;
    }

    .group h4 {
        font-size: 1.1rem;
    }

    .group {
        padding: 0.75rem;
        margin: 0 0.75rem;
    }

    .table-container {
        margin: 0.75rem;
        padding: 0.25rem;
    }

    .standings-table {
        min-width: 500px;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .standings-table .team-cell {
        min-width: 140px;
        padding: 0.4rem;
    }

    .standings-table .team-name {
        max-width: 100px;
        font-size: 0.8rem;
    }
}
