/* ===== HỆ THỐNG THÀNH TỰU - CSS HOÀN CHỈNH ===== */

/* ===== RESET VÀ LAYOUT CƠ BẢN ===== */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 10px;
}

/* ===== THẺ THÀNH TỰU ===== */
.achievement-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #4CAF50;
}

/* Badge loại thành tựu */
.achievement-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    z-index: 10;
    min-width: 80px;
    text-align: center;
    text-transform: uppercase;
}

.type-personal {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: 1px solid #20c997;
}

.type-server {
    background: linear-gradient(135deg, #17a2b8 0%, #0dcaf0 100%);
    border: 1px solid #0dcaf0;
}

/* Badge điểm thành tựu */
.achievement-points {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    border: 1px solid #FFA500;
}

.achievement-points.high-points {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: 1px solid #FF4757;
}

.achievement-points.medium-points {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    border: 1px solid #00D2D3;
}

/* Header thành tựu */
.achievement-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding-top: 10px;
}

.achievement-icon {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
}

.achievement-icon .icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.completed-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #4CAF50;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 5;
}

.server-first-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #FFD700;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 5;
}

.achievement-header-info {
    flex: 1;
    min-width: 0;
}

.achievement-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Thông tin trạng thái */
.achievement-status {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-available {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.status-claimed {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.status-unavailable {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* Thông tin chi tiết */
.achievement-details {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.achievement-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.achievement-requirement {
    font-size: 13px;
    color: #e74c3c;
    background: #ffebee;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 8px;
    border-left: 3px solid #e74c3c;
}

/* Thông tin người hoàn thành server */
.server-first-info {
    margin-top: 12px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
    border-left: 3px solid #FF9800;
}

.server-first-info .first-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.server-first-info .first-info-row:last-child {
    margin-bottom: 0;
}

.server-first-info i {
    color: #FF9800;
    font-size: 11px;
}

/* Phần thưởng */
.achievement-rewards {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rewards-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rewards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    min-width: 120px;
    cursor: pointer;
}

.reward-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.reward-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.reward-info {
    flex: 1;
    min-width: 0;
}

.reward-name {
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
    word-break: break-word;
}

.reward-count {
    font-size: 11px;
    color: #e74c3c;
    font-weight: bold;
}

.reward-currency {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

.currency-gold {
    color: #f39c12;
    border-color: #f1c40f;
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
}

.currency-money {
    color: #27ae60;
    border-color: #2ecc71;
    background: linear-gradient(135deg, #e8f8ef, #d5f2e3);
}

.currency-coin {
    color: #3498db;
    border-color: #2980b9;
    background: linear-gradient(135deg, #e8f4fc, #d1e8f8);
}

/* Hành động */
.achievement-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.btn-claim-achievement {
    flex: 1;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-claim-achievement:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    background: linear-gradient(135deg, #27ae60, #219653);
}

.btn-claim-achievement:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-contact-admin {
    flex: 1;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-contact-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, #2980b9, #21618c);
}

.btn-request {
    flex: 1;
    padding: 10px 15px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-request:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3);
}

/* ===== TABS ===== */
.achievement-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-color: #3498db;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

/* ===== THỐNG KÊ ĐIỂM ===== */
.achievement-stats {
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
}

/* Phần điểm thành tựu */
.points-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.points-main {
    text-align: center;
    flex: 2;
    min-width: 200px;
    padding: 10px;
}

.points-total {
    font-size: 28px;
    font-weight: bold;
    margin: 5px 0 8px 0;
    color: #FFD700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.points-subtitle {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-detail {
    flex: 1;
    padding: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.points-detail:first-child {
    border-left: none;
}

.points-detail .label {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.points-detail .value {
    display: block;
    font-size: 16px;
    font-weight: bold;
}

.points-detail .value.current {
    color: #FFD700;
    font-size: 18px;
}

/* Grid cho 4 phần thống kê */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 12px 8px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border: 2px solid #e9ecef;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 3px;
    line-height: 1.2;
}

.stat-description {
    font-size: 10px;
    color: #95a5a6;
    margin-top: 2px;
    line-height: 1.2;
}

/* Highlight cho "Thành tựu server đã đoạt" */
.stat-item.server-completed {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FF9800;
}

.stat-item.server-completed .stat-label {
    color: #5d4037;
    font-weight: 700;
}

.stat-item.server-completed .stat-value {
    color: #e65100;
    font-size: 22px;
}

.stat-item.server-completed .stat-description {
    color: #8d6e63;
    font-weight: 500;
}

/* Màu sắc cho các loại thống kê */
.stat-item:nth-child(1) { border-top: 3px solid #3498db; }
.stat-item:nth-child(2) { border-top: 3px solid #2ecc71; }
.stat-item:nth-child(3) { border-top: 3px solid #9b59b6; }
.stat-item:nth-child(4) { border-top: 3px solid #FF9800; }

/* ===== BẢNG VÀNG THÀNH TỰU SERVER ===== */
.achievement-leaderboard-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #4CAF50;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.leaderboard-header h3 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.leaderboard-header h3 i {
    color: #FFD700;
    font-size: 20px;
}

.leaderboard-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.leaderboard-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

/* HEADER BẢNG */
.leaderboard-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.leaderboard-table thead th {
    color: white;
    padding: 16px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.leaderboard-table thead th:last-child {
    border-right: none;
}

/* CỘT STT */
.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(1) {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    text-align: center;
}

/* CỘT TÊN THÀNH TỰU */
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}

/* CỘT ANH HÙNG HOÀN THÀNH */
.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(3) {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    text-align: center;
}

/* ROWS */
.leaderboard-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table tbody tr:hover {
    background: rgba(52, 152, 219, 0.03);
}

.leaderboard-table tbody tr.current-user-row {
    background: rgba(255, 152, 0, 0.08);
}

/* CELLS */
.leaderboard-table td {
    padding: 18px 15px;
    color: #333;
    font-size: 14px;
    vertical-align: middle;
    border-right: 1px solid #f0f0f0;
}

.leaderboard-table td:last-child {
    border-right: none;
}

/* CỘT STT STYLE */
.stt-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

/* TÊN THÀNH TỰU - ĐÃ SỬA: CĂN GIỮA & NỔI BẬT */
.achievement-main-info {
    margin-bottom: 10px;
    text-align: center;
}

.achievement-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.achievement-name {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF !important; /* Chữ trắng */
    text-align: center;
    /* Viền nâu đậm xung quanh chữ */
    text-shadow: 
        2px 0 0 #5D4037,      /* Nâu đậm bên phải */
        -2px 0 0 #5D4037,     /* Nâu đậm bên trái */
        0 2px 0 #5D4037,      /* Nâu đậm bên dưới */
        0 -2px 0 #5D4037,     /* Nâu đậm bên trên */
        1px 1px 0 #5D4037,    /* Nâu đậm góc phải dưới */
        -1px -1px 0 #5D4037,  /* Nâu đậm góc trái trên */
        1px -1px 0 #5D4037,   /* Nâu đậm góc phải trên */
        -1px 1px 0 #5D4037,   /* Nâu đậm góc trái dưới */
        0 0 8px rgba(93, 64, 55, 0.6); /* Glow nâu nhẹ */
    padding: 12px 20px;
    background: linear-gradient(
        135deg,
        #FFD700 0%,
        #FFC400 25%,
        #FFAB00 50%,
        #FFC400 75%,
        #FFD700 100%
    ); /* Gradient kim loại vàng */
    border-radius: 10px;
    border: 2px solid #8D6E63; /* Viền nâu đậm */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(141, 110, 99, 0.3); /* Shadow nâu bên trong */
    display: inline-block;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

/* Hiệu ứng ánh sáng */
.achievement-name::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shine 3s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* Hiệu ứng ánh sáng */
.achievement-name::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.points-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(255, 165, 0, 0.3);
}

.points-display i {
    color: red !important;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.points-display span {
    font-weight: 800;
    color: #e65100;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.team-size-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 15px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

.team-size-badge i {
    font-size: 14px;
}

/* ANH HÙNG HOÀN THÀNH CONTAINER - ĐÃ SỬA: CĂN GIỮA & NỔI BẬT */
.team-players-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 12px;
    border: 2px solid #4CAF50;
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.15);
    min-height: 150px;
    text-align: center;
}

.team-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    min-width: 250px;
}

.team-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.team-player.current-player {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-color: #FF9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.player-avatar-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.team-player.current-player .player-avatar-small {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.player-details-small {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.player-name-small {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 87, 34, 0.3);
}

.player-date-small {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* FOOTER */
.leaderboard-footer {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-top: 15px;
    border-radius: 0 0 8px 8px;
}

.leaderboard-footer i {
    color: #3498db;
    margin-right: 6px;
}

/* ===== THÔNG BÁO ===== */
.achievement-notice {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #fff3e0, #ffecb3);
    border-radius: 10px;
    border: 2px solid #ffb300;
}

.notice-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.notice-content h4 {
    margin: 0 0 15px 0;
    color: #5d4037;
    font-size: 18px;
    font-weight: 700;
}

.notice-content p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ===== TITLE HỆ THỐNG THÀNH TỰU ===== */
.page-title {
    text-align: center;
    margin: 20px 0 30px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: white;
    text-transform: uppercase;
}

.page-title .subtitle {
    font-size: 16px;
    margin-top: 10px;
    opacity: 0.9;
}

/* ===== LOADING ===== */
.achievement-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .achievements-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .leaderboard-table th:nth-child(3),
    .leaderboard-table td:nth-child(3) {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }
}

@media (max-width: 992px) {
    .points-summary {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .points-detail {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 12px;
        margin-top: 5px;
        text-align: center;
    }
    
    .achievement-name {
        font-size: 20px;
        padding: 8px 12px;
    }
    
    .team-player {
        max-width: 260px;
        min-width: 230px;
    }
}

@media (max-width: 768px) {
    .achievements-container {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .achievement-tabs {
        flex-wrap: wrap;
    }
    
    .leaderboard-table {
        min-width: 600px;
    }
    
    .leaderboard-table th:nth-child(3),
    .leaderboard-table td:nth-child(3) {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }
    
    .achievement-name {
        font-size: 18px;
        padding: 8px 10px;
    }
    
    .points-display {
        padding: 6px 12px;
    }
    
    .points-display span {
        font-size: 18px;
    }
    
    .team-players-container {
        padding: 12px;
    }
    
    .team-player {
        max-width: 240px;
        min-width: 220px;
        padding: 10px 15px;
    }
    
    .player-avatar-small {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .player-name-small {
        font-size: 15px;
    }
    
    .page-title {
        padding: 20px 15px;
    }
    
    .page-title h1 {
        font-size: 22px;
    }
    
    .points-total {
        font-size: 22px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-item.server-completed .stat-value {
        font-size: 20px;
    }
    
    .achievement-notice {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .notice-icon {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .leaderboard-table {
        min-width: 550px;
    }
    
    .leaderboard-table th:nth-child(1),
    .leaderboard-table td:nth-child(1) {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
    }
    
    .leaderboard-table th:nth-child(3),
    .leaderboard-table td:nth-child(3) {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
    
    .stt-box {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .achievement-name {
        font-size: 16px;
        padding: 6px 8px;
    }
    
    .points-display span {
        font-size: 16px;
    }
    
    .team-players-container {
        padding: 10px;
    }
    
    .team-player {
        max-width: 200px;
        min-width: 180px;
        padding: 8px 12px;
    }
    
    .player-avatar-small {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .player-name-small {
        font-size: 14px;
    }
    
    .player-badge-small {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .page-title {
        padding: 15px 10px;
        margin: 15px 0;
    }
    
    .page-title h1 {
        font-size: 18px;
    }
    
    .points-summary {
        padding: 12px;
    }
    
    .points-main {
        min-width: 100%;
    }
    
    .points-total {
        font-size: 18px;
    }
    
    .stat-item {
        padding: 10px 5px;
        min-height: 80px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-item.server-completed .stat-value {
        font-size: 18px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ===== ANIMATIONS CƠ BẢN ===== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ===== FIX CHO FORM NẠP THẺ (Ẩn đi) ===== */
.nd_option {
    display: none;
}

/* Container cho thống kê */
.stats-container {
    clear: both;
    width: 100%;
    padding-top: 10px;
    margin-top: 0;
}

/* ===== TỐI ƯU HÓA CUỐI CÙNG ===== */
* {
    box-sizing: border-box;
}

.wrap {
    overflow-x: hidden;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.row-end {
    clear: both;
}

/* CSS cho bảng vàng thành tựu với media */
.achievement-media-container {
    margin-top: 15px;
    margin-bottom: 10px;
}

.media-wrapper {
    position: relative;
    max-width: 1000px;
    max-height: 1000px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.media-wrapper:hover {
    transform: scale(1.02);
}

.achievement-media-image,
.achievement-media-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.media-caption {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    font-size: 12px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .achievement-media-image,
    .achievement-media-video {
        max-width: 100%;
        height: auto;
    }
    
    .achievement-name {
        font-size: 16px;
    }
    
    .team-players-container {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .leaderboard-table-container {
        overflow-x: auto;
    }
}

/* ANH HÙNG HOÀN THÀNH CONTAINER - STYLE TƯƠNG TỰ */
.team-players-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(
        135deg,
        #FFD700 0%,
        #FFC400 25%,
        #FFAB00 50%,
        #FFC400 75%,
        #FFD700 100%
    ); /* Gradient kim loại vàng giống achievement-name */
    border-radius: 12px;
    border: 2px solid #8D6E63; /* Viền nâu đậm */
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(141, 110, 99, 0.3);
    min-height: 150px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng ánh sáng lướt qua */
.team-players-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shine 4s infinite linear;
    pointer-events: none;
}

/* Tiêu đề container */
.team-players-title {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF !important;
    text-align: center;
    text-shadow: 
        2px 0 0 #5D4037,
        -2px 0 0 #5D4037,
        0 2px 0 #5D4037,
        0 -2px 0 #5D4037,
        1px 1px 0 #5D4037,
        -1px -1px 0 #5D4037,
        1px -1px 0 #5D4037,
        -1px 1px 0 #5D4037,
        0 0 8px rgba(93, 64, 55, 0.6);
    margin-bottom: 10px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: inline-block;
}

/* Thẻ người chơi - Style premium */
.team-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFDE7 100%);
    border-radius: 10px;
    border: 2px solid #8D6E63; /* Viền nâu đậm */
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(141, 110, 99, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    min-width: 250px;
    position: relative;
    overflow: hidden;
}

.team-player:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 193, 7, 0.5);
    border-color: #FF9800;
}

.team-player.current-player {
    background: linear-gradient(135deg, #FFF9C4 0%, #FFF59D 100%);
    border-color: #FF9800;
    box-shadow: 
        0 4px 15px rgba(255, 152, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

/* Hiệu ứng ánh sáng cho người chơi hiện tại */
.team-player.current-player::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(255, 193, 7, 0.4),
        rgba(255, 179, 0, 0.2),
        rgba(255, 193, 7, 0.4));
    border-radius: 12px;
    z-index: -1;
    animation: playerGlow 2s infinite alternate;
}

@keyframes playerGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Avatar người chơi */
.player-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #5D4037;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
    border: 2px solid #8D6E63;
}

.team-player.current-player .player-avatar-small {
    background: linear-gradient(135deg, #FFC107, #FF9800);
    color: #FFFFFF;
    border-color: #FF9800;
    box-shadow: 
        0 4px 12px rgba(255, 152, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

/* Thông tin người chơi */
.player-details-small {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.player-name-small {
    font-size: 16px;
    font-weight: 700;
    color: #5D4037;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.team-player.current-player .player-name-small {
    color: #E65100;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.9);
}

.player-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 87, 34, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.player-date-small {
    font-size: 12px;
    color: #795548;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    border-left: 2px solid #8D6E63;
}

.team-player.current-player .player-date-small {
    color: #D84315;
    background: rgba(255, 243, 224, 0.7);
    border-left-color: #FF9800;
}

/* Khi không có người chơi */
.team-players-container.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.empty-players-message {
    font-size: 16px;
    color: #5D4037;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 2px dashed #8D6E63;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .team-players-container {
        padding: 12px;
        gap: 10px;
    }
    
    .team-player {
        max-width: 260px;
        min-width: 230px;
        padding: 10px 15px;
    }
    
    .player-avatar-small {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    
    .player-name-small {
        font-size: 15px;
    }
    
    .team-players-title {
        font-size: 16px;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .team-players-container {
        padding: 10px;
    }
    
    .team-player {
        max-width: 220px;
        min-width: 200px;
        padding: 8px 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .player-details-small {
        text-align: center;
    }
    
    .player-avatar-small {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .player-name-small {
        justify-content: center;
    }
    
    .team-players-title {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* Phiên bản premium */
.team-players-container.premium {
    background: linear-gradient(
        135deg,
        #FFC107 0%,
        #FFB300 25%,
        #FF9800 50%,
        #FFB300 75%,
        #FFC107 100%
    );
    border: 3px solid #5D4037;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 193, 7, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.7),
        inset 0 -3px 0 rgba(93, 64, 55, 0.4);
}

.team-players-container.premium::before {
    content: '🏆 ANH HÙNG HOÀN THÀNH 🏆';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
    color: #FFD700;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #FFC107;
}

/* Hiệu ứng huy hiệu cho avatar */
.player-avatar-small.badge {
    position: relative;
}

.player-avatar-small.badge::after {
    content: '★';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5722;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

/* Hiệu ứng ranking */
.team-player.rank-1 {
    order: -1;
    background: linear-gradient(135deg, #FFF9C4 0%, #FFECB3 100%);
    border-color: #FFD700;
}

.team-player.rank-1 .player-avatar-small {
    background: linear-gradient(135deg, #FFD700, #FFC400);
    color: #5D4037;
    border-color: #FF9800;
}

