/* Enhanced Match Cards - Premium Styling */

/* ============================================
   MATCH ROW CARDS
   ============================================ */

.match-row {
    background: linear-gradient(145deg, #1a1d2e 0%, #161822 50%, #1e2133 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    margin-bottom: 12px !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

/* Animated top border gradient */
.match-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        #0d66e9 0%, 
        #1a75f5 25%, 
        #00e395 50%, 
        #1a75f5 75%, 
        #0d66e9 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.match-row:hover::before {
    opacity: 1;
}

/* Hover effects */
.match-row:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 12px 32px rgba(13, 102, 233, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(13, 102, 233, 0.4) !important;
}

/* Subtle inner glow */
.match-row::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 102, 233, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.match-row:hover::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   TEAM ELEMENTS
   ============================================ */

.team-logo {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    object-fit: cover;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transition: all 0.3s ease;
    position: relative;
}

.team-logo::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, #0d66e9, #00e395);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-row:hover .team-logo::before {
    opacity: 1;
}

.match-row:hover .team-logo {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 
        0 6px 20px rgba(13, 102, 233, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(13, 102, 233, 0.5) !important;
}

.team-name {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.match-row:hover .team-name {
    color: #e8f4ff !important;
    text-shadow: 0 0 8px rgba(13, 102, 233, 0.3);
}

/* ============================================
   SCORE BADGES
   ============================================ */

.score {
    color: #ffffff !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #0d66e9 0%, #1a75f5 50%, #0d66e9 100%) !important;
    background-size: 200% 100%;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    min-width: 40px !important;
    text-align: center !important;
    box-shadow: 
        0 4px 12px rgba(13, 102, 233, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    font-size: 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: scorePulse 2s ease-in-out infinite;
}

@keyframes scorePulse {
    0%, 100% { 
        box-shadow: 
            0 4px 12px rgba(13, 102, 233, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 6px 16px rgba(13, 102, 233, 0.6),
            0 2px 6px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.score::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.match-row:hover .score::before {
    left: 100%;
}

.match-row:hover .score {
    transform: scale(1.1);
    background-position: 100% 0;
}

/* ============================================
   MATCH TIME & LIVE INDICATORS
   ============================================ */

.match-time {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, rgba(13, 102, 233, 0.2), rgba(13, 102, 233, 0.1)) !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(13, 102, 233, 0.3) !important;
    box-shadow: 
        0 2px 8px rgba(13, 102, 233, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    display: inline-block;
    transition: all 0.3s ease;
}

.match-time.live-match {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.3), rgba(220, 53, 69, 0.2)) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
    box-shadow: 
        0 2px 8px rgba(220, 53, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 12px rgba(220, 53, 69, 0.2) !important;
    position: relative;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { 
        box-shadow: 
            0 2px 8px rgba(220, 53, 69, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            0 0 12px rgba(220, 53, 69, 0.2);
    }
    50% { 
        box-shadow: 
            0 4px 12px rgba(220, 53, 69, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.15),
            0 0 20px rgba(220, 53, 69, 0.4);
    }
}

.match-time.live-match::before {
    content: "●";
    display: inline-block;
    margin-right: 6px;
    animation: blink 1.5s ease-in-out infinite;
    color: #ff4444;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.8);
}

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

/* ============================================
   ODDS BUTTONS
   ============================================ */

.odds-btn {
    background: linear-gradient(145deg, #252836 0%, #1e2029 50%, #252836 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    position: relative;
    overflow: hidden;
    min-width: 90px !important;
    font-weight: 500;
}

/* Shine effect on hover */
.odds-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.odds-btn:hover::before {
    left: 100%;
}

/* Top highlight */
.odds-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.odds-btn:hover::after {
    opacity: 1;
}

.odds-btn:hover {
    background: linear-gradient(145deg, #2e3142 0%, #252836 50%, #2e3142 100%) !important;
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(13, 102, 233, 0.4) !important;
    box-shadow: 
        0 8px 20px rgba(13, 102, 233, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.odds-btn:active {
    transform: translateY(0) scale(0.98);
}

.odds-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
}

.odds-btn:disabled:hover {
    transform: none !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.odds-btn span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.odds-btn strong {
    color: #0d66e9 !important;
    margin-left: 8px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 8px rgba(13, 102, 233, 0.4);
    transition: all 0.3s ease;
}

.odds-btn:hover strong {
    color: #1a88ff !important;
    text-shadow: 0 0 12px rgba(26, 136, 255, 0.6);
    transform: scale(1.05);
}

/* ============================================
   QUESTION NAME
   ============================================ */

.question-name {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
}

.match-row:hover .question-name {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ============================================
   MORE MARKETS BUTTON
   ============================================ */

.text-white.ms-2[style*="cursor: pointer"] {
    color: #ffffff !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    background: linear-gradient(135deg, #00b158 0%, #008f45 100%) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 4px 12px rgba(0, 177, 88, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    position: relative;
    overflow: hidden;
}

.text-white.ms-2[style*="cursor: pointer"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.text-white.ms-2[style*="cursor: pointer"]:hover::before {
    left: 100%;
}

.text-white.ms-2[style*="cursor: pointer"]:hover {
    background: linear-gradient(135deg, #00c561 0%, #00a44f 100%) !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 8px 20px rgba(0, 197, 97, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* ============================================
   TOURNAMENT MATCHES CONTAINER
   ============================================ */

.tournament-matches .match-row {
    margin: 8px 12px !important;
    background: linear-gradient(145deg, rgba(20, 22, 35, 0.8) 0%, rgba(18, 20, 30, 0.8) 100%) !important;
    border-left: 3px solid #0d66e9 !important;
    border-radius: 10px !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 3px 0 0 rgba(13, 102, 233, 0.3) !important;
}

.tournament-matches .match-row:hover {
    border-left-color: #1a88ff !important;
    box-shadow: 
        0 8px 20px rgba(13, 102, 233, 0.3),
        inset 3px 0 0 rgba(26, 136, 255, 0.5) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .match-row {
        padding: 14px 16px !important;
        margin-bottom: 10px !important;
    }

    .team-logo {
        width: 28px !important;
        height: 28px !important;
    }

    .odds-btn {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
        min-width: 75px !important;
    }

    .odds-btn strong {
        font-size: 0.95rem !important;
    }

    .score {
        padding: 5px 12px !important;
        font-size: 0.9rem !important;
    }

    /* Mobile layout adjustments to match desktop style */
    .match-row .d-flex.flex-column {
        gap: 0;
    }

    .match-row .teams-section {
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    .match-row .markets-section {
        width: 100% !important;
    }

    /* Ensure mobile cards maintain desktop styling */
    .match-row.d-block.d-sm-none {
        background: linear-gradient(145deg, #1a1d2e 0%, #161822 50%, #1e2133 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        box-shadow: 
            0 4px 16px rgba(0, 0, 0, 0.2),
            0 1px 3px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    /* Mobile market options spacing */
    .match-row .market-options {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .match-row .market-options .odds-btn {
        flex: 1;
        min-width: calc(33.333% - 6px);
    }

    /* Ensure more markets button is styled consistently on mobile */
    .match-row .text-white.ms-2[style*="cursor: pointer"] {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 40px !important;
        padding: 8px 12px !important;
    }
}

@media (max-width: 480px) {
    .match-row {
        padding: 12px 14px !important;
        border-radius: 10px !important;
    }

    .odds-btn {
        padding: 8px 10px !important;
        min-width: 70px !important;
    }

    .team-name {
        font-size: 0.85rem !important;
    }

    /* Smaller mobile - adjust market buttons */
    .match-row .market-options .odds-btn {
        min-width: calc(50% - 4px);
        font-size: 0.8rem !important;
    }

    .match-row .market-options {
        gap: 6px !important;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .match-row,
    .odds-btn,
    .team-logo,
    .score {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus states for keyboard navigation */
.odds-btn:focus-visible {
    outline: 2px solid #0d66e9;
    outline-offset: 2px;
}

.match-row:focus-within {
    border-color: rgba(13, 102, 233, 0.6) !important;
}

