/* ========================================================
   LA PLEBE - STATISTIQUES & CLASSEMENTS
   Feuille de style spécifique (stats.css)
   ======================================================== */

.stats-section {
    margin: 2rem 0;
}

/* Server Overview Cards */
.server-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.overview-card:hover {
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.overview-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.overview-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.overview-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Main Stats Navigation */
.stats-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stats-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.stats-nav-btn svg {
    width: 18px;
    height: 18px;
}

.stats-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border);
}

.stats-nav-btn.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

/* Stats Views */
.stats-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.stats-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Filters & Selectors */
.category-selector {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.category-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-select, .stats-input {
    background: #0f121d;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition);
}

.stats-select:focus, .stats-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.view-toggle {
    display: flex;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    background: rgba(255, 255, 255, 0.03);
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: var(--gold);
    color: #000;
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

/* Leaderboard Podium */
.leaderboard-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0 2rem;
    min-height: 240px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 160px;
    position: relative;
}

.podium-place.first {
    order: 2;
}
.podium-place.second {
    order: 1;
}
.podium-place.third {
    order: 3;
}

.podium-crown {
    font-size: 2rem;
    margin-bottom: -0.25rem;
    animation: float 3s ease-in-out infinite;
}

.podium-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    background: #111;
}

.podium-place.first .podium-avatar img {
    border-color: var(--gold);
    width: 76px;
    height: 76px;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.podium-info {
    margin: 0.75rem 0;
}

.podium-rank {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.3rem;
}

.podium-place.first .podium-rank {
    background: var(--gold);
    color: #000;
}

.podium-name {
    font-weight: 700;
    font-size: 1rem;
    display: block;
}

.podium-score {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
}

.podium-bar {
    width: 100%;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: linear-gradient(to top, rgba(234, 179, 8, 0.05), rgba(234, 179, 8, 0.2));
    border: 1px solid var(--border);
    border-bottom: none;
}

.podium-place.first .podium-bar {
    height: 120px;
    background: linear-gradient(to top, rgba(234, 179, 8, 0.1), rgba(234, 179, 8, 0.35));
}
.podium-place.second .podium-bar {
    height: 85px;
}
.podium-place.third .podium-bar {
    height: 60px;
}

/* Leaderboard List */
.leaderboard-list {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lb-row {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.lb-row:last-child {
    border-bottom: none;
}

.lb-row:not(.header):hover {
    background: rgba(255, 255, 255, 0.03);
}

.lb-row.header {
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.lb-rank {
    font-weight: 700;
    color: var(--text-muted);
}

.lb-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.lb-player img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.lb-score {
    text-align: right;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--gold);
}

/* Items Gallery */
.items-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.item-card:hover {
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.item-image {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

.item-fallback {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--gold);
}

.item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.item-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
}

/* Items Table */
.items-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th, .stats-table td {
    padding: 0.85rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.stats-table th {
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stats-table td.item-count {
    text-align: right;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

/* Mobs Views */
.mobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.mobs-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.mobs-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.mobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mob-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-size: 0.85rem;
}

.mob-count {
    font-weight: 700;
    color: var(--gold);
}

/* Player Profile */
.player-profile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-glow);
}

.profile-header-enhanced {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-skin-container {
    background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 70%);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.profile-body {
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.profile-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.profile-name-row h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
}

.profile-uuid {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.profile-account-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-stat {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.profile-stat .value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gold);
}

.profile-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-sections-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-combat-section, .profile-exploration-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.profile-combat-section h4, .profile-exploration-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.profile-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.profile-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mini-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.25rem 0;
}

.mini-item .count {
    color: var(--gold);
    font-weight: 700;
}

/* Stats Update Notice */
.stats-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.stats-notice svg {
    width: 14px;
    height: 14px;
}
