﻿/* /css/ranking.css */
:root {
    --primary-red: #ff0000;
    --gold-1: #ffb700;
}
body {
    background: url('/images/back.jpg') center top / cover fixed no-repeat;
    background-color: #05070a;
    min-height: 100vh;
}

/* ── LỚP PHỦ MÀU ĐỎ (OVERLAY) ── */
.hero-overlay {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(255,0,0,0.2) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255,183,0,0.1) 0%, transparent 60%),
        linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(5,0,10,0.9) 100%);
    z-index: 1;
    pointer-events: none;
}

.ranking-container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
    z-index: 2;
    margin-top: 100px;
    margin-bottom: 100px;
}

.rank-card {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 0, 0, 0.25);
    border-radius: 28px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(255,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.rank-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(255, 0, 0, 0.2);
}

.rank-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 3.2rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #fff, var(--gold-1), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255,0,0,0.4));
    margin: 0;
    text-transform: uppercase;
}

.rank-header p {
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    margin: 15px 0 0 0;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.table-wrapper {
    overflow-x: auto;
}

.rank-table {
    width: 100%;
    color: #fff;
    border-collapse: separate;
    border-spacing: 0 14px;
}

.rank-table thead th {
    font-family: 'Orbitron', sans-serif;
    border: none;
    color: var(--gold-1);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    padding: 18px 20px;
    background: rgba(255, 0, 0, 0.12);
    text-align: left;
    border-radius: 12px;
}

.rank-table thead th:first-child {
    border-radius: 12px 0 0 12px;
}

.rank-table thead th:last-child {
    border-radius: 0 12px 12px 0;
    text-align: right;
}

.rank-table tbody tr {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rank-table tbody tr:hover {
    background: rgba(255, 0, 0, 0.15);
    transform: scale(1.02) translateX(5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.5);
}

.rank-table tbody td {
    border: none;
    padding: 20px;
    vertical-align: middle;
}

.rank-table tbody tr td:first-child { 
    border-radius: 12px 0 0 12px; 
}
.rank-table tbody tr td:last-child { 
    border-radius: 0 12px 12px 0; 
}

.rank-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.12);
    transition: all 0.3s ease;
}

.rank-table tbody tr:hover .rank-number {
    transform: scale(1.1);
}

/* Top 3 Special Styling */
.rank-table tbody tr:nth-child(1) .rank-number { 
    background: linear-gradient(135deg, var(--gold-1), #ffcc00);
    color: #000; 
    box-shadow: 0 0 25px rgba(255, 183, 0, 0.6);
    border: none;
    font-size: 20px;
}

.rank-table tbody tr:nth-child(2) .rank-number { 
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    color: #000; 
    box-shadow: 0 0 20px rgba(224, 224, 224, 0.5);
    border: none;
    font-size: 20px;
}

.rank-table tbody tr:nth-child(3) .rank-number { 
    background: linear-gradient(135deg, #cd7f32, #d4a574);
    color: #fff; 
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
    border: none;
    font-size: 20px;
}

.player-nick {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Prompt', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
}

.player-nick:hover {
    color: var(--gold-1);
    text-shadow: 0 0 12px rgba(255, 183, 0, 0.6);
}

.lvl-badge {
    background: rgba(255, 0, 0, 0.18);
    color: var(--gold-1);
    border: 1px solid rgba(255, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 800;
    display: inline-block;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.rank-table tbody tr:hover .lvl-badge {
    background: rgba(255, 0, 0, 0.25);
    border-color: var(--gold-1);
}

.exp-val {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold-1);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
}

.rank-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
    transition: 0.2s ease;
}

.rank-table tbody tr:hover .rank-img {
    filter: drop-shadow(0 0 15px rgba(255, 183, 0, 0.6));
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .rank-card {
        padding: 40px;
    }
    
    .rank-header h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .ranking-container {
        padding: 0 15px;
        margin-top: 80px;
        margin-bottom: 80px;
    }
    
    .rank-card { 
        padding: 30px;
    }
    
    .rank-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .rank-header h1 { 
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .rank-header p {
        font-size: 12px;
    }
    
    .rank-table thead { 
        display: none;
    }
    
    .rank-table tbody tr {
        text-align: center;
        justify-items: center;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .rank-table tbody td {
        padding: 8px 0;
        border-radius: 0 !important;
		backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    }
    
    .rank-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--gold-1);
        font-family: 'Orbitron', sans-serif;
        font-size: 11px;
        display: block;
        margin-bottom: 5px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .rank-table tbody tr:nth-child(1) {
    position: relative;
    overflow: hidden;
    background: rgba(255, 183, 0, 0.1); /* Màu vàng nhạt cho hạng 1 */
    border: 1px solid var(--gold-1);
}
    .rank-number {
        margin: 0 auto;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}