@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@300;500;700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #fbbf24;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 0;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 15px;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.search-container {
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

input[type="text"] {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    width: 300px;
    font-family: inherit;
    font-size: 1.1rem;
}

button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

.top-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
    margin-top: 0;
}

.top-table th {
    padding: 5px 15px;
    text-align: left;
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.top-table tr {
    height: 85px;
    transition: transform 0.2s;
}

.top-table tbody tr:hover {
    transform: scale(1.005);
}

.top-table td {
    padding: 0 10px;
    background: var(--bg-card);
    /* Fundo no TD */
    vertical-align: middle;
}

.top-table td:first-child {
    border-radius: 10px 0 0 10px;
    padding-left: 20px;
    padding-right: 0 !important;
    width: 60px;
    white-space: nowrap;
    box-shadow: 2px 0 0 var(--bg-card);
    /* Preenche qualquer fenda visual */
}

.top-table td:nth-child(2) {
    padding-left: 10px !important;
}

.top-table td:last-child {
    border-radius: 0 10px 10px 0;
    padding-right: 25px;
}

.rank-cell {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
    /* Bolinha colada no número */
    height: 85px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-left: 8px;
    /* Empurra a bolinha para a direita */
}

.status-online {
    background-color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    animation: pulse-online 2s infinite;
}

.status-offline {
    background-color: #475569;
}

@keyframes pulse-online {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.player-nick {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduzi de 12px */
    font-weight: bold;
    font-size: 1.1rem;
}

.top-table td {
    padding: 12px 5px;
    /* Compacta as colunas significativamente */
    background: var(--bg-card);
    backdrop-filter: blur(5px);
}

.top-table td:first-child {
    padding-left: 20px;
    border-radius: 10px 0 0 10px;
}

.top-table td:last-child {
    padding-right: 20px;
    border-radius: 0 10px 10px 0;
}

.player-nick span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 206px;
}

/* Tabs System */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #333;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6);
    object-fit: cover;
}

.stats-badge {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-right: 5px;
}

/* Back Button Styles */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.back-btn i {
    font-size: 1.1rem;
}

/* Rank List Grid */
.rank-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.rank-item-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s;
}

.rank-item-card:hover {
    transform: scale(1.03);
    border-color: var(--primary);
}

.rank-item-card img {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.rank-item-info h4 {
    color: var(--text-main);
    margin: 0;
    font-size: 1rem;
}

.rank-item-info p {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    input[type="text"] {
        width: 100%;
    }

    .search-container {
        flex-direction: column;
    }

    h1 {
        font-size: 1.8rem;
    }

    .player-nick span {
        max-width: 156px;
        font-size: 0.9rem;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

    .top-table td:first-child {
        padding-left: 15px !important;
        width: 65px !important;
    }

    .rank-cell {
        gap: 6px;
    }

    .top-table td,
    .top-table th {
        padding: 10px 5px;
    }

    .tabs {
        gap: 5px;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .stats-badge {
        white-space: nowrap;
        display: inline-block;
    }
}