/* styles.css - Vollständige Styles für BLG Ranking */
:root {
    --primary: #ff6338;
    --primary-dark: #e04d2e;
    --secondary: #fa7070;
    --secondary-dark: #d85c5c;
    --accent: #4dabf7;
    --bg-dark-1: #0a1929;
    --bg-dark-2: #112240;
    --bg-dark-3: #1a365d;
    --text-light: #ffffff;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glow: rgba(255, 99, 56, 0.3);
    --gradient: linear-gradient(135deg, #ff6338 0%, #fa7070 100%);
    
    /* Division Colors */
    --iron: #A19D94;
    --bronze: #CD7F32;
    --silver: #C0C0C0;
    --gold: #FFD700;
    --platinum: #00CED1;
    --diamond: #B9F2FF;
    --legend: #FF0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "bc-barell", sans-serif;
    background: linear-gradient(180deg, var(--bg-dark-1) 0%, var(--bg-dark-2) 50%, var(--bg-dark-1) 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    padding: 1rem;
}

/* ===== RANKING PAGE STYLES ===== */

/* Container & Layout */
.ranking-container {
    max-width: 100%;
    margin: 1rem auto;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow: visible;
    position: relative;
}

/* Header */
.ranking-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.ranking-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 99, 56, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(250, 112, 112, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.ranking-header {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.ranking-badge {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.ranking-title {
    font-family: "strenuous", sans-serif;
    font-size: 2rem;
    margin-bottom: 0.4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 99, 56, 0.2);
    line-height: 1.2;
}

.ranking-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.ranking-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

/* Controls */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.filters {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex: 1 !important;
    min-width: 300px !important;
}

.filter-group {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.filter-label {
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

#divisionFilter {
    min-width: 140px !important;
    background: var(--bg-dark-3) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--border) !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 6px !important;
    font-family: "bc-barell", sans-serif !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
}

#searchPlayer {
    flex: 1 !important;
    min-width: 200px !important;
    padding: 0.4rem 0.8rem !important;
    background: var(--bg-dark-3) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: var(--text-light) !important;
    font-family: "bc-barell", sans-serif !important;
}

#searchPlayer::placeholder {
    color: var(--text-muted) !important;
}

#searchPlayer:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 99, 56, 0.1) !important;
}

#searchTeam {
    flex: 1 !important;
    min-width: 200px !important;
    padding: 0.4rem 0.8rem !important;
    background: var(--bg-dark-3) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: var(--text-light) !important;
    font-family: "bc-barell", sans-serif !important;
}

#searchTeam::placeholder {
    color: var(--text-muted) !important;
}

#searchTeam:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 99, 56, 0.1) !important;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.sort-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.sort-select {
    background: var(--bg-dark-3);
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: "bc-barell", sans-serif;
    cursor: pointer;
    min-width: 180px;
    font-size: 0.85rem;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    padding: 0;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(17, 34, 64, 0.7);
    border-radius: 12px;
    overflow: hidden;
    /* ENTFERNE: min-width: 900px; */
    /* STATTDESSEN: */
    table-layout: fixed; /* Feste Layout-Berechnung */
}

.ranking-table th:nth-child(1), /* Rang */
.ranking-table td:nth-child(1) {
    width: 80px !important;
    min-width: 80px;
    max-width: 80px;
    text-align: center;
}

