/* Main Container */
.ss-match-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Match Card Link */
.ss-match-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}

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

.ss-match-card.ss-disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Card Top (Thumb + Badges) */
.ss-card-top {
    position: relative;
    height: 160px;
    background: #2c3e50;
    /* Fallback */
    overflow: hidden;
}

.ss-thumb-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    /* Fallback/Background for transparent PNGs */
}

.ss-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s;
    max-width: 100%;
    /* Ensure it doesn't overflow width */
    max-height: 100%;
    /* Ensure it doesn't overflow height */
}

.ss-match-card:hover .ss-thumb-img {
    transform: scale(1.05);
}

.ss-match-card:hover .ss-thumb {
    transform: scale(1.05);
}

.ss-league-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    backdrop-filter: blur(2px);
    text-transform: uppercase;
}

.ss-live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Card Body */
.ss-card-body {
    padding: 15px;
}

.ss-time {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 5px;
    font-weight: 500;
}

.ss-title {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.3;
    color: #333;
    font-weight: 600;
}

/* Player View */
.ss-player-view {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.ss-player-header {
    margin-bottom: 20px;
}

.ss-back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.ss-back-link:hover {
    color: #333;
    text-decoration: underline;
}

.ss-player-header h2 {
    margin: 0 0 5px 0;
    font-size: 1.8em;
}

.ss-player-meta {
    color: #888;
}

.ss-player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#ss-player {
    width: 100%;
    height: 100%;
}

/* Source Switcher */
.ss-sources-container h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ss-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ss-source-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.ss-source-btn:hover {
    background: #e0e0e0;
}

.ss-source-btn.active {
    background: #0073aa;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.ss-icon-play {
    font-size: 0.8em;
}

/* Error */
.ss-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}