/**
 * Futbol Enleri Modülü CSS
 * 4 kartlı grid yapısı - Her kart 1 oyuncu gösterir
 * Profesyonel tasarım, temaya özel
 */

.futbol-enleri-module {
    margin: 20px 0;
    padding: 0;
    background: #fff;
}

/* ============================================
   CONTAINER
   ============================================ */
.futbol-enleri-module .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* MOBİLDE GLOBAL CONTAINER OVERRIDE */
@media (max-width: 768px) {
    .futbol-enleri-module .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    .futbol-enleri-module .container {
        padding: 0 12px !important;
    }
}

/* ============================================
   GRID - 4 KART YAN YANA
   ============================================ */
.futbol-enleri-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* ============================================
   KART TASARIMI
   ============================================ */
.enleri-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.enleri-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

/* ============================================
   KART BAŞLIĞI - YENİ TASARIM
   ============================================ */
.enleri-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.enleri-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.enleri-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    position: relative;
    z-index: 1;
}

.enleri-header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.enleri-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.enleri-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ============================================
   KART İÇERİĞİ - OYUNCU LİSTESİ
   ============================================ */
.enleri-card-body {
    padding: 0;
    flex: 1;
    background: #fff;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* OYUNCU LİSTESİ - MİNİMAL TABLO */
.enleri-player-list {
    width: 100%;
}

.enleri-minimal-table {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.enleri-minimal-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.enleri-minimal-row:hover {
    background: #f8f9fa;
}

.enleri-minimal-row:last-child {
    border-bottom: none;
}

/* İLK 3 SIRALAMA VURGUSU */
.enleri-minimal-row.rank-first {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0%, transparent 100%);
}

.enleri-minimal-row.rank-second {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08) 0%, transparent 100%);
}

.enleri-minimal-row.rank-third {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08) 0%, transparent 100%);
}

/* RANK NUMARASI */
.enleri-rank {
    font-size: 16px;
    font-weight: 800;
    color: #666;
    text-align: center;
    min-width: 32px;
}

.rank-first .enleri-rank {
    color: #FFD700;
    font-size: 18px;
}

.rank-second .enleri-rank {
    color: #C0C0C0;
    font-size: 18px;
}

.rank-third .enleri-rank {
    color: #CD7F32;
    font-size: 18px;
}

