/* Modern Tournament Grouping Styles */

.tournament-group {
    background: linear-gradient(135deg, #1e2235, #171a28);
    border-radius: 12px;
    margin-bottom: 12px; /* Reduced from 20px */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    position: relative;
}

.tournament-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Desktop Tournament Header */
.tournament-header {
    padding: 10px 14px; /* Reduced from 14px 18px */
    background: linear-gradient(
        90deg,
        rgba(13, 102, 233, 0.08),
        rgba(0, 0, 0, 0)
    );
    border-bottom: 1px solid rgba(13, 102, 233, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.tournament-header:hover {
    background: linear-gradient(
        90deg,
        rgba(13, 102, 233, 0.15),
        rgba(0, 0, 0, 0)
    );
}

.tournament-header::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #0d66e9;
    box-shadow: 0 0 8px rgba(13, 102, 233, 0.6);
}

.tournament-name {
    font-size: 0.95rem; /* Slightly smaller */
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.tournament-icon {
    margin-right: 10px;
    width: 20px; /* Reduced from 24px */
    height: 20px; /* Reduced from 24px */
    background-color: rgba(13, 102, 233, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(13, 102, 233, 0.4);
}

.tournament-chevron {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #0d66e9;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tournament-chevron.open {
    transform: rotate(90deg);
}

/* The rotating chevron icon */
.fas.fa-chevron-right,
.fas.fa-chevron-down {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #0d66e9;
    font-size: 14px;
}

.fas.fa-chevron-down {
    transform: rotate(0deg);
}

.tournament-header:hover .fas {
    color: #1a88ff;
}

.match-count {
    background-color: rgba(13, 102, 233, 0.2);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 3px 8px; /* Reduced vertical padding */
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.match-count i {
    font-size: 10px;
}

.tournament-matches {
    padding: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
}

/* Animation for tournament collapsing */
.collapse-enter-active,
.collapse-leave-active {
    transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

.collapse-enter-from,
.collapse-leave-to {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
}

/* Match row adjustments within tournaments */
.tournament-matches .match-row {
    margin: 6px 8px; /* Further reduced vertical margin */
    background-color: rgba(20, 22, 33, 0.6);
    border-radius: 8px;
    border-left: 2px solid #0d66e9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tournament-matches .match-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile Tournament Styles */
.mobile-tournament-header {
    background: linear-gradient(
        90deg,
        rgba(13, 102, 233, 0.08),
        rgba(0, 0, 0, 0)
    );
    padding: 8px 10px; /* Further reduced padding */
    border-radius: 8px;
    margin-bottom: 6px; /* Further reduced margin */
    position: relative;
    border: 1px solid rgba(13, 102, 233, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-tournament-header::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #0d66e9;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* Match Card Styling */
.modern-match-card {
    border-radius: 8px; /* Reduced radius */
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(180deg, #1a2133 0%, #131824 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 6px; /* Further reduced from 8px */
}

.modern-match-card:hover {
    transform: translateY(-1px); /* Reduced from -2px for subtler effect */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.modern-match-card .card-body {
    padding: 8px 10px; /* Increased padding for better spacing with larger text */
    background: transparent !important;
}

/* Team Names */
.team-name {
    font-weight: 500;
    font-size: 0.8rem; /* Further reduced from 0.85rem */
    color: #fff;
    line-height: 1.1; /* Tighter line height */
    max-width: 160px; /* Prevent very long team names from breaking layout */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Team Containers */
.teams-section .d-flex {
    margin-bottom: 2px !important; /* Further reduced margin */
}

/* Team Logos */
.team-logo {
    width: 18px; /* Further reduced from 20px */
    height: 18px; /* Further reduced from 20px */
    object-fit: contain;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2px;
}

/* Match Time */
.match-time {
    font-size: 0.7rem; /* Further reduced from 0.75rem */
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(13, 102, 233, 0.15);
    padding: 2px 5px; /* Further reduced padding */
    border-radius: 3px;
}

/* Match Count Badge */
.match-badge {
    background-color: rgba(13, 102, 233, 0.2);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 5px; /* Further reduced padding */
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.match-badge i {
    font-size: 7px;
    margin-right: 3px; /* Reduced from 4px */
}

/* Market Options Container */
.market-options {
    display: flex;
    gap: 5px; /* Increased for larger buttons */
    justify-content: space-between;
    margin-top: 5px; /* Slightly increased margin */
    flex-wrap: nowrap; /* Prevent wrapping */
}

/* Odds Button Enhancement */
.odds-btn {
    background: linear-gradient(180deg, #1e2a3e 0%, #131a26 100%);
    border: 1px solid rgba(13, 102, 233, 0.1);
    border-radius: 4px; /* Reduced border radius */
    padding: 4px 8px; /* Increased padding for more space */
    color: white;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row; /* Changed from column to row */
    align-items: center;
    justify-content: space-between; /* Space between name and odds */
    min-width: 80px; /* Increased for larger text */
    height: 28px; /* Increased height for larger text */
}

.odds-btn:hover {
    transform: none; /* Removed movement for cleaner hover */
    background: linear-gradient(180deg, #233144 0%, #181f2d 100%);
    border-color: rgba(13, 102, 233, 0.3);
}

.odds-btn span {
    font-size: 0.85rem; /* Increased from 0.7rem */
    line-height: 1.1;
    text-align: left;
    flex: 1; /* Allow text to use available space */
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 6px; /* Increased space between text and odds */
}

.odds-btn strong {
    color: #0d66e9;
    font-weight: 700;
    font-size: 0.95rem; /* Significantly increased from 0.8em */
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
}

/* Question Name Styling */
.question-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem; /* Further reduced from 0.85rem */
    font-weight: 500;
    margin-bottom: 3px; /* Further reduced margin */
    line-height: 1.1; /* Tighter line height */
}

/* Responsive adjustments for odds buttons */
@media (max-width: 420px) {
    .odds-btn {
        min-width: 70px; /* Increased from 60px */
        padding: 4px 6px; /* Increased padding */
    }

    .odds-btn span {
        margin-right: 4px; /* Increased margin */
        font-size: 0.8rem; /* Increased from 0.65rem */
    }

    .odds-btn strong {
        font-size: 0.9rem; /* Adjusted for better balance */
    }
}
