:root {
    --dark-crimson: #8a0303;
    --kill: #ff3f34;
    --death: #808e9b;
    --time: #00d2d3;
    --combat: #ff9f43;
    --offense: #ff5e57;
    --defense: #0be881;
    --support: #34e7e4;
    --streak: #d980fa;
    --glass-panel: rgba(10, 10, 12, 0.85); 
}

.content-wrapper { padding-top: 130px; padding-bottom: 80px; width: 100%; max-width: 1300px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; align-items: center; z-index: 10; }

.section-header { text-align: center; margin-bottom: 60px; width: 100%; position: relative; }

.section-header h1 { 
    font-family: 'Teko', sans-serif; 
    font-weight: 600;
    font-size: 4.5rem; 
    color: #fff; 
    text-shadow: 0 0 30px var(--primary-glow); 
    margin-bottom: 0px; 
    letter-spacing: 3px; 
    line-height: 0.9;
}

.section-header span { font-family: 'Rajdhani'; font-weight: 600; color: var(--primary); font-size: 1.2rem; letter-spacing: 6px; border-bottom: 1px solid var(--primary); padding-bottom: 5px; text-transform: uppercase; opacity: 0.9; }

.glass-header-box { display: inline-block; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%); border-top: 1px solid var(--primary); border-bottom: 1px solid var(--primary); padding: 15px 60px; margin-bottom: 40px; }
.glass-header-box span { font-size: 1.8rem; color: #fff; letter-spacing: 3px; font-family: 'Teko'; text-shadow: 0 0 10px #000; }

.podium-container { display: flex; align-items: flex-end; justify-content: center; gap: 40px; margin-bottom: 80px; width: 100%; height: 500px; }
.podium-card { background: linear-gradient(180deg, rgba(20,20,20,0.8) 0%, rgba(0,0,0,0.95) 100%); backdrop-filter: blur(10px); border-radius: 20px; width: 280px; padding: 0; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.9); border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; align-items: center; transition: transform 0.4s; overflow: visible; }
.podium-card:hover { transform: translateY(-10px); border-color: #fff; }

.rank-1 { order: 2; height: 480px; border-bottom: 6px solid var(--gold); z-index: 10; animation: pulseGlow 3s infinite; }
.rank-2 { order: 1; height: 440px; border-bottom: 6px solid var(--silver); }
.rank-3 { order: 3; height: 440px; border-bottom: 6px solid var(--bronze); }

.rank-badge { position: absolute; top: -25px; left: 50%; transform: translateX(-50%); width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-family: 'Black Ops One'; font-size: 1.5rem; color: #000; border: 3px solid #fff; z-index: 20; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.rank-2 .rank-badge { background: var(--silver); } .rank-3 .rank-badge { background: var(--bronze); }

.crown-badge-container { position: absolute; top: -65px; left: 50%; transform: translateX(-50%); z-index: 25; display: flex; justify-content: center; align-items: center; filter: drop-shadow(0 0 25px var(--gold)); animation: floatCrown 4s ease-in-out infinite; }
.crown-icon { font-size: 6rem; color: var(--gold); }
.crown-number { position: absolute; top: 60%; left: 50%; transform: translate(-50%, -50%); font-family: 'Black Ops One'; font-size: 2.2rem; color: #000; font-weight: 900; }

.p-avatar-area { margin-top: 40px; margin-bottom: 10px; position: relative; }
.p-avatar { width: 110px; height: 110px; object-fit: cover; border-radius: 50%; border: 4px solid rgba(255,255,255,0.1); background: #000; }
.rank-1 .p-avatar { width: 130px; height: 130px; border-color: var(--gold); margin-top: 50px; }
.rank-2 .p-avatar { border-color: var(--silver); } .rank-3 .p-avatar { border-color: var(--bronze); }

.p-info { width: 100%; padding: 0 10px; margin-bottom: 10px; }
.p-name { font-family: 'Teko', sans-serif; font-size: 2.2rem; color: #fff; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px rgba(0,0,0,0.8); line-height: 1; }
.p-score { font-family: 'Rajdhani'; font-weight: 800; font-size: 1.5rem; color: var(--primary); display: block; margin-top: 5px; }

.p-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; background: rgba(0,0,0,0.8); padding: 15px; border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; margin-top: auto; border-top: 1px solid rgba(255,255,255,0.1); }
.ps-item { display: flex; flex-direction: column; align-items: center; }
.ps-lbl { font-size: 0.75rem; color: #999; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.ps-val { font-size: 1.25rem; font-weight: 700; color: #fff; font-family: 'Rajdhani'; }

.table-container { width: 100%; background: var(--glass-panel); border-radius: 15px; border: 1px solid var(--glass-border); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.9); margin-bottom: 80px; backdrop-filter: blur(20px); }
.table-header { display: grid; grid-template-columns: 70px 3fr 1fr 1fr 1fr 1fr; background: #000; border-bottom: 2px solid var(--primary); padding-right: 6px; }
.th-cell { padding: 20px 10px; font-family: 'Teko'; font-size: 1.3rem; color: #ccc; letter-spacing: 1px; text-align: center; cursor: pointer; transition: 0.2s; }
.th-cell:hover { color: #fff; text-shadow: 0 0 10px #fff; }
.th-cell.active-sort { color: var(--primary); text-shadow: 0 0 15px var(--primary); }
.th-left { justify-content: flex-start; padding-left: 30px; text-align: left; }
.table-scroll-body { max-height: 600px; overflow-y: auto; overflow-x: hidden; }
.table-row { display: grid; grid-template-columns: 70px 3fr 1fr 1fr 1fr 1fr; border-bottom: 1px solid rgba(255,255,255,0.03); transition: 0.2s; align-items: center; height: 55px; }
.table-row:hover { background: rgba(255, 26, 26, 0.08); border-left: 4px solid var(--primary); }
.td-cell { padding: 0 10px; font-size: 1.1rem; font-weight: 500; color: #ddd; text-align: center; }
.td-rank { font-family: 'Black Ops One'; font-size: 1.2rem; color: #666; }
.td-user { display: flex; align-items: center; gap: 15px; text-align: left; padding-left: 30px; }
.td-avatar { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; border: 1px solid #333; }
.td-name { font-weight: 700; font-size: 1.1rem; color: #fff; letter-spacing: 0.5px; }
.td-score { color: var(--primary); font-weight: 800; font-size: 1.2rem; }
.kd-tag { background: #222; padding: 3px 8px; border-radius: 4px; font-size: 1rem; border: 1px solid #444; font-weight: bold; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; width: 100%; margin-bottom: 50px; }

.mini-stat-panel {
    background: rgba(10, 10, 12, 0.7); backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.05); border-radius: 12px;
    overflow: hidden; display: flex; flex-direction: column; height: 380px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.6); transition: transform 0.3s;
}
.mini-stat-panel:hover { transform: translateY(-5px); box-shadow: 0 15px 50px rgba(0,0,0,0.8); }

.c-kills, .c-deaths, .c-time { border-left: 3px solid var(--time); box-shadow: inset 15px 0 30px -10px rgba(0, 210, 211, 0.1); }
.row-1-style .msp-title i { color: var(--time); }
.c-combat, .c-offense, .c-defense { border-left: 3px solid var(--gold); box-shadow: inset 15px 0 30px -10px rgba(255, 204, 0, 0.1); }
.row-2-style .msp-title i { color: var(--gold); }
.c-support, .c-streak, .c-kd { border-left: 3px solid var(--streak); box-shadow: inset 15px 0 30px -10px rgba(155, 89, 182, 0.1); }
.row-3-style .msp-title i { color: var(--streak); }

.msp-header { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; background: #000; }
.msp-title { font-family: 'Teko'; font-size: 1.4rem; color: #fff; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.msp-title i { font-size: 1.1rem; filter: drop-shadow(0 0 5px currentColor); }
.mini-table-header { display: flex; padding: 10px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); font-family: 'Teko'; font-size: 1rem; color: #999; letter-spacing: 1px; }
.mh-rank { width: 40px; text-align: center; }
.mh-user { flex: 1; padding-left: 10px; }
.mh-val { width: 70px; text-align: right; }
.mini-table-body { flex: 1; overflow-y: auto; padding-bottom: 5px; }
.mt-row { display: flex; align-items: center; padding: 0 15px; border-bottom: 1px solid rgba(255,255,255,0.02); height: 38px; transition: background 0.2s; }
.mt-row:hover { background: rgba(255,255,255,0.08); }
.mt-rank { width: 40px; text-align: center; font-weight: bold; font-family: 'Black Ops One'; font-size: 0.9rem; color: #555; }
.rank-gold-txt { color: var(--gold); text-shadow: 0 0 10px var(--gold); opacity: 1; }
.rank-silver-txt { color: var(--silver); text-shadow: 0 0 10px var(--silver); opacity: 1; }
.rank-bronze-txt { color: var(--bronze); text-shadow: 0 0 10px var(--bronze); opacity: 1; }
.mt-user { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 10px; overflow: hidden; }
.mt-val { width: 70px; text-align: right; font-weight: bold; color: #fff; font-size: 1.05rem; }
.mt-avatar { width: 24px; height: 24px; border-radius: 4px; object-fit: cover; border: 1px solid #333; }
.mt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1rem; color: #eee; font-weight: 500; }

@keyframes pulseGlow { 0% { box-shadow: 0 0 15px rgba(255,215,0,0.2); } 50% { box-shadow: 0 0 35px rgba(255,215,0,0.5); } 100% { box-shadow: 0 0 15px rgba(255,215,0,0.2); } }
@keyframes floatCrown { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.animate-in { animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.3s; } .delay-3 { animation-delay: 0.5s; }

/* MODAL STYLES */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    width: 500px; max-height: 80vh; background: #0e0e10;
    border: 1px solid #333; border-radius: 30px;
    box-shadow: 0 0 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.05);
    display: flex; flex-direction: column; padding: 0;
    transform: scale(0.95) translateY(20px); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); overflow: hidden;
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.modal-header { padding: 15px 25px; background: linear-gradient(90deg, rgba(255, 26, 26, 0.15) 0%, transparent 100%); border-bottom: 1px solid rgba(255, 26, 26, 0.3); display: flex; justify-content: space-between; align-items: center; }
.modal-player-name { font-family: 'Black Ops One'; font-size: 1.5rem; color: #fff; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 26, 26, 0.4); }
.modal-close { background: none; border: none; color: #666; font-size: 1.2rem; cursor: pointer; transition: 0.2s; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 50%; }
.modal-close:hover { color: #fff; border-color: #666; background: rgba(255,255,255,0.05); }

.modal-body { padding: 20px 25px; overflow-y: auto; }
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 50px; }

.modal-section-title { font-family: 'Teko'; font-size: 1.1rem; color: #fff; letter-spacing: 1px; border-left: 3px solid var(--primary); padding-left: 10px; margin-bottom: 12px; text-transform: uppercase; background: linear-gradient(90deg, rgba(255, 26, 26, 0.05), transparent); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.stat-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); padding: 12px; border-radius: 10px; }
.detail-list { display: flex; flex-direction: column; gap: 4px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; font-family: 'Rajdhani'; font-size: 0.95rem; color: #aaa; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.detail-row:last-child { border-bottom: none; }
.detail-row span:last-child { color: #fff; font-weight: 700; font-family: 'Teko'; font-size: 1.1rem; }
.weapon-list { display: flex; flex-direction: column; gap: 8px; }
.weapon-bar-container { width: 100%; }
.wb-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: #bbb; margin-bottom: 2px; font-family: 'Rajdhani'; font-weight: 600; }
.wb-track { width: 100%; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.wb-fill { height: 100%; background: var(--primary); border-radius: 2px; box-shadow: 0 0 8px rgba(255, 26, 26, 0.5); }

/* ==== MOBİL UYUMLULUK (MEDIA QUERIES) ==== */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px; }
    .table-container { width: 95%; margin: 0 auto 80px; }
}

@media (max-width: 900px) {
    .content-wrapper { padding-top: 100px; padding-bottom: 40px; }
    .section-header h1 { font-size: 3.5rem; }
    
    /* Podium Dikey Hizalama */
    .podium-container { 
        flex-direction: column; 
        height: auto; 
        align-items: center; 
        gap: 60px; 
        margin-top: 50px;
    }
    .podium-card { width: 90%; max-width: 320px; }
    .rank-1 { order: 1; height: auto; padding-bottom: 20px; }
    .rank-2 { order: 2; height: auto; padding-bottom: 20px; }
    .rank-3 { order: 3; height: auto; padding-bottom: 20px; }
    .crown-badge-container { top: -50px; }

    /* Ana Tablo Oranlarının Dengelenmesi */
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
    .table-header, .table-row {
        /* 3fr yerine 2fr kullanarak sağdaki sütunlara yer açıyoruz */
        grid-template-columns: 45px minmax(130px, 2fr) 1fr 1fr 1fr 1fr;
        min-width: 550px; 
    }
    .th-cell { padding: 15px 5px; font-size: 1.1rem; }
    .th-left { padding-left: 10px; }
    .td-user { padding-left: 10px; gap: 8px; }

    /* Modal Mobil Düzenlemesi */
    .modal-content { width: 90%; margin: 0 5%; }
}

@media (max-width: 600px) {
    .section-header h1 { font-size: 2.5rem; }
    .glass-header-box { padding: 10px 30px; }
    .glass-header-box span { font-size: 1.3rem; }
    .category-grid { grid-template-columns: 1fr; padding: 0 15px; }
    .stat-grid { grid-template-columns: 1fr; gap: 15px; }
    
    /* === ANA TABLOYU TEK EKRANA SIĞDIRMA (Scrollsuz) === */
    .table-header, .table-row {
        /* Sütunları daraltıp ekrana tam oturtuyoruz */
        grid-template-columns: 35px minmax(100px, 2.5fr) 1fr 1fr 1fr 1fr;
        min-width: 100%; 
        width: 100%;
    }
    .table-row { height: 48px; } /* Satır boyunu biraz kısalttık */
    
    .th-cell {
        padding: 10px 2px;
        font-size: 0.8rem; /* Başlıklar sığsın diye küçültüldü */
        letter-spacing: 0;
    }
    .th-left { padding-left: 5px; }
    
    .td-cell {
        padding: 0 2px;
        font-size: 0.85rem;
    }
    .td-user { padding-left: 5px; gap: 5px; }
    .td-avatar { width: 22px; height: 22px; border-radius: 4px; }
    
    /* İsim çok uzunsa ızgarayı bozmaması için sonuna ... ekler */
    .td-name { 
        font-size: 0.85rem; 
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
        max-width: 90px; 
    }
    
    .td-score { font-size: 0.9rem; }
    .kd-tag { padding: 2px 4px; font-size: 0.75rem; border: none; }
}