/* OYUNCU BİLGİLERİ */
.enleri-player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.enleri-name {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.enleri-team {
    font-size: 11px;
    font-weight: 500;
    color: #7f8c8d;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* DEĞER BİLGİSİ */
.enleri-value {
    font-size: 13px;
    font-weight: 700;
    color: #27ae60;
    text-align: right;
    white-space: nowrap;
}

.enleri-single-player {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   OYUNCU KARTI - MERKEZ TASARIM
   ============================================ */
.enleri-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    width: 100%;
    transition: all 0.3s ease;
}

.enleri-player-card:hover {
    transform: scale(1.05);
}

/* Oyuncu Resmi ve Badge */
.enleri-player-image {
    position: relative;
    width: 120px;
    height: 120px;
}

.enleri-player-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.enleri-rank-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
    border: 3px solid #fff;
}

/* Oyuncu Bilgileri */
.enleri-player-details {
    text-align: center;
}

.enleri-player-name {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.enleri-player-value {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   KART ALT KISMI
   ============================================ */
.enleri-card-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.enleri-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 12px 20px;
    border-radius: 8px;
    background: currentColor;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.enleri-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.enleri-view-all .arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.enleri-view-all:hover .arrow {
    transform: translateX(4px);
}

/* ============================================
   LOADING STATE
   ============================================ */
.enleri-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 15px;
}

.enleri-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E53935;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.enleri-loading p {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.enleri-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.enleri-empty p {
    margin: 0;
    font-size: 13px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .futbol-enleri-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    /* MOBİL MODÜL BOŞLUKLARI - ÜST BOŞLUK DAHA DA ARTIRILDI */
    .futbol-enleri-module {
        margin: 60px 0 25px 0 !important;
        padding: 0 !important;
    }
    
    .futbol-enleri-module .container {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* MOBİLDE YAN YANA 2 KART */
    .futbol-enleri-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .enleri-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .enleri-card-header {
        padding: 15px 12px;
    }

    .enleri-icon {
        font-size: 24px;
    }

    .enleri-title {
        font-size: 13px;
        line-height: 1.2;
    }

    .enleri-subtitle {
        font-size: 10px;
    }

    .enleri-card-body {
        padding: 0;
    }

    .enleri-minimal-row {
        grid-template-columns: 28px 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .enleri-rank {
        font-size: 14px;
        min-width: 28px;
    }

    .rank-first .enleri-rank,
    .rank-second .enleri-rank,
    .rank-third .enleri-rank {
        font-size: 16px;
    }

    .enleri-name {
        font-size: 13px;
    }

    .enleri-team {
        font-size: 10px;
    }

    .enleri-value {
        font-size: 12px;
    }

    .enleri-single-player {
        min-height: 180px;
    }

    .enleri-player-image {
        width: 90px;
        height: 90px;
    }

    .enleri-rank-badge {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-width: 2px;
    }

    .enleri-player-name {
        font-size: 14px;
    }

    .enleri-player-value {
        font-size: 11px;
    }

    .enleri-card-footer {
        padding: 12px;
    }

    .enleri-view-all {
        font-size: 11px;
        gap: 6px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    /* KÜÇÜK MOBİL BOŞLUKLARI */
    .futbol-enleri-module {
        margin: 20px 0 !important;
        padding: 0 !important;
    }
    
    .futbol-enleri-module .container {
        padding: 0 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* ÇOK KÜÇÜK EKRANLARDA DA YAN YANA 2 KART */
    .futbol-enleri-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .enleri-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .enleri-card-header {
        padding: 12px 10px;
    }

    .enleri-icon {
        font-size: 20px;
    }

    .enleri-title {
        font-size: 12px;
        line-height: 1.2;
    }

    .enleri-subtitle {
        font-size: 9px;
    }

    .enleri-card-body {
        padding: 0;
    }

    .enleri-minimal-row {
        grid-template-columns: 24px 1fr auto;
        gap: 8px;
        padding: 9px 10px;
    }

    .enleri-rank {
        font-size: 13px;
        min-width: 24px;
    }

    .rank-first .enleri-rank,
    .rank-second .enleri-rank,
    .rank-third .enleri-rank {
        font-size: 14px;
    }

    .enleri-name {
        font-size: 12px;
    }

    .enleri-team {
        font-size: 9px;
    }

    .enleri-value {
        font-size: 11px;
    }

    .enleri-single-player {
        min-height: 160px;
    }

    .enleri-player-image {
        width: 75px;
        height: 75px;
    }

    .enleri-rank-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-width: 2px;
    }

    .enleri-player-name {
        font-size: 12px;
    }

    .enleri-player-value {
        font-size: 10px;
    }

    .enleri-card-footer {
        padding: 10px;
    }

    .enleri-view-all {
        font-size: 10px;
        gap: 4px;
        padding: 9px 14px;
    }

    .enleri-view-all .arrow {
        font-size: 12px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode .futbol-enleri-module {
    background: var(--dark-bg-primary, #121212);
}

body.dark-mode .enleri-card {
    background: var(--dark-bg-secondary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .enleri-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

/* Card Header - Her kart için özel renk korunur */
body.dark-mode .enleri-card-header {
    /* Arka plan rengi kartın kendi data-color'ından gelir, değiştirme */
}

body.dark-mode .enleri-title,
body.dark-mode .enleri-subtitle {
    /* Beyaz kalır çünkü renkli header üzerinde */
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .enleri-card-body {
    background: var(--dark-bg-tertiary);
}

body.dark-mode .enleri-player-image img {
    border-color: var(--dark-bg-secondary);
}

body.dark-mode .enleri-rank-badge {
    border-color: var(--dark-bg-secondary);
}

body.dark-mode .enleri-player-name {
    color: var(--dark-text-primary);
}

body.dark-mode .enleri-player-value {
    color: var(--dark-text-secondary);
}

body.dark-mode .enleri-card-footer {
    background: var(--dark-bg-secondary);
    border-top-color: var(--dark-border);
}

body.dark-mode .enleri-view-all {
    /* Buton arka plan rengi inline style'dan gelir (her kart için farklı) */
    /* Beyaz metin rengi korunur */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .enleri-view-all:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .enleri-loading p,
body.dark-mode .enleri-empty p {
    color: var(--dark-text-secondary);
}

body.dark-mode .enleri-spinner {
    border-color: var(--dark-border);
    border-top-color: #E53935;
}