.user-score-display {
    background: linear-gradient(135deg, #007DB3 0%, #056C99 100%);
    color: white;
    padding: 25px;
    text-align: center;
    margin-bottom: 0;
    border-radius: 0;
    color: white;
}

.user-score-display h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.1rem; /* Match .balance-label-header font-size */
    opacity: 0.9;
    font-weight: 500; /* Match .balance-label-header font-weight */
}

.user-score-display .score {
    font-size: 3rem; /* Match .balance-amount font-size */
    font-weight: bold; /* Match .balance-amount font-weight */
    margin: 0;
    color: white; /* Explicitly match color: white */
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Match .balance-amount text-shadow */
}

.page-content {
    padding: 30px;
}

.page-title-section {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.title-divider {
    width: 150px;
    height: 8px;
    background: linear-gradient(135deg, #FED750 0%, #FFB800 100%);
    margin: 0 auto;
    border-radius: 4px;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.test-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.test-card.free {
    border-color: #28a745;
}

.test-card.purchased {
    border-color: #17a2b8;
}

.test-card.paid {
    border-color: #007bff;
}

.test-card.insufficient {
    border-color: #dc3545;
    opacity: 0.8;
}

.status-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-badge.free {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.status-badge.purchased {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.test-icon {
    text-align: center;
    margin-bottom: 20px;
}

.test-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
}

.test-icon i {
    font-size: 4rem;
    color: #007DB3;
}

.test-info {
    text-align: center;
}

.test-name {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.test-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
    word-break: break-word; /* Ngắt từ tự động trên màn hình nhỏ */
    hyphens: auto;
}

@media (min-width: 768px) {
    .test-description {
        text-align: justify; /* Căn đều trên màn hình lớn để chuyên nghiệp */
    }
}

.test-cost-display {
    margin-bottom: 20px;
}

.cost-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.cost-info.free {
    color: #28a745;
}

.cost-info.paid {
    color: #dc3545;
}

.cost-info.purchased {
    color: #17a2b8;
}

.owned-badge {
    color: #17a2b8;
    font-size: 0.9rem;
    margin-left: 10px;
}

.test-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
}

.test-button.free {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.test-button.paid {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.test-button.purchased {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.test-button.insufficient {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.test-button.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.test-button:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.insufficient-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #856404;
    text-align: center;
}

.top-up-link {
    color: #007DB3;
    font-weight: bold;
    text-decoration: none;
    margin-left: 10px;
}

.top-up-link:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state i {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 30px;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .tests-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .test-card {
        padding: 25px 20px;
    }
    
    .page-content {
        padding: 20px;
        margin-bottom: 6rem;
    }
    
    .user-score-display {
        padding: 20px;
    }
    
    .user-score-display .score {
        font-size: 2rem;
    }
}

/* Language indicator on test cards */
.test-card::before {
    content: attr(data-lang);
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 125, 179, 0.1);
    color: #007DB3;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
}

.test-card[data-lang="vi"]::before {
    content: "VI";
}

.test-card[data-lang="en"]::before {
    content: "EN";
}