/* ========================================================
   GOGETA - BẢNG XẾP HẠNG (bang-xep-hang.css)
   Inspired by Chibi Super Saiyan Blue Gogeta Watercolor Style
   ======================================================== */

.rank-embed-wrapper {
    background: #ffffff;
    border: 3.5px solid #0f172a;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.2), 4px 4px 0 #0f172a;
    padding: 16px;
    margin: 20px 0;
}

.ranking-section {
    padding: 10px 0;
}

.comic-ranking-header {
    position: relative;
    margin: 0 auto 16px;
    text-align: center;
}

.splash-text {
    color: #0f172a;
    font-family: "Baloo 2", "Nunito", sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.splash-subtitle {
    margin-top: 4px;
}

.splash-subtitle p {
    color: #475569;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
}

/* ==================== RANKING TABS ==================== */
.ranking-tabs {
    margin-bottom: 16px;
}

.tabs-nav {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f0f9ff;
    border: 2.5px solid #0f172a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 3px 3px 0 #0f172a;
}

.tab-link {
    padding: 10px 8px;
    cursor: pointer;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #475569;
    transition: all 0.2s ease;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-right: 2px solid #cbd5e1;
    user-select: none;
}

.tab-link:last-child {
    border-right: none;
}

.tab-link i {
    font-size: 1.2rem;
    color: #0284c7;
    transition: transform 0.2s;
}

.tab-link:hover i {
    transform: scale(1.15);
}

.tab-link.active {
    background: linear-gradient(180deg, #ffe066 0%, #ff9800 60%, #e65100 100%);
    color: #0f172a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.tab-link.active i {
    color: #0f172a;
}

/* ==================== TAB CONTENT ==================== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==================== RANKING PANEL & TABLE ==================== */
.ranking-panel {
    background-color: #ffffff;
    border: 2.5px solid #0f172a;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 3px 3px 0 #0f172a;
}

.ranking-table-container {
    background-color: #ffffff;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 2px solid #0f172a;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Nunito", sans-serif;
}

.ranking-table th {
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    color: #ffffff;
    padding: 10px 12px;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #0f172a;
    white-space: nowrap;
}

.ranking-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    vertical-align: middle;
}

.ranking-table tr:nth-child(even) td {
    background-color: #f8fafc;
}

.ranking-table tr:hover td {
    background-color: #f0f9ff;
}

/* Column dimensions */
.ranking-table .col-rank,
.ranking-table td.rank-cell {
    width: 65px;
    min-width: 55px;
    text-align: center;
}

.ranking-table .col-player,
.ranking-table td.player-cell {
    text-align: left;
}

.ranking-table .col-gender,
.ranking-table td.gender-cell {
    width: 110px;
    min-width: 90px;
    text-align: left;
}

.ranking-table .col-score,
.ranking-table td.exp-cell,
.ranking-table td.recharge-cell,
.ranking-table td.luong-cell {
    width: 150px;
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}

/* Medal & Rank Icon */
.rank-medal {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 12.5px;
    color: #475569;
}

/* Player Info Row (Avatar + Name) */
.player-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    max-width: 100%;
}

.player-avatar {
    width: 34px;
    height: 34px;
    max-width: 34px;
    max-height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #0f172a;
    background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: 1.5px 1.5px 0 rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.player-details {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Top 3 Row Accents */
.rank-row.top-first td {
    background-color: #fffbeb;
}
.rank-row.top-first .player-details {
    color: #b45309;
}

.rank-row.top-second td {
    background-color: #f8fafc;
}
.rank-row.top-second .player-details {
    color: #334155;
}

.rank-row.top-third td {
    background-color: #fff7ed;
}
.rank-row.top-third .player-details {
    color: #c2410c;
}

/* Gender & Values */
.gender-cell {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    color: #475569;
}

.exp-cell {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #0284c7;
}

.recharge-cell {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #ea580c;
}

.luong-cell {
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: #d97706;
}

.empty {
    padding: 24px 16px;
    text-align: center;
    color: #64748b;
    font-family: "Nunito", "Baloo 2", sans-serif;
    font-weight: 700;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .rank-embed-wrapper {
        padding: 10px;
    }
    .ranking-panel {
        padding: 8px;
    }
    .ranking-table th, 
    .ranking-table td {
        padding: 8px 6px;
        font-size: 12.5px;
    }
    .player-avatar {
        width: 28px;
        height: 28px;
    }
    .player-details {
        font-size: 13px;
    }
    .rank-medal {
        width: 26px;
        height: 26px;
    }
    .tab-link {
        padding: 8px 4px;
    }
    .tab-link span {
        font-size: 11px;
    }
    .tab-link i {
        font-size: 1rem;
    }
}
