:root {
    --c-combat: #e74c3c;
    --c-offense: #f39c12;
    --c-defense: #2ecc71;
    --c-support: #3498db;
}

.content-wrapper {
    flex: 1; 
    width: 100%; 
    padding-top: 100px; padding-bottom: 50px;
    display: flex; flex-direction: column; align-items: center; gap: 30px; 
    position: relative; z-index: 10;
}

.server-widget {
    width: 680px; height: 310px; flex-shrink: 0;
    background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border); border-radius: 25px; display: flex; overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    transition: all 0.4s ease;
    animation: slideUpFade 0.8s ease-out;
}
.server-widget:hover { border-color: rgba(255, 26, 26, 0.5); box-shadow: 0 0 35px rgba(255, 26, 26, 0.25); transform: translateY(-3px); }
.widget-left { width: 48%; position: relative; overflow: hidden; background-color: #000; }
.widget-left::after { content: ''; position: absolute; top: 0; right: 0; width: 60px; height: 100%; background: linear-gradient(to right, transparent, rgba(12, 12, 14, 0.95)); z-index: 2; pointer-events: none; }
.map-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease, opacity 0.5s ease; filter: brightness(0.65); opacity: 0; }
.map-bg.loaded { opacity: 1; }
.server-widget:hover .map-bg { transform: scale(1.05); filter: brightness(0.85); }

