/**
 * Avrupa Spor Modülü CSS
 * 4 kartlı grid yapısı - Her kart 10 oyuncu gösterir
 * Avrupa liglerinden en değerli oyuncular
 */

.avrupa-spor-module {
    margin: 20px 0;
    padding: 0;
    background: #fff;
}

/* ============================================
   CONTAINER
   ============================================ */
.avrupa-spor-module .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   GRID - 4 KART YAN YANA
   ============================================ */
.avrupa-spor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* ============================================
   KART TASARIMI
   ============================================ */
.avrupa-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;
}

.avrupa-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

/* ============================================
   KART BAŞLIĞI
   ============================================ */
.avrupa-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.avrupa-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); }
}

.avrupa-icon {
    font-size: 0; /* Emoji'yi gizle */
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CSS ile SVG Bayraklar - Emoji yerine */
.avrupa-icon::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* İngiltere Bayrağı - Premier League */
.avrupa-card[data-league="premier-league"] .avrupa-icon::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="%23012169"/><path d="M0 0 L60 30 M60 0 L0 30" stroke="%23fff" stroke-width="6"/><path d="M0 0 L60 30 M60 0 L0 30" stroke="%23C8102E" stroke-width="4"/><path d="M30 0 v30 M0 15 h60" stroke="%23fff" stroke-width="10"/><path d="M30 0 v30 M0 15 h60" stroke="%23C8102E" stroke-width="6"/></svg>');
}

/* İspanya Bayrağı - La Liga */
.avrupa-card[data-league="la-liga"] .avrupa-icon::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3 2"><rect width="3" height="2" fill="%23AA151B"/><rect width="3" height="0.67" y="0.67" fill="%23F1BF00"/></svg>');
}

/* Almanya Bayrağı - Bundesliga */
.avrupa-card[data-league="bundesliga"] .avrupa-icon::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 5 3"><rect width="5" height="1" fill="%23000"/><rect width="5" height="1" y="1" fill="%23D00"/><rect width="5" height="1" y="2" fill="%23FFCE00"/></svg>');
}

/* İtalya Bayrağı - Serie A */
.avrupa-card[data-league="serie-a"] .avrupa-icon::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="20" height="30" fill="%23009246"/><rect width="20" height="30" x="20" fill="%23fff"/><rect width="20" height="30" x="40" fill="%23CE2B37"/></svg>');
}

.avrupa-title {
    flex: 1;
    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);
    position: relative;
    z-index: 1;
}

/* ============================================
   KART İÇERİĞİ - MİNİMAL LİSTE
   ============================================ */
.avrupa-card-body {
    padding: 0;
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.avrupa-player-list {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* ============================================
   PUAN DURUMU LİSTESİ - Light Mode (Gündüz)
   ============================================ */
.avrupa-standings-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: transparent;
}

.standing-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: none;
    transition: background-color 0.2s ease;
}

.standing-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.standing-row:last-child {
    border-bottom: none;
}

/* Sıra Numarası Badge - Minimal */
.standing-rank {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    background: #e0e0e0;
    border-radius: 4px;
}

/* İlk 4 sıra yeşil badge */
.standing-rank.rank-top {
    background: #22c55e;
    color: #fff;
}

/* Takım Bilgileri - Minimal */
.standing-team {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.team-name {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a !important;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Puan - Minimal */
.standing-points {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #5dade2 !important;
    white-space: nowrap;
    min-width: 30px;
    text-align: right;
}

/* Tüm Puan Durumu Linki - Light Mode */
.standings-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    margin: 8px 12px;
    background: #5dade2;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.standings-view-all:hover {
    background: #4a9fd1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(93, 173, 226, 0.3);
}

/* ============================================
   KART ALT KISMI
   ============================================ */
.avrupa-card-footer {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.avrupa-league-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   LOADING STATE
   ============================================ */
.avrupa-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 15px;
}

.avrupa-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3D195B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.avrupa-loading p {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.avrupa-empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.avrupa-empty p {
    margin: 0;
    font-size: 13px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .avrupa-spor-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .avrupa-spor-module {
        margin: 30px 0 35px 0 !important;
    }

    .avrupa-spor-module .container {
        padding: 0 10px;
    }

    .avrupa-spor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .avrupa-card {
        max-width: 100%;
        margin: 0;
    }

    .avrupa-card-header {
        padding: 12px;
        align-items: center !important;
    }

    .avrupa-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .avrupa-icon::before {
        width: 28px !important;
        height: 28px !important;
    }

    .avrupa-title {
        font-size: 11px;
        line-height: 1.2;
    }

    .standing-row {
        padding: 8px 10px;
        gap: 8px;
    }

    .standing-rank {
        width: 24px;
        height: 24px;
        font-size: 11px;
        border-radius: 4px;
    }

    .team-name {
        font-size: 12px;
    }

    .standing-points {
        font-size: 12px;
        font-weight: 600;
        min-width: 30px;
    }
    
    .standings-view-all {
        margin: 8px 10px;
        padding: 10px;
        font-size: 12px;
    }

    .avrupa-card-footer {
        padding: 8px;
    }

    .avrupa-league-name {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .avrupa-spor-module {
        margin: 25px 0 30px 0 !important;
    }

    .avrupa-spor-module .container {
        padding: 0 8px;
    }

    .avrupa-spor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .avrupa-card-header {
        padding: 10px;
        align-items: center !important;
    }

    .avrupa-icon {
        width: 24px !important;
        height: 24px !important;
    }

    .avrupa-icon::before {
        width: 24px !important;
        height: 24px !important;
    }

    .avrupa-title {
        font-size: 10px;
        line-height: 1.2;
    }

    .standing-row {
        padding: 6px 8px;
        gap: 6px;
    }

    .standing-rank {
        width: 20px;
        height: 20px;
        font-size: 9px;
        border-radius: 3px;
    }

    .team-name {
        font-size: 11px;
    }

    .standing-points {
        font-size: 11px;
        font-weight: 600;
        min-width: 26px;
    }
    
    .standings-view-all {
        margin: 6px 8px;
        padding: 8px;
        font-size: 10px;
    }

    .avrupa-card-footer {
        padding: 6px;
    }

    .avrupa-league-name {
        font-size: 9px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode .avrupa-spor-module {
    background: var(--dark-bg-primary, #121212);
}

body.dark-mode .avrupa-card {
    background: var(--dark-bg-secondary);
}

body.dark-mode .avrupa-card-body {
    background: var(--dark-bg-secondary);
}

body.dark-mode .avrupa-standings-list {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .standing-row {
    border-bottom: none;
}

body.dark-mode .standing-row:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

body.dark-mode .standing-rank {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .standing-rank.rank-top {
    background: #22c55e;
    color: #fff;
}

body.dark-mode .team-name {
    color: #fff !important;
}

body.dark-mode .standing-points {
    color: #5dade2 !important;
}

body.dark-mode .avrupa-card-footer {
    background: var(--dark-bg-secondary);
    border-top-color: var(--dark-border);
}

body.dark-mode .avrupa-loading p,
body.dark-mode .avrupa-empty p {
    color: var(--dark-text-secondary);
}

body.dark-mode .avrupa-spinner {
    border-color: var(--dark-border);
    border-top-color: #3D195B;
}

/* ============================================
   DARK MODE - PUAN DURUMU
   ============================================ */
body.dark-mode .standings-view-all {
    background: rgba(93, 173, 226, 0.2);
    color: #5dade2 !important;
    border: 1px solid rgba(93, 173, 226, 0.3);
}

body.dark-mode .standings-view-all:hover {
    background: rgba(93, 173, 226, 0.3);
}