.ranking-table th:nth-child(2), /* Spieler */
.ranking-table td:nth-child(2) {
    width: auto !important; /* Flexible Breite */
    min-width: 150px;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-table th:nth-child(3), /* Elo */
.ranking-table td:nth-child(3) {
    width: 120px !important;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

.ranking-table th:nth-child(4), /* Division */
.ranking-table td:nth-child(4) {
    width: 120px !important;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

.ranking-table th:nth-child(5), /* Letzte Aktivität */
.ranking-table td:nth-child(5) {
    width: 150px !important;
    min-width: 150px;
    max-width: 150px;
    text-align: center;
}

.ranking-table th:nth-child(6), /* Statistik */
.ranking-table td:nth-child(6) {
    width: 100px !important;
    min-width: 100px;
    max-width: 100px;
    text-align: center;
}

.ranking-table thead {
    background: linear-gradient(90deg, var(--bg-dark-3) 0%, rgba(77, 171, 247, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.ranking-table th {
    padding: 0.75rem 0.6rem;
    text-align: left;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
}

.ranking-table th:hover {
    background-color: rgba(255, 99, 56, 0.1);
}

.ranking-table th:first-child {
    border-radius: 12px 0 0 0;
}

.ranking-table th:last-child {
    border-radius: 0 12px 0 0;
}

.ranking-table td {
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.ranking-table tbody tr:hover td {
    background-color: rgba(255, 99, 56, 0.05);
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cells */
.rank-cell {
    font-family: "strenuous", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    min-width: 60px;
}

.combo-cell {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0; /* WICHTIG: Ermöglicht das Schrumpfen */
    overflow: hidden;
}

.combo-cell > span:first-child {
    flex: 1;
    min-width: 0; /* Ermöglicht Text-Überlauf */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-cell {
    font-family: "bc-barell", monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    min-width: 100px;
    padding-left: 1rem !important;
}

/* Division-Badges mit Farben für alle Divisionen */
.division-badge {
    display: inline-block !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 80px !important;
    text-align: center !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Alle Division-Farben */
.division-eisen { 
    background: linear-gradient(135deg, #A19D94 0%, #8B8880 100%) !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(161, 157, 148, 0.3) !important;
}

.division-bronze { 
    background: linear-gradient(135deg, #CD7F32 0%, #B36B25 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3) !important;
}

.division-silber { 
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%) !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3) !important;
}

.division-gold { 
    background: linear-gradient(135deg, #FFD700 0%, #E6C200 100%) !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
}

.division-platin { 
    background: linear-gradient(135deg, #00CED1 0%, #00B7B9 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 206, 209, 0.3) !important;
}

.division-diamant { 
    background: linear-gradient(135deg, #B9F2FF 0%, #8CE5FF 100%) !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(185, 242, 255, 0.3) !important;
}

.division-legend { 
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3) !important;
    animation: pulse-glow 2s infinite !important;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3) !important; }
    50% { box-shadow: 0 4px 20px rgba(255, 0, 0, 0.6) !important; }
}

/* Elo-Änderungen */
.elo-change {
    font-weight: 600 !important;
    font-family: "bc-barell", monospace !important;
}

.elo-change.positive {
    color: #10b981 !important;
}

.elo-change.negative {
    color: #ef4444 !important;
}

.elo-points {
    font-family: "bc-barell", monospace !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: var(--text-light) !important;
    display: block;
    text-align: center;
    white-space: nowrap;
}

/* Match-Datum und Zeit Styling */
#matchDate {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .matches-management .table th:nth-child(2),
    .matches-management .table td:nth-child(2) {
        display: none; /* Zeit auf mobilen Geräten ausblenden */
    }
    
    .matches-management .table th:nth-child(6),
    .matches-management .table td:nth-child(6),
    .matches-management .table th:nth-child(7),
    .matches-management .table td:nth-child(7) {
        font-size: 0.85rem; /* Elo-Änderungen kleiner */
    }
    
    #matchDate {
        font-size: 0.9rem;
    }
}

/* Match Items */
.match-item {
    background: var(--card-bg) !important;
    padding: 1rem !important;
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    margin-bottom: 0.5rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
}

.match-item:hover {
    border-color: var(--primary) !important;
    transform: translateX(5px) !important;
}

.match-winner {
    font-weight: 600 !important;
    color: #10b981 !important;
}

.match-loser {
    color: var(--text-muted) !important;
}

.match-elo-change {
    font-weight: 600 !important;
    font-family: "bc-barell", monospace !important;
}

.recent-matches-container {
    display: grid !important;
    gap: 1rem !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Neue Spieler Badge */
.new-badge {
    background: var(--gradient) !important;
    color: white !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    margin-left: 0.5rem !important;
    display: inline-block !important;
}

/* Statistik Button */
.btn-player-stats {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    color: var(--text-light) !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-player-stats:hover {
    background: var(--gradient) !important;
    border-color: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 99, 56, 0.1);
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--gradient);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.25rem;
}

.pagination-right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rows-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.rows-select {
    background: var(--bg-dark-3);
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    height: 32px;
}

/* Stats für Ranking */
.ranking-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.ranking-stat {
    text-align: center;
}

.ranking-stat-number {
    display: block;
    font-family: "strenuous", sans-serif;
    font-size: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.ranking-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.section-stats {
    padding: 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}


.section-stats.dark {
    background: rgba(10, 25, 41, 0.7);
    border-radius: 32px;
    margin: 4rem auto;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.section-stats.dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.section.dark {
    background: rgba(10, 25, 41, 0.7);
    border-radius: 32px;
    margin: 4rem auto;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.section.dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.section-title {
    font-family: "strenuous", sans-serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===== MOBILE CARD VIEW STYLES ===== */
.cards-container {
    display: none;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 0, 0);
}

.combo-card {
    background: var(--bg-dark-3);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 0.9rem;
    position: relative;
    transition: none !important;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* FESTE HÖHE: */
    max-height: 140px !important;
    overflow: visible;
    z-index: 1;
    isolation: isolate;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    flex-shrink: 0;
}

.card-rank {
    background: var(--gradient);
    color: white;
    font-family: "strenuous", sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-player-info {
    flex: 1;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    min-width: 0;
}

.card-player-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    line-height: 1.2;
}

.card-new-badge {
    background: var(--gradient);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-left: 0.3rem;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.card-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    /* FESTE HÖHE: */
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    flex: 1;
    align-content: stretch;
}

.card-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 0.6rem;
    text-align: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    overflow: hidden;
}

.card-stat-value {
    font-family: "bc-barell", monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.15rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-sort-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.4rem 0.75rem;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.mobile-sort-btn.active {
    background: rgba(255, 99, 56, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobile Division Filter */
.mobile-division-container {
    display: none;
    margin: 0.5rem 0 0.75rem 0 !important;
    width: 100%;
}

.mobile-division-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: "bc-barell", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.mobile-division-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 99, 56, 0.1);
}

.mobile-division-select option {
    background: var(--bg-dark-3);
    color: var(--text-light);
    padding: 0.5rem;
}

/* Mobile Controls - Adjust spacing */
.mobile-controls {
    display: none;
    margin: 0.75rem 0;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Search Container - Adjust margin when division filter is present */
.mobile-search-container {
    display: none;
    margin: 0.75rem 0 1rem 0 !important; /* Adjusted margin */
    position: relative;
    width: 100%;
    order: 1;
}

.mobile-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: var(--bg-dark-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: "bc-barell", sans-serif;
    transition: all 0.3s ease;
}

.mobile-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 99, 56, 0.1);
}

.mobile-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* Mobile View Toggle */
.mobile-view-toggle {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.view-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.view-toggle-btn.active {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
}

/* Mobile Pagination */
.mobile-pagination-info {
    display: block !important;
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    background: var(--bg-dark-3);
    margin-top: 0.5rem;
    border-radius: 0 0 10px 10px;
}

.mobile-pagination-controls {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    margin-top: 0.5rem;
}

.mobile-page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mobile-page-btn.active {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
}

.mobile-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mobile-page-btn:not(:disabled):hover {
    background: var(--gradient);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ===== KOMPAKTE DOWNLOAD-SECTION ===== */
.compact-download-section {
    background: var(--bg-dark-3);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem auto 3rem;
    border: 1px solid var(--border);
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

.compact-download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.compact-download-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.compact-download-title {
    font-family: "bc-barell", sans-serif;
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 0.5rem;
}

.compact-download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.compact-store-badge {
    display: block;
    transition: transform 0.3s ease;
    height: 50px;
}

.compact-store-badge:hover {
    transform: scale(1.05);
}

.compact-store-badge img {
    height: 100%;
    width: auto;
}

.compact-download-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ===== FOOTER ===== */
.footer-centered {
    background: var(--bg-dark-3);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    width: 100%;
    margin-top: 4rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.footer-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.link-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 150px;
}

.link-column a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.link-column a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .ranking-table th:nth-child(5), /* Letzte Aktivität */
    .ranking-table td:nth-child(5) {
        width: 130px !important;
        min-width: 130px;
        max-width: 130px;
    }
    
    .ranking-table th:nth-child(4), /* Division */
    .ranking-table td:nth-child(4) {
        width: 110px !important;
        min-width: 110px;
        max-width: 110px;
    }
}

@media (max-width: 1100px) {
    .ranking-table th:nth-child(5), /* Letzte Aktivität */
    .ranking-table td:nth-child(5) {
        width: 120px !important;
        min-width: 120px;
        max-width: 120px;
    }
    
    .ranking-table th:nth-child(3), /* Elo */
    .ranking-table td:nth-child(3) {
        width: 100px !important;
        min-width: 100px;
        max-width: 100px;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .table-wrapper {
        display: block !important;
        overflow-x: visible !important; /* Kein horizontales Scrollen */
    }
    
    .ranking-table {
        width: 100% !important;
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .table-wrapper {
        display: none !important;
    }
    
    .cards-container {
        display: grid !important;
    }
    
    .mobile-controls {
        display: flex !important;
    }

        .mobile-division-container {
        display: block !important; /* Mobile Division Filter anzeigen */
    }
    
    .mobile-search-container {
        display: block !important;
    }
    
    .mobile-view-toggle {
        display: flex !important;
    }
    
    .filters {
        display: none !important;
    }
    
    .sort-controls {
        display: none !important;
    }
    
    .ranking-hero {
        min-height: 30vh !important;
        padding: 1.5rem 1rem !important;
    }
    
    .ranking-title {
        font-size: 2rem !important;
    }
    
    .ranking-subtitle {
        font-size: 1rem !important;
    }
    
    .controls-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    .filters {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .filter-group {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    #divisionFilter,
    #searchPlayer {
        width: 100% !important;
    }
    
    .division-badge {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
        min-width: 70px !important;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .ranking-stats {
        gap: 2rem;
    }
    
    .ranking-stat-number {
        font-size: 1.5rem;
    }
    
    .compact-download-section {
        padding: 1.25rem;
        margin: 1.5rem auto 2rem;
        border-radius: 12px;
    }
    
    .compact-download-title {
        font-size: 1.1rem;
    }
    
    .compact-store-badge {
        height: 45px;
    }
    
    .footer-centered {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
    }
    
    .link-column {
        align-items: center;
        text-align: center;
    }
    
    .pagination-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding: 1rem !important;
    }
    
        .pagination-info {
        order: 3 !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
        font-size: 0.8rem !important;
    }

        .pagination-controls {
        order: 1 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.25rem !important;
    }
    
    .pagination-right-section {
        order: 2 !important;
        margin-left: 0 !important;
    }
    
    .page-btn {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0.25rem !important;
        font-size: 0.8rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
        .page-btn i {
        font-size: 0.8rem !important;
    }
    
    #pageNumbers {
        display: flex !important;
        gap: 0.25rem !important;
    }
    
    .rows-per-page {
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
    }
    
    .rows-select {
        height: 28px !important;
        font-size: 0.8rem !important;
    }

}

@media (min-width: 769px) {
    .cards-container {
        display: none !important;
    }
    
    .table-wrapper {
        display: block !important;
    }
    
    .mobile-controls {
        display: none !important;
    }
    
    .mobile-search-container {
        display: none !important;
    }
    
    .mobile-view-toggle {
        display: none !important;
    }
    
    .mobile-pagination-info {
        display: none !important;
    }
    
    .mobile-pagination-controls {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .ranking-hero {
        min-height: 25vh !important;
    }
    
    .ranking-title {
        font-size: 1.5rem !important;
    }
    
    .ranking-badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.8rem !important;
    }
    
    .filter-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }
    
    .filter-label {
        text-align: left !important;
    }
    
    .combo-card {
        padding: 0.65rem;
    }
    
    .card-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.4rem;
        max-height: 130px !important;
    }
    
    .card-rank {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .card-player-name {
        font-size: 0.85rem;
    }
    
    .card-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .card-stat {
        padding: 0.4rem;
    }
    
    .card-stat-value {
        font-size: 0.85rem;
    }
    
    .card-stat-label {
        font-size: 0.55rem;
    }
    
    .compact-download-section {
        padding: 1rem;
        margin: 1rem auto 1.5rem;
    }
    
    .compact-download-title {
        font-size: 1rem;
    }
    
    .compact-store-badge {
        height: 40px;
    }
    
    .compact-download-buttons {
        gap: 0.5rem;
    }
    
    .compact-download-note {
        font-size: 0.8rem;
    }
    
    .footer-links {
        width: 100%;
    }
    
    .link-column {
        min-width: 100%;
    }
        .pagination-container {
        gap: 0.25rem !important;
        padding: 0.75rem !important;
    }
    
    .pagination-controls {
        gap: 0.1rem !important;
    }
    
    .page-btn {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
    }
    
    .page-btn i {
        font-size: 0.75rem !important;
    }
    
    #pageNumbers {
        gap: 0.1rem !important;
    }
    
    .rows-per-page {
        font-size: 0.75rem !important;
    }
}

/* Animation for search results */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.combo-card {
    animation: fadeIn 0.3s ease-out;
}

/* Mode Toggle Buttons */
.mode-toggle-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 0 1rem;
}

.mode-toggle-buttons {
    display: flex;
    background: var(--bg-dark-3);
    border-radius: 12px;
    padding: 0.25rem;
    border: 1px solid var(--border);
    max-width: 400px;
    width: 100%;
}

.mode-toggle-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: "bc-barell", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.mode-toggle-btn.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 99, 56, 0.3);
}

.mode-toggle-btn i {
    font-size: 0.9rem;
}

/* Team-specific styles */
.team-tag {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Responsive adjustments for toggle buttons */
@media (max-width: 768px) {
    .mode-toggle-container {
        margin: 1rem 0;
        padding: 0 0.5rem;
    }
    
    .mode-toggle-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .mode-toggle-btn i {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mode-toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .mode-toggle-btn i {
        display: none; /* Icons auf sehr kleinen Bildschirmen ausblenden */
    }
}

.match-item .team-tag {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 0.3rem;
}

@media (max-width: 768px) {
    .match-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .match-item > div:first-child {
        width: 100%;
        text-align: center;
    }
    
    .match-item > div:last-child {
        width: 100%;
        justify-content: center;
    }
}

.ranking-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}


.ranking-stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* Gleiche Breite und Höhe für alle Boxen */
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ranking-stat:hover {
    transform: translateY(-5px);
    /* Gleicher Rahmen auf allen Seiten */
    border: 2px solid var(--primary);
    box-shadow: 
        0 10px 30px rgba(255, 99, 56, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Entferne den ::before Pseudo-Element oder passe es an */
.ranking-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ranking-stat:hover::before {
    opacity: 1;
}

.ranking-stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: "strenuous", sans-serif;
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ranking-stat-number i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.ranking-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .ranking-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .ranking-stat {
        padding: 1rem;
    }
    
    .ranking-stat-number {
        font-size: 2rem;
    }
    
    .ranking-stat-number i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .ranking-stats {
        grid-template-columns: 1fr;
    }
}