/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ===================================
   Leetify-Style Match Card Components
   =================================== */

/* Match Card Container - Fixed Width Leetify Style */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    width: 550px;
    /* Fixed width */
    margin: 0 auto var(--spacing-lg);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.match-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Leetify Header */
.leetify-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 12px var(--spacing-lg);
    background: rgba(20, 24, 36, 0.6);
    border-bottom: 1px solid var(--border-color);
}

.game-icon-small {
    width: 23px;
    height: 23px;
    border-radius: 4px;
    object-fit: cover;
}

.result-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-badge.win {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.result-badge.loss {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.result-badge.remake {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.match-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

/* User Section - Support Multiple Users */
.leetify-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px var(--spacing-lg);
    background: rgba(30, 35, 50, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leetify-user.multi-user {
    padding: 0;
}

.user-switcher {
    display: flex;
    gap: 0;
    width: 100%;
    height: 100%;
}

.user-button {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px var(--spacing-lg);
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    justify-content: flex-start;
}

.user-button:last-child {
    border-right: none;
}

.user-button:hover {
    background: rgba(255, 255, 255, 0.03);
}

.user-button.active {
    color: var(--text-primary);
}

.user-button:not(.active) {
    opacity: 0.5;
}

.user-button-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-button-text {
    display: flex;
    align-items: baseline;
    gap: 4px;
    overflow: hidden;
}

.user-button-name {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-button-tag {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
}

.user-avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar-small:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.user-avatar-small.active {
    box-shadow: 0 0 0 2px var(--accent-color);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar-small:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.user-avatar-small.active {
    box-shadow: 0 0 0 2px var(--accent-color);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Main Content Area */
.leetify-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 16px;
    background: rgba(20, 24, 36, 0.3);
}

/* Champion Panel with Vignette Effect */
.champion-panel {
    position: relative;
    padding: 18px;
    border-radius: 8px;
    background-size: 110%;
    /* Slightly zoomed for better crop */
    background-position: center 20%;
    /* Higher crop to show heads */
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.champion-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Lighter vignette - much more visible */
    background:
        radial-gradient(ellipse at center, rgba(20, 24, 36, 0.3) 0%, rgba(20, 24, 36, 0.7) 100%),
        linear-gradient(to right, rgba(10, 14, 20, 0.5), rgba(10, 14, 20, 0.4));
    z-index: 0;
}

.champion-panel>* {
    position: relative;
    z-index: 1;
}

.champion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.champion-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-icon-large {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.95) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
    flex-shrink: 0;
}

.champion-name {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    line-height: 1;
}

.game-mode {
    font-size: 13px;
    color: #d1d5db;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Stats Panel */
.stats-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(30, 34, 46, 0.6);
    border-radius: 8px;
    min-width: 180px;
}

.stat-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    font-size: 14px;
    opacity: 0.7;
}

.stat-label {
    font-size: 10px;
    font-weight: 450;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.stat-value-right {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .match-card {
        width: 100%;
        max-width: 550px;
    }

    .leetify-content {
        grid-template-columns: 1fr;
    }

    .stats-panel {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: unset;
    }

    .stat-row {
        flex: 1;
        min-width: calc(50% - 6px);
    }
}