.map-score-overlay {
    position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px);
    padding: 3px 15px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08);
    text-align: center; display: flex; flex-direction: column; align-items: center; min-width: 120px; z-index: 5;
}
.score-title { font-family: 'Teko'; font-size: 0.6rem; color: #aaa; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1px; }
.score-row { display: flex; justify-content: space-between; width: 100%; align-items: center; gap: 15px; }
.team-s { display: flex; flex-direction: column; align-items: center; }
.ts-val { font-family: 'Rajdhani'; font-weight: 700; font-size: 1.1rem; color: #fff; line-height: 1; }
.ts-name { font-size: 0.5rem; color: #ddd; letter-spacing: 1px; font-weight: 600; }
.ts-ally { color: #5dade2; } .ts-axis { color: #e74c3c; }

.map-info-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent 90%);
    display: flex; flex-direction: column; justify-content: flex-end; z-index: 5;
}
.map-name-text { font-family: 'Black Ops One'; font-size: 1.2rem; color: #fff; line-height: 1; text-transform: uppercase; margin-bottom: 2px; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }
.soft-mode-text { font-family: 'Rajdhani'; font-weight: 500; font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); text-transform: uppercase; letter-spacing: 1px; font-style: italic; }

.widget-right { width: 52%; padding: 35px 40px; display: flex; flex-direction: column; justify-content: space-evenly; position: relative; z-index: 3; }
.label-text { font-family: 'Teko'; font-size: 0.9rem; color: #888; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 5px; display: block; }
.player-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.p-val { font-family: 'Rajdhani'; font-size: 2.5rem; font-weight: 700; color: #fff; line-height: 1; }
.p-max { font-family: 'Rajdhani'; font-size: 1.2rem; color: #666; font-weight: 600; }
.progress-track { width: 100%; height: 5px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--bar-green); border-radius: 4px; width: 0%; box-shadow: 0 0 10px rgba(46, 204, 113, 0.4); transition: width 1s ease; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; }
.time-val { font-family: 'Rajdhani'; font-size: 1.3rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 6px; }
.time-icon { font-size: 0.9rem; color: #666; }
.status-badge { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: rgba(46, 204, 113, 0.08); border: 1px solid rgba(46, 204, 113, 0.2); border-radius: 8px; }
.st-dot { width: 6px; height: 6px; background: var(--status-green); border-radius: 50%; box-shadow: 0 0 8px var(--status-green); }
.st-text { font-family: 'Teko'; font-size: 1rem; color: var(--status-green); letter-spacing: 0.8px; margin-top: 2px; }

.stats-container {
    width: 1000px; max-width: 95%;
    background: rgba(10, 10, 12, 0.25); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 20px;
    display: flex; flex-direction: column;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    animation: slideUpFade 1s ease-out 0.2s backwards;
    margin-bottom: 20px; overflow: hidden;
}

.stats-header {
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; justify-content: space-between; align-items: center;
}
.stats-title { font-family: 'Black Ops One'; font-size: 1.4rem; color: #fff; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.stats-title i { color: var(--primary); font-size: 1.1rem; }

.instruction-badge {
    font-family: 'Teko'; 
    color: #fff; 
    letter-spacing: 1px; 
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08); 
    padding: 5px 15px;
    border-radius: 50px; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 8px;
}
.instruction-badge i { color: var(--primary); font-size: 0.9rem; }

/* TABLE & SCROLL */
.table-wrapper { 
    overflow-x: auto; 
    padding: 10px 0 20px; 
    width: 100%; 
    -webkit-overflow-scrolling: touch; /* Mobilde yumuşak kaydırma */
}
.player-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 4px; 
    text-align: left; 
    padding: 0 15px; 
}
.player-table th, .player-table td {
    white-space: nowrap; /* Yazıların alt satıra kayıp tabloyu bozmasını engeller */
}
.player-table th {
    padding: 10px 15px;
    font-family: 'Teko'; font-size: 1.1rem; color: #888; font-weight: 500; letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: transparent; cursor: pointer; transition: color 0.2s; user-select: none;
}
.player-table th:hover { color: var(--primary); }
.player-table th.sorted-asc::after { content: ' ▲'; color: var(--primary); font-size: 0.8rem; }
.player-table th.sorted-desc::after { content: ' ▼'; color: var(--primary); font-size: 0.8rem; }

.player-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer; position: relative; border-radius: 8px;
}
.player-table tbody tr td {
    padding: 12px 15px; color: #ccc; 
    font-family: 'Rajdhani'; font-weight: 600; font-size: 1.05rem;
    border-top: 1px solid transparent; border-bottom: 1px solid transparent;
}
.player-table tbody tr td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.player-table tbody tr td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.player-table tbody tr:hover { background: rgba(255, 26, 26, 0.08); transform: translateX(5px); box-shadow: 0 5px 15px rgba(255, 26, 26, 0.1); }
.player-table tbody tr:hover td:first-child { border-left: 3px solid var(--primary); }
.player-table tbody tr td:first-child { border-left: 3px solid transparent; transition: border-left 0.2s; }

.col-rank { color: #666; text-align: center; width: 50px; font-family: 'Teko'; font-size: 1.2rem; }
.col-name { color: #fff !important; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px; }
.col-score { text-align: center; width: 80px; font-variant-numeric: tabular-nums; }
.s-combat { color: var(--c-combat); opacity: 0.9; }
.s-offense { color: var(--c-offense); opacity: 0.9; }
.s-defense { color: var(--c-defense); opacity: 0.9; }
.s-support { color: var(--c-support); opacity: 0.9; }
.col-kd-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; padding: 2px 8px; color: #fff; font-size: 0.95rem; display: inline-block; min-width: 50px; text-align: center; }

/* MODAL STİLLERİ */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s ease;
    display: flex; justify-content: center; align-items: center; padding: 20px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    width: 90%; max-width: 500px; /* Genişliği mobilde taşmaması için %90 yapıldı */
    max-height: 80vh; background: rgba(10, 10, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.05);
    display: flex; flex-direction: column;
    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: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255, 255, 255, 0.05); border-top: 3px solid var(--primary); 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: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); color: #ccc; font-size: 1rem; cursor: pointer; transition: 0.3s; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.modal-close:hover { color: #fff; border-color: rgba(255,26,26,0.3); background: rgba(255,26,26,0.1); transform: rotate(90deg); }

.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: 15px; border-radius: 12px; }
.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: 4px 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: 10px; }
.weapon-bar-container { width: 100%; }
.wb-label { display: flex; justify-content: space-between; font-size: 0.85rem; color: #bbb; margin-bottom: 4px; font-family: 'Rajdhani'; font-weight: 600; }
.wb-track { width: 100%; height: 5px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.wb-fill { height: 100%; background: var(--primary); border-radius: 4px; box-shadow: 0 0 8px rgba(255, 26, 26, 0.5); }

@keyframes slideUpFade { 0% { opacity: 0; transform: translateY(40px); } 100% { opacity: 1; transform: translateY(0); } }

/* ==== MOBİL UYUMLULUK ==== */
@media (max-width: 900px) {
    .content-wrapper { padding-top: 80px; }
    .server-widget { width: 95%; max-width: 500px; height: auto; flex-direction: column; }
    .widget-left, .widget-right { width: 100%; }
    .widget-left { height: 180px; }
    .widget-left::after { display: none; } /* Üstte kalacağı için yan gölgeyi kaldırıyoruz */
    .widget-right { padding: 25px 30px; gap: 15px; }
    .stats-container { width: 95%; }
    .player-table th, .player-table td { font-size: 0.95rem; padding: 10px 10px; }
}

@media (max-width: 600px) {
    .widget-left { height: 140px; }
    .map-score-overlay { transform: translateX(-50%) scale(0.9); top: 10px; }
    .map-info-overlay { padding: 15px; }
    .map-name-text { font-size: 1rem; }
    .widget-right { padding: 20px; }
    .p-val { font-size: 2rem; }
    .time-val { font-size: 1.1rem; }
    .footer-row { margin-top: 10px; flex-direction: row; gap: 10px; }
    
    .stats-header { flex-direction: column; gap: 15px; align-items: flex-start; padding: 15px 20px; }
    .instruction-badge { align-self: stretch; justify-content: center; }
    
    .player-table th, .player-table td { font-size: 0.85rem; padding: 10px 5px; }
    .col-score { width: 50px; }
    .col-kd-box { min-width: 45px; font-size: 0.85rem; padding: 2px 4px; }
    
    /* Modal İçi Düzenlemeler */
    .stat-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 15px; }
    .modal-header { padding: 15px 20px; }
    .modal-body { padding: 15px 20px; }
    .modal-content { max-height: 90vh; }
}