/* =========================================
   ENTERPRISE-GRADE MATCH DETAILS STYLES
   ========================================= */

/* Match Details Container */
.match-detail-page {
    /* Remove special background to match homepage layout */
    background: transparent;
    min-height: auto;
}

/* ==================== Match Hero Section ==================== */
.match-detail-hero {
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    overflow-x: hidden;
    /* Vibrant stadium grass background */
    background: url('/images/stadium-grass.svg') no-repeat center center;
    background-size: cover;
    /* Ensure it doesn't exceed main content area */
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    /* Prevent horizontal overflow */
    margin-left: 0;
    margin-right: 0;
}

/* Semi-transparent overlay - less dark for more vibrancy */
.match-detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.65) 50%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 0;
}

/* Top accent bar removed */

/* Ensure all content is above the overlay */
.match-detail-hero > * {
    position: relative;
    z-index: 2;
}

/* League Badge */
.match-league-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(14, 165, 233, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.match-league-badge img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.match-league-badge .league-name {
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.95rem;
}

.match-league-badge .match-round {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Teams Display */
.teams-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: none !important;
}

.team-block {
    flex: 1;
    max-width: 280px;
    text-align: center;
}

.team-logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.team-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.team-logo-wrapper:hover img {
    transform: scale(1.05);
}

.team-name-display {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.team-form {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.form-result {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.form-result.W { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.form-result.D { background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%); }
.form-result.L { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* Score Display */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
    position: relative;
}

.score-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.score-number {
    font-size: 4rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    min-width: 60px;
    text-align: center;
}

.score-separator {
    font-size: 2.5rem;
    font-weight: 700;
    color: #64748b;
    margin: 0 0.5rem;
}

.match-status-badge {
    margin-top: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.match-status-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.match-status-badge .status-minute {
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* Ensure the status text (like "上半场", "下半场") has the same styling as the minute */
.match-status-badge.live span:not(.pulse-dot):not(.status-minute),
.match-status-badge.live .status-text {
    color: white !important;
    font-weight: 700;
    font-size: inherit;
}

.match-status-badge.live {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    animation: pulse-glow 2s infinite;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

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

.match-status-badge.halftime {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.match-status-badge.finished {
    background: rgba(100, 116, 139, 0.3);
    color: #cbd5e1;
}

.match-status-badge.upcoming {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
}

.match-status-badge.extra-time {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.match-status-badge.penalties {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

/* 直播类型标签 - 详情页 */
.match-detail-score .stream-badge {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
}

.match-detail-score .stream-badge-video .stream-dot,
.match-detail-score .stream-badge .stream-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 20px 4px rgba(239, 68, 68, 0.3); }
}

.match-minute {
    color: #f87171;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Match Info Bar */
.match-info-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.info-item i {
    color: #64748b;
}

/* Tab styles moved to match-tabs.css */

/* ==================== Statistics Styles ==================== */
.stats-card {
    background: transparent;
    border-radius: 12px;
    padding: 10px;
}

.stats-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stats-card-header i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.stats-card-header h5 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.2rem;
    background: rgba(30, 41, 59, 0.2);
    border-radius: 6px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-home {
    text-align: right;
    padding-right: 1.5rem;
}

.stat-away {
    text-align: left;
    padding-left: 1.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
}

.stat-label {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 120px;
}

/* Stat Progress Bar */
.stat-bar-row {
    margin-bottom: 1.25rem;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-bar-value {
    font-size: 1rem;
    font-weight: 600;
}

.stat-bar-value.home { color: #38bdf8; }
.stat-bar-value.away { color: #fbbf24; }

.stat-bar-label {
    color: #94a3b8;
    font-size: 0.85rem;
}

.stat-bar {
    height: 8px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.stat-bar-fill {
    height: 100%;
    transition: width 0.6s ease;
}

.stat-bar-fill.home {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}

.stat-bar-fill.away {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* ==================== Events Timeline ==================== */
.events-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.events-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.events-card-header i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.events-card-header h5 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.events-timeline {
    position: relative;
    padding: 1rem 0;
}

.events-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(100, 116, 139, 0.3) 0%, rgba(100, 116, 139, 0.1) 100%);
    transform: translateX(-50%);
}

.event-row {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    align-items: center;
    padding: 0.75rem 1.5rem;
    transition: background 0.2s ease;
}

.event-row:hover {
    background: rgba(100, 116, 139, 0.05);
}

.event-left,
.event-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.event-left {
    justify-content: flex-end;
}

.event-right {
    justify-content: flex-start;
}

.event-content {
    display: flex;
    flex-direction: column;
}

.event-player {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.9rem;
}

.event-detail {
    color: #64748b;
    font-size: 0.8rem;
}

.event-time {
    display: flex;
    justify-content: center;
    align-items: center;
}

.event-time span {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Event icons - matching legend style */
.event-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.event-icon svg {
    width: 16px;
    height: 16px;
}

.event-icon.goal {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.event-icon.yellow {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.event-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.event-icon.sub {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.event-icon.var {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* ==================== Lineup Styles ==================== */
.lineup-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.lineup-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.lineup-header i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.lineup-header h5 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.lineup-content {
    padding: 0;
}

/* ==================== Soccer Pitch Visualization ==================== */
.pitch-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(180deg, #1a472a 0%, #2d5a3f 50%, #1a472a 100%);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 68 / 105;
}

/* Pitch field lines */
.pitch-field {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.pitch-field svg {
    width: 100%;
    height: 100%;
}

/* Grass stripes effect */
.pitch-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 10%,
        rgba(0, 0, 0, 0.05) 10%,
        rgba(0, 0, 0, 0.05) 20%
    );
    pointer-events: none;
    z-index: 1;
}

/* Team halves */
.pitch-half {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
}

.pitch-half.home {
    top: 0;
    height: 50%;
}

.pitch-half.away {
    bottom: 0;
    height: 50%;
}

/* Team header on pitch */
.pitch-team-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.pitch-half.home .pitch-team-header {
    border-radius: 8px 8px 0 0;
}

.pitch-half.away .pitch-team-header {
    border-radius: 0 0 8px 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.pitch-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.pitch-team-name {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
}

.pitch-formation {
    background: rgba(14, 165, 233, 0.3);
    color: #38bdf8;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Player positions on pitch */
.pitch-players {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem;
}

.pitch-half.away .pitch-players {
    top: 0;
    bottom: 40px;
}

/* Formation rows */
.formation-row {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    gap: 0.25rem;
}

/* Player marker */
.pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pitch-player:hover {
    transform: scale(1.1);
}

.player-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pitch-half.home .player-marker {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.pitch-half.away .player-marker {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.player-marker.goalkeeper {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.player-marker .captain-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #fbbf24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: #1e293b;
    font-weight: 800;
}

/* Player name tooltip - handled by JavaScript */

/* Substitutes section */
.lineup-subs-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
}

.lineup-subs-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.lineup-subs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.subs-team {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.subs-team-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.subs-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.subs-team-name {
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
}

.subs-players {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.subs-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.subs-player:hover {
    background: rgba(14, 165, 233, 0.1);
}

.subs-player-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.subs-player-name {
    flex: 1;
    color: #cbd5e1;
    font-size: 0.8rem;
}

/* Legacy lineup styles for fallback */
.lineup-container {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 2rem;
}

.lineup-divider {
    background: rgba(100, 116, 139, 0.2);
}

.lineup-team {
    padding: 0 0.5rem;
}

.lineup-team-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

.lineup-team-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.lineup-team-info {
    flex: 1;
}

.lineup-team-name {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.formation-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lineup-section {
    margin-bottom: 1.5rem;
}

.lineup-section:last-child {
    margin-bottom: 0;
}

.lineup-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.lineup-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(100, 116, 139, 0.2);
}

.lineup-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lineup-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.lineup-player:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

.player-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(14, 165, 233, 0.1) 100%);
    color: #38bdf8;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.player-name {
    flex: 1;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.player-captain {
    color: #fbbf24;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.player-position {
    padding: 0.2rem 0.5rem;
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.lineup-players.subs .lineup-player {
    opacity: 0.7;
}

.lineup-players.subs .lineup-player:hover {
    opacity: 1;
}

/* Pitch responsive styles */
@media (max-width: 768px) {
    .pitch-container {
        aspect-ratio: 68 / 110;
    }
    
    .player-marker {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    
    /* Player tooltips are handled by JavaScript */
    
    .pitch-team-header {
        padding: 0.35rem;
    }
    
    .pitch-team-name {
        font-size: 0.75rem;
    }
    
    .pitch-team-logo {
        width: 20px;
        height: 20px;
    }
    
    .lineup-subs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .player-marker {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    
    /* Player tooltips are handled by JavaScript */
    
    .player-marker .captain-badge {
        width: 12px;
        height: 12px;
        font-size: 0.45rem;
    }
}

/* ==================== H2H Styles ==================== */
.h2h-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.h2h-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin-bottom: 0.75rem;
}

.h2h-header i {
    color: #38bdf8;
    font-size: 1.25rem;
}

.h2h-header h5 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.h2h-content {
    padding: 0;
}

.h2h-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.h2h-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.25);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.h2h-match:hover {
    background: rgba(14, 165, 233, 0.1);
}

.h2h-date {
    color: #64748b;
    font-size: 0.75rem;
    min-width: 70px;
    flex-shrink: 0;
}

.h2h-teams-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    justify-content: center;
}

.h2h-team {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
}

.h2h-team.home {
    text-align: right;
}

.h2h-team.away {
    text-align: left;
}

.h2h-team.winner {
    color: #38bdf8;
    font-weight: 600;
}

.h2h-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.25rem 0.6rem;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    color: #e2e8f0;
    min-width: 40px;
    flex-shrink: 0;
}

.h2h-competition {
    color: #64748b;
    font-size: 0.7rem;
    text-align: right;
    min-width: 100px;
    flex-shrink: 0;
}

/* ==================== Venue Info Card ==================== */
.venue-info-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.venue-image-wrapper {
    position: relative;
    width: 100%;
    min-height: 180px;
}

.venue-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.venue-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(30, 41, 59, 0.85) 100%);
}

.venue-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
}

.venue-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.venue-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.venue-name {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.venue-location {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.venue-details {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.venue-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
    font-size: 0.85rem;
}

.venue-detail-item i {
    color: #38bdf8;
}

@media (max-width: 768px) {
    .venue-image-wrapper {
        min-height: 150px;
    }
    
    .venue-image {
        min-height: 150px;
    }
    
    .venue-name {
        font-size: 1rem;
    }
    
    .venue-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .venue-detail-item {
        font-size: 0.8rem;
    }
}

/* ==================== Empty State ==================== */
.empty-panel {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

.empty-panel i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.25;
    display: block;
}

.empty-panel p {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 992px) {
    .teams-display {
        gap: 1rem;
    }
    
    .score-number {
        font-size: 3rem;
        min-width: 50px;
    }
    
    .team-logo-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .match-info-bar {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .match-detail-hero {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }
    
    /* Mobile: Keep horizontal layout but more compact */
    .teams-display {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .team-block {
        flex: 1;
        max-width: 40%;
        min-width: 0;
    }
    
    .score-display {
        flex: 0 0 auto;
        padding: 0 0.25rem;
        min-width: 80px;
    }
    
    .score-number {
        font-size: 2rem;
        min-width: 35px;
    }
    
    .score-separator {
        font-size: 1.5rem;
        margin: 0 0.25rem;
    }
    
    .team-logo-wrapper {
        width: 56px;
        height: 56px;
        margin-bottom: 0.5rem;
    }
    
    .team-name-display {
        font-size: 0.9rem;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
    }
    
    .team-form {
        display: none;
    }
    
    .match-status-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
        margin-top: 0.4rem;
        gap: 0.2rem;
    }
    
    .match-status-badge.live::before {
        width: 5px;
        height: 5px;
    }
    
    .match-minute {
        font-size: 0.9rem;
        padding: 0.15rem 0.5rem;
    }
    
    .match-league-badge {
        padding: 0.35rem 0.75rem;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .match-league-badge img {
        width: 22px;
        height: 22px;
    }
    
    .match-league-badge .league-name {
        font-size: 0.85rem;
    }
    
    .match-league-badge .match-round {
        font-size: 0.75rem;
    }
    
    .match-info-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
        margin-top: 0.75rem;
    }
    
    .info-item {
        font-size: 0.8rem;
        justify-content: center;
    }
    
    /* Tab responsive styles moved to match-tabs.css */
    
    .lineup-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .lineup-divider {
        display: none;
    }
    
    .h2h-match {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .h2h-teams-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .h2h-team {
        font-size: 0.8rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .h2h-team.home,
    .h2h-team.away {
        text-align: center;
    }
    
    .h2h-date {
        text-align: center;
        font-size: 0.7rem;
        order: -1;
        min-width: auto;
    }
    
    .h2h-score {
        padding: 0.35rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .h2h-competition {
        font-size: 0.65rem;
        text-align: center;
        order: 10;
        min-width: auto;
    }
    
    .stat-label {
        min-width: 80px;
        font-size: 0.75rem;
    }
    
    .event-row {
        grid-template-columns: 1fr 50px 1fr;
        padding: 0.5rem 1rem;
    }
    
    .event-player {
        font-size: 0.8rem;
    }
    
    .event-icon {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .btn-live-watch {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .match-detail-hero {
        padding: 1rem 0.75rem;
    }
    
    .match-league-badge {
        padding: 0.3rem 0.6rem;
        margin-bottom: 0.75rem;
    }
    
    .match-league-badge img {
        width: 20px;
        height: 20px;
    }
    
    .match-league-badge .league-name {
        font-size: 0.8rem;
    }
    
    .team-logo-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .score-number {
        font-size: 1.75rem;
        min-width: 30px;
    }
    
    .score-separator {
        font-size: 1.25rem;
    }
    
    .score-display {
        min-width: 70px;
    }
    
    .team-name-display {
        font-size: 0.8rem;
    }
    
    .match-info-bar {
        gap: 0.4rem;
        padding-top: 0.75rem;
    }
    
    .info-item {
        font-size: 0.75rem;
    }
}

/* ==================== Enhanced Visual Effects ==================== */

/* Glow effects for live matches */
.match-detail-hero.live {
    box-shadow: 0 0 60px rgba(239, 68, 68, 0.15);
}

.match-detail-hero.live::before {
    background: linear-gradient(90deg, #ef4444 0%, #f97316 50%, #ef4444 100%);
    animation: liveGlow 2s ease-in-out infinite;
}

@keyframes liveGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Score animation on update */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #22c55e; }
    100% { transform: scale(1); }
}

.score-number.updated {
    animation: scoreUpdate 0.5s ease-out;
}

/* Smooth page entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-detail-hero {
    animation: fadeInUp 0.5s ease-out;
}

.match-tabs-container {
    animation: fadeInUp 0.5s ease-out 0.1s backwards;
}

/* Tab panel transitions */
.match-tab-panel {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.match-tab-panel.active {
    animation: fadeInUp 0.3s ease-out;
}

/* Button hover effects */
.btn-live-watch {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-live-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(239, 68, 68, 0.5);
}

.btn-live-watch:active {
    transform: translateY(0);
}

/* 暂无视频直播按钮 */
.btn-live-watch.btn-no-video {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    cursor: not-allowed;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
    opacity: 0.85;
}

.btn-live-watch.btn-no-video:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

/* Card hover effects */
.stats-card,
.events-card,
.lineup-card,
.h2h-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover,
.events-card:hover,
.lineup-card:hover,
.h2h-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Stat bar animations */
.stat-bar-fill {
    transition: width 1s ease-out;
}

/* Event timeline animation */
.event-row {
    transition: background 0.2s ease;
}

.event-row:hover {
    background: rgba(14, 165, 233, 0.08);
}

/* Player card hover */
.lineup-player {
    transition: all 0.2s ease;
}

.lineup-player:hover {
    background: rgba(14, 165, 233, 0.15);
    transform: translateX(4px);
}

/* H2H match hover */
.h2h-match {
    transition: all 0.2s ease;
}

.h2h-match:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

/* Match minute pulse for live */
.match-minute {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    animation: minutePulse 2s ease-in-out infinite;
}

@keyframes minutePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Status badge styles */
.match-status-badge.live {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 30px rgba(239, 68, 68, 0.5),
        0 4px 15px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.5), 0 4px 15px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 45px rgba(239, 68, 68, 0.7), 0 4px 20px rgba(239, 68, 68, 0.5);
        transform: scale(1.02);
    }
}

.match-status-badge.ft {
    background: linear-gradient(135deg, #374151 0%, #1f2937 50%, #111827 100%);
    color: #e5e7eb;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.match-status-badge.ht {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 25px rgba(249, 115, 22, 0.4),
        0 4px 15px rgba(249, 115, 22, 0.3);
}

.match-status-badge.ns,
.match-status-badge.upcoming {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 25px rgba(14, 165, 233, 0.4),
        0 4px 15px rgba(14, 165, 233, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.match-status-badge.finished {
    background: linear-gradient(135deg, #374151 0%, #1f2937 50%, #111827 100%);
    color: #e5e7eb;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    border: 1px solid rgba(75, 85, 99, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.match-status-badge.halftime {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 25px rgba(249, 115, 22, 0.4),
        0 4px 15px rgba(249, 115, 22, 0.3);
}

.match-status-badge.extra-time {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 50%, #7e22ce 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 25px rgba(168, 85, 247, 0.4),
        0 4px 15px rgba(168, 85, 247, 0.3);
}

.match-status-badge.penalties {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: #1f2937;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 
        0 0 25px rgba(251, 191, 36, 0.5),
        0 4px 15px rgba(251, 191, 36, 0.4);
}

/* 新事件高亮动画 */
.event-row.new-event {
    animation: newEventPulse 3s ease-in-out;
}

@keyframes newEventPulse {
    0% {
        background: rgba(34, 197, 94, 0.2);
        transform: scale(1.02);
    }
    50% {
        background: rgba(34, 197, 94, 0.1);
        transform: scale(1.01);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, 
        rgba(100, 116, 139, 0.1) 25%, 
        rgba(100, 116, 139, 0.2) 50%, 
        rgba(100, 116, 139, 0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Scrollbar styling for tab content */
.match-tabs-content::-webkit-scrollbar {
    width: 6px;
}

.match-tabs-content::-webkit-scrollbar-track {
    background: rgba(100, 116, 139, 0.1);
    border-radius: 3px;
}

.match-tabs-content::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 3px;
}

.match-tabs-content::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* Focus styles for accessibility */
.match-tab:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .match-detail-page {
        background: white;
    }
    
    .match-detail-hero {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .btn-live-watch,
    .match-tabs-nav {
        display: none;
    }
}

/* ==================== Text Live Styles ==================== */
.text-live-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.text-live-card .events-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.text-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

.text-live-badge .pulse-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.text-live-timeline {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.text-live-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.875rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.3);
    margin-bottom: 0.75rem;
    transition: background 0.2s ease;
}

.text-live-item:hover {
    background: rgba(15, 23, 42, 0.5);
}

.text-live-item:last-child {
    margin-bottom: 0;
}

.text-live-item.goal {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-left: 3px solid #22c55e;
}

.text-live-item.yellow {
    border-left: 3px solid #fbbf24;
}

.text-live-item.red {
    border-left: 3px solid #ef4444;
}

.text-live-time {
    min-width: 36px;
    padding: 0.25rem 0.5rem;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.text-live-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.text-live-item.goal .text-live-icon {
    color: #22c55e;
}

.text-live-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.text-live-team {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-live-team.home {
    color: #0ea5e9;
}

.text-live-team.away {
    color: #f97316;
}

.text-live-player {
    color: #f1f5f9;
    font-weight: 500;
    font-size: 0.9rem;
}

.text-live-detail {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Scrollbar for text live timeline */
.text-live-timeline::-webkit-scrollbar {
    width: 5px;
}

.text-live-timeline::-webkit-scrollbar-track {
    background: rgba(100, 116, 139, 0.1);
    border-radius: 3px;
}

.text-live-timeline::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 3px;
}

.text-live-timeline::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* ==================== Modern Events Legend ==================== */
.events-legend-modern {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(100, 116, 139, 0.15);
    padding-top: 1rem;
}

.legend-header {
    display: flex;
    justify-content: center;
}

.legend-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: #a5b4fc;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legend-toggle:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.legend-toggle i {
    font-size: 0.85rem;
}

.legend-arrow {
    transition: transform 0.3s ease;
}

.legend-toggle.collapsed .legend-arrow {
    transform: rotate(-90deg);
}

.legend-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 1rem;
    opacity: 1;
}

.legend-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.events-legend-modern .legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(30, 41, 59, 0.3) 100%);
    border: 1px solid rgba(100, 116, 139, 0.1);
    border-radius: 10px;
    transition: all 0.25s ease;
}

.events-legend-modern .legend-item:hover {
    background: linear-gradient(145deg, rgba(51, 65, 85, 0.7) 0%, rgba(51, 65, 85, 0.4) 100%);
    border-color: rgba(100, 116, 139, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.events-legend-modern .legend-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.events-legend-modern .legend-icon svg {
    width: 18px;
    height: 18px;
}

/* Icon Colors */
.legend-icon.goal {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.legend-icon.own-goal {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.legend-icon.penalty {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.legend-icon.missed-penalty {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.legend-icon.yellow-card {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.legend-icon.red-card {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.legend-icon.second-yellow {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
}

.legend-icon.substitution {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.legend-icon.assist {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.legend-icon.var {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.legend-icon.injury {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.events-legend-modern .legend-item span {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive legend */
@media (max-width: 1200px) {
    .legend-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .legend-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    
    .events-legend-modern .legend-item {
        padding: 0.5rem 0.7rem;
    }
}

@media (max-width: 768px) {
    .legend-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .events-legend-modern .legend-item {
        padding: 0.45rem 0.55rem;
    }
    
    .events-legend-modern .legend-icon {
        width: 24px;
        height: 24px;
    }
    
    .events-legend-modern .legend-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .events-legend-modern .legend-item span {
        font-size: 0.72rem;
    }
    
    /* Event icons responsive */
    .event-icon {
        width: 28px;
        height: 28px;
    }
    
    .event-icon svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .legend-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .events-legend-modern .legend-item {
        padding: 0.4rem 0.5rem;
    }
    
    .events-legend-modern .legend-icon {
        width: 22px;
        height: 22px;
    }
    
    .events-legend-modern .legend-icon svg {
        width: 12px;
        height: 12px;
    }
    
    .events-legend-modern .legend-item span {
        font-size: 0.68rem;
    }
    
    .legend-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    .legend-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }
    
    .events-legend-modern .legend-item {
        padding: 0.35rem 0.4rem;
        gap: 0.4rem;
    }
    
    .events-legend-modern .legend-icon {
        width: 20px;
        height: 20px;
    }
    
    .events-legend-modern .legend-icon svg {
        width: 11px;
        height: 11px;
    }
    
    .events-legend-modern .legend-item span {
        font-size: 0.65rem;
    }
}
