/* Universal Card Styles - Use across all pages */

/* Tests Grid */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Universal Test Card */
.test-card {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    position: relative;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.test-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.test-card.selected {
    border-color: rgb(43, 145, 191);
    box-shadow: 0 8px 25px rgba(43, 145, 191, 0.3);
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 40%, rgba(255,255,255,0.8) 80%, white 100%);
    border-radius: 15px 15px 0 0;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px 8px 15px;
    position: relative;
    z-index: 2;
}

.test-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 15px 15px 15px;
    position: relative;
    z-index: 2;
}

.test-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.test-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.test-category {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.test-category.exam-type {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.test-characters {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.test-preview {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    margin: 8px 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.test-actions {
    position: absolute;
    bottom: 10px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 5px 0 0 0;
}

.test-actions .btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.test-actions .btn-primary {
    background: rgb(43, 145, 191);
    color: white;
    box-shadow: 0 2px 8px rgba(43, 145, 191, 0.3);
}

.test-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 145, 191, 0.4);
    background: rgba(43, 145, 191, 0.9);
}

.test-actions .btn-secondary {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    box-shadow: 0 2px 8px rgba(3, 105, 161, 0.1);
}

.test-actions .btn-secondary:hover {
    transform: translateY(-1px);
    background: #e0f2fe;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.2);
}

/* Badges */
.pro-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #f59e0b;
}

.free-badge {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid #16a34a;
}

.difficulty-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.difficulty-badge.easy {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.difficulty-badge.medium {
    background: #fffbf0;
    color: #d69e2e;
    border: 1px solid #fbd38d;
}

.difficulty-badge.hard {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

.difficulty-badge.expert {
    background: #faf5ff;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

.difficulty-badge.advanced {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #f9a8d4;
}

/* Attempted Info */
.attempted-info {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #22c55e;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.attempted-badge {
    background: #22c55e;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.result-summary-mini {
    display: flex;
    gap: 15px;
    font-size: 12px;
    align-items: center;
}

.result-summary-mini .qualified {
    color: #22c55e;
    font-weight: 600;
}

.result-summary-mini .not-qualified {
    color: #ef4444;
    font-weight: 600;
}

/* No Results */
.no-tests, .error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1rem;
    margin: 1rem 0;
}

.no-tests {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 768px) {
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .test-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .test-actions {
        flex-direction: column;
    }
}