.stats-page {
    max-width: 720px;
    width: 92vw;
    margin: 40px auto;
    background: linear-gradient(160deg, #3a0d5c, #1a0630);
    border: 4px solid #ffd54a;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 0 40px rgba(255, 213, 74, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.back-link {
    display: inline-block;
    color: #ffd54a;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 12px;
}

.back-link:hover {
    text-decoration: underline;
}

.ranking-link {
    margin-left: 16px;
}

.stats-page h1 {
    margin: 0 0 20px;
    font-size: 24px;
    text-shadow: 0 0 10px #ffd54a;
}

.stats-page h2 {
    font-size: 16px;
    margin: 28px 0 12px;
    color: #ffd54a;
}

.stats-card {
    text-align: center;
    padding: 24px;
}

.stats-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stats-user .user-avatar {
    display: inline-block;
    width: 40px;
    height: 40px;
}

.stats-user .digital-text {
    font-size: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
}

.stat-tile .digital-text {
    font-size: 20px;
    font-weight: bold;
}

.recent-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 213, 74, 0.3);
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.recent-table th,
.recent-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.recent-table th {
    color: #ffd54a;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.recent-table td.win-cell {
    color: #3dff7a;
    font-weight: bold;
}

.ranking-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: -8px 0 20px;
}

.ranking-table td:first-child {
    font-size: 16px;
    text-align: center;
}

.current-user-row {
    background: rgba(255, 213, 74, 0.15);
}

.current-user-row td {
    color: #ffd54a;
}
