/* TestPlatform - Professional Light Theme CSS */

/* ===== CSS Variables ===== */
:root {
    /* Light Theme Colors */
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;

    /* Professional Accent Colors */
    --accent-primary: #2563eb; /* Blue */
    --accent-secondary: #3b82f6; /* Light Blue */
    --accent-success: #16a34a; /* Green */
    --accent-warning: #f59e0b; /* Amber */
    --accent-danger: #dc2626; /* Red */

    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #6c757d;

    /* Status Colors */
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #0ea5e9;

    /* Elevation - Box Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.03);

    /* Animation Speeds */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2.5rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-pill: 9999px;
}

/* ===== Core Styling ===== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container adjustments */
.container {
    max-width: 1200px;
    padding: 0 var(--spacing-md);
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
}

h2 {
    font-size: 1.875rem;
    font-weight: 700;
    position: relative;
    color: #1f2937;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 3px;
    width: 50px;
    background: var(--accent-primary);
    border-radius: var(--radius-pill);
}

.text-center h2::after {
    left: 50%;
    transform: translateX(-50%);
}

h3 {
    font-size: 1.5rem;
    color: #1f2937;
}

h4 {
    font-size: 1.25rem;
    color: #1f2937;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Accent text effects */
.text-gradient {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* ===== Layout Components ===== */

/* --- Navbar --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.navbar.scrolled {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-right: 2rem;
}

.navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item {
    margin-left: var(--spacing-sm);
    margin-right: var(--spacing-sm);
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-primary) !important;
    background-color: rgba(37, 99, 235, 0.05);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-normal), left var(--transition-normal);
    transform: translateY(4px);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
    left: 10%;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    background-color: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* Fix for user dropdown menu */
.dropdown-menu {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 0.5rem 0;
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(37, 99, 235, 0.05);
    color: var(--accent-primary);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--accent-primary);
    color: white;
}

.dropdown-header {
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

/* Settings section in dropdown */
.dropdown-header i {
    color: var(--accent-primary);
    opacity: 0.8;
}

.dropdown-item-form {
    margin: 0;
}

.dropdown-item-form .dropdown-item {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item-form .dropdown-item:hover {
    background-color: rgba(220, 38, 38, 0.05);
    color: var(--accent-danger);
}

/* User info in dropdown header */
.user-info {
    text-align: center;
    padding: 0.25rem 0;
}

.user-info strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-info small {
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

/* --- Cards --- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    margin-bottom: var(--spacing-lg);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: #f8f9fa;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

/* --- Buttons --- */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: none;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn i, .btn .fas, .btn .fab, .btn .far, .btn .bi {
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-secondary);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #138a3f;
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c81e1e;
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e09209;
    color: #212529;
}

.btn-info {
    background-color: var(--info);
    color: white;
}

.btn-info:hover {
    background-color: #0c91cf;
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--accent-primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Button group styling */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* --- Forms --- */
.form-control {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.625rem 1rem;
}

.form-select:focus {
    background-color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    color: var(--text-primary);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-check-input {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    width: 1.1em;
    height: 1.1em;
}

.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.form-check-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-check-label {
    color: var(--text-secondary);
    margin-left: 0.25rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.25rem;
}

/* --- Tables --- */
.table {
    color: var(--text-primary);
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem;
    vertical-align: bottom;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.03);
}

.table tbody td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.01);
}

/* --- Badges --- */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--radius-pill);
}

.bg-primary, .badge-primary {
    background-color: var(--accent-primary) !important;
    color: white;
}

.bg-success, .badge-success {
    background-color: var(--success) !important;
    color: white;
}

.bg-warning, .badge-warning {
    background-color: var(--warning) !important;
    color: #212529;
}

.bg-danger, .badge-danger {
    background-color: var(--danger) !important;
    color: white;
}

.bg-info, .badge-info {
    background-color: var(--info) !important;
    color: white;
}

.bg-secondary, .badge-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* --- Lists --- */
.list-group {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.list-group-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    transition: all var(--transition-normal);
}

.list-group-item:hover {
    background-color: rgba(37, 99, 235, 0.03);
}

/* Question list item custom styling */
.question-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background-color: var(--card-bg);
    border-left: 3px solid transparent;
    margin-bottom: 0;
    transition: all var(--transition-normal);
}

.question-list-item:hover {
    border-left-color: var(--accent-primary);
    background-color: rgba(37, 99, 235, 0.03);
}

.question-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Alerts --- */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.alert-primary {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
}

.alert-success {
    background-color: rgba(22, 163, 74, 0.08);
    color: var(--success);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    color: var(--warning);
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.08);
    color: var(--danger);
}

.alert-info {
    background-color: rgba(14, 165, 233, 0.08);
    color: var(--info);
}


/* --- Footer --- */
.footer {
    background-color: #ffffff;
    color: var(--text-secondary);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: var(--radius-pill);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    margin-right: 0.75rem;
    color: var(--accent-primary);
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* ===== Page-Specific Styling ===== */

/* --- Home Page --- */
.main-content {
    padding: 2rem;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* --- Enhanced Test Details Page --- */

/* Hero Header Section */
.test-details-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.test-hero-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
    margin: -2rem -15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -10px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-breadcrumb {
    margin-bottom: 2rem;
}

.hero-breadcrumb .breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    margin-bottom: 0;
}

.hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: white;
}

.hero-title-section {
    margin-bottom: 3rem;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.status-badge.status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #dcfce7;
    border-color: rgba(34, 197, 94, 0.5);
}

.status-badge.status-locked {
    background: rgba(239, 68, 68, 0.2);
    color: #fee2e2;
    border-color: rgba(239, 68, 68, 0.5);
}

.status-badge.status-archived {
    background: rgba(107, 114, 128, 0.2);
    color: #f3f4f6;
    border-color: rgba(107, 114, 128, 0.5);
}

.status-badge.status-scheduled {
    background: rgba(59, 130, 246, 0.2);
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.5);
}

.status-badge.status-closed {
    background: rgba(245, 101, 101, 0.2);
    color: #fed7d7;
    border-color: rgba(245, 101, 101, 0.5);
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Enhanced Statistics Dashboard */
.stats-dashboard {
    background: white;
    padding: 3rem 0;
    margin-top: -2rem;
    position: relative;
    z-index: 3;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.questions-card::before {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.invites-card::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.attempts-card::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.time-card::before {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.stat-icon-wrapper {
    margin-bottom: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.questions-icon {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.invites-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.attempts-icon {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
}

.time-icon {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
}

.stat-details h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.stat-label {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 1rem;
}

.stat-footer {
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

/* Main Content Wrapper */
.main-content-wrapper {
    background: white;
    padding: 3rem 0;
}

/* Configuration Card */
.config-card .card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
}

.config-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.config-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.config-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.config-icon {
    color: white;
    font-size: 1rem;
}

.config-details {
    flex: 1;
}

.config-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.config-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

/* Actions Card */
.actions-card .card-header {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
}

.action-card-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-card-modern:hover::before {
    left: 100%;
}

.action-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
    text-decoration: none;
    color: inherit;
}

.action-icon-modern {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.results-action {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.analytics-action {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
}

.delete-action {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.duplicate-action {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.action-content-modern {
    flex: 1;
}

.action-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.action-subtitle-modern {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.action-arrow-modern {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.action-card-modern:hover .action-arrow-modern {
    background: #e2e8f0;
    transform: translateX(3px);
}

/* Enhanced Tabbed Content */
.content-tabs-modern {
    background: white;
    padding: 3rem 0;
}

.tab-navigation {
    margin-bottom: 3rem;
}

.tab-nav-modern {
    background: #f8fafc;
    border-radius: 16px;
    padding: 0.5rem;
    border: none;
}

.tab-link-modern {
    border: none !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    color: #64748b !important;
}

.tab-link-modern.active {
    background: white !important;
    color: #1e293b !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.tab-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-content-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-count {
    background: #e2e8f0;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-link-modern.active .tab-count {
    background: #667eea;
    color: white;
}

/* Question Types Cards */
.question-types-card .card-header {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
}

.question-type-card-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
}

.question-type-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.multiple-choice-card:hover {
    border-color: #3b82f6;
}

.true-false-card:hover {
    border-color: #10b981;
}

.short-answer-card:hover {
    border-color: #f59e0b;
}

.question-type-icon-modern {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.multiple-choice-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.true-false-icon {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
}

.short-answer-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.drag-drop {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.image-based {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.question-type-content-modern {
    margin-bottom: 1rem;
}

/* Dashboard Insights Section */
.insights-section {
    background: var(--secondary-bg);
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-lg);
}

.insights-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.insights-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.insight-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-normal);
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.insight-card .card-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: var(--spacing-lg);
    border: none;
}

.insight-card .card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.insight-card .card-body {
    padding: var(--spacing-lg);
}

.loading-spinner {
    text-align: center;
    color: var(--text-muted);
    padding: var(--spacing-lg) 0;
}

.performance-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.performance-item {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--secondary-bg);
}

.performance-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.performance-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.performance-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.performance-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.performance-score {
    font-weight: 600;
    color: var(--success);
    font-size: 0.875rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--secondary-bg);
    margin-bottom: var(--spacing-sm);
    transition: background-color var(--transition-fast);
}

.activity-item:hover {
    background: #e8f4f8;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.activity-title a {
    color: var(--accent-primary);
    text-decoration: none;
}

.activity-title a:hover {
    text-decoration: underline;
}

.activity-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.activity-score {
    font-weight: 500;
    color: var(--success);
}

.activity-time {
    color: var(--text-muted);
}

.question-type-title-modern {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.question-type-desc-modern {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.question-type-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.question-type-card-modern:hover .question-type-action {
    background: #e2e8f0;
    transform: scale(1.1);
}

/* Questions List Card */
.questions-list-card .card-header {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 16px 16px 0 0;
}

.questions-summary {
    display: flex;
    gap: 0.5rem;
}

.questions-list-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* --- Take Test --- */
.question-container {
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.question-container:hover {
    box-shadow: var(--shadow-sm);
}

/* --- Test Invite Emails --- */
.email-inputs-container {
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.email-input-group {
    margin-bottom: 0.75rem;
    transition: all var(--transition-normal);
}

.email-input-group:hover {
    transform: translateX(5px);
}

/* --- Test Attempts --- */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-buttons .btn {
    flex: 1;
    min-width: 120px;
}

/* ===== Utilities ===== */
.glass-effect {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* ===== Animations ===== */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

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

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

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

.slide-out-down {
    animation: slideOutDown 0.3s ease-in;
}

/* Test card animations */
.test-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.5s ease-out;
}

.test-card.filtering {
    transition: all 0.2s ease-in-out;
}

.test-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Search input enhancements */
#searchTests {
    transition: all 0.3s ease;
    position: relative;
}

#searchTests:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Results count styling */
.results-count {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

/* Keyboard shortcut hints */
.search-shortcut-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0.7;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-md);
}

.loading-spinner-enhanced {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Microinteractions for buttons */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::before {
    width: 200px;
    height: 200px;
}

/* Enhanced focus states */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    transform: scale(1.01);
}

/* Smooth scroll for focus navigation */
html {
    scroll-behavior: smooth;
}

/* Card hover states */
.test-card:hover .test-card-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.test-card:hover .status-badge {
    transform: scale(1.05);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

/* ===== Media Queries ===== */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-md);
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .card-header, .card-body, .card-footer {
        padding: 1rem;
    }

    .question-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .question-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn-group {
        flex-direction: column;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .card {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem;
    }

    .card-header, .card-body, .card-footer {
        padding: 0.75rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }

    .question-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .footer {
        padding-top: 2rem;
    }
}

/* Fix for navbar to ensure proper top positioning */
main {
    margin-top: 70px; /* Adjust based on navbar height */
    min-height: calc(100vh - 70px - 300px); /* Adjust for footer height */
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px; /* Below navbar */
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 10px;
    animation: toast-in 0.3s ease-out;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Test Features & Scheduling */
.test-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.feature-tag.scheduling-info {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border-color: rgba(16, 185, 129, 0.2);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem;
    max-width: 200px;
}

.feature-tag.scheduling-info span {
    font-size: 0.7rem;
    line-height: 1.2;
}

/* Scheduling fields styling */
.scheduling-fields {
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.1);
    margin-top: 0.5rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-section-title i {
    color: var(--accent-primary);
}



/* wwwroot/css/site.css */

/* ===== CSS Variables ===== */
:root {
    /* Core Colors */
    --primary-bg: #f8f9fa; /* Light gray for body background */
    --secondary-bg: #ffffff; /* White for cards, modals */
    --border-color: #e5e7eb; /* Softer border color */

    /* Professional Accent Colors */
    --accent-primary: #4f46e5; /* A modern, deeper blue/indigo */
    --accent-primary-hover: #4338ca; /* Darker shade for hover */
    --accent-secondary: #6b7280; /* Neutral gray for secondary actions/text */
    --accent-success: #16a34a;
    --accent-warning: #f59e0b;
    --accent-danger: #dc2626;
    --accent-info: #0ea5e9;

    /* Text Colors */
    --text-primary: #111827; /* Near-black for headings and primary text */
    --text-secondary: #4b5563; /* Gray for body text and labels */
    --text-muted: #6b7280; /* Lighter gray for muted/helper text */

    /* Elevation - Box Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Spacing & Radius */
    --spacing-md: 1rem;
    --radius-md: 0.5rem; /* 8px */
    --radius-lg: 0.75rem; /* 12px */
    --radius-pill: 9999px;
    --transition: 200ms ease-in-out;
}

/* ===== Core Styling ===== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    padding-top: 70px; /* Space for fixed navbar */
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-primary-hover); }

/* ===== Global Components ===== */

/* --- Navbar --- */
.navbar {
    background-color: var(--secondary-bg);
    box-shadow: var(--shadow-md);
    padding: 0.75rem var(--spacing-md);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.navbar-brand { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); }
.navbar-nav .nav-link { color: var(--text-secondary); font-weight: 500; transition: color var(--transition); }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--accent-primary); }

/* --- Buttons --- */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus { box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25); }

.btn-primary { background-color: var(--accent-primary); color: white; }
.btn-primary:hover { background-color: var(--accent-primary-hover); color: white; }

.btn-secondary { background-color: var(--accent-secondary); color: white; }
.btn-secondary:hover { background-color: #4b5563; color: white; }

.btn-success { background-color: var(--accent-success); color: white; }
.btn-danger { background-color: var(--accent-danger); color: white; }
.btn-warning { background-color: var(--accent-warning); color: var(--text-primary); }
.btn-info { background-color: var(--accent-info); color: white; }

.btn-outline-primary { border-color: var(--accent-primary); color: var(--accent-primary); }
.btn-outline-primary:hover { background-color: var(--accent-primary); color: white; }

.btn-outline-secondary { border-color: var(--accent-secondary); color: var(--accent-secondary); }
.btn-outline-secondary:hover { background-color: var(--accent-secondary); color: white; }

/* --- Forms --- */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--secondary-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
    background-color: var(--secondary-bg);
}
.form-label { font-weight: 500; color: var(--text-primary); }
.form-check-input:checked { background-color: var(--accent-primary); border-color: var(--accent-primary); }


/* --- Badges --- */
.badge { font-weight: 600; }

/* --- Loading Overlay & Toasts --- */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1080;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.loading-content { text-align: center; color: white; }

.toast-container { z-index: 1090; }

















.tests-container {
    padding: 0 0.5rem;
    margin-top: 2rem;
}
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.6rem;
}
.test-card {
    background: #181a20;
    border-radius: 1.25rem;
    box-shadow: 0 8px 36px 0 rgba(30,32,37,.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.23s cubic-bezier(.4,2,.3,1), box-shadow .23s;
    border: 1px solid #24253d;
}
.test-card:hover {
    transform: translateY(-7px) scale(1.014);
    box-shadow: 0 16px 48px 0 rgba(60,72,96,.23);
}
.test-card-header {
    padding: 1.2rem 1.7rem;
    background: #21232a;
    border-bottom: 1px solid #23253c;
    display: flex;
    align-items: center;
    min-height: 64px;
    transition: background .35s;
}
.test-card:hover .test-card-header {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
}
.status-badge {
    font-size: .95rem;
    font-weight: 700;
    padding: 0.28rem 1.2rem;
    border-radius: 2em;
    background: rgba(120,120,120,.13);
    color: #aeb0b9;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: .5em;
    box-shadow: 0 1px 4px 0 rgba(50,50,80,.04);
}
.test-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.15em;
    word-break: break-all;
}
.test-description {
    font-size: 1.05rem;
    color: #b8bac9;
    margin-bottom: .9rem;
    min-height: 1.5em;
}
.test-categories-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: .7rem;
}
.category-badge,
.tag-badge {
    display: flex;
    align-items: center;
    font-size: .84rem;
    font-weight: 600;
    padding: 0.18rem 0.78rem;
    border-radius: 1em;
    background: #33385a;
    color: #fff;
}
.category-badge i, .tag-badge i { margin-right: .38em; }
.tag-more {
    background: #454a6a !important;
    color: #e0e0e0 !important;
}
.test-stats {
    display: flex;
    gap: 1.35rem;
    margin-bottom: .6rem;
}
.stat-group {
    display: flex;
    gap: 1.35rem;
}
.stat {
    text-align: left;
}
.stat-icon {
    margin-right: 0.26rem;
    font-size: 1.09em;
    color: #6a5af9;
}
.stat-value {
    color: #fff;
    font-weight: 600;
    margin-right: 0.14rem;
}
.stat-label {
    color: #bcbcbc;
    font-size: .89em;
}
.test-features {
    display: flex;
    flex-wrap: wrap;
    gap: .37rem;
    margin-bottom: .5rem;
}
.feature-tag {
    background: #20253a;
    color: #7ed8cb;
    padding: 0.19rem 0.74rem;
    border-radius: 0.7em;
    font-size: .83rem;
    display: flex;
    align-items: center;
    gap: 0.32em;
    font-weight: 600;
}
.test-card-footer {
    padding: .75rem 1.4rem;
    background: #23253c;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    border-top: 1px solid #24273b;
}
.btn.btn-primary.btn-sm {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff !important;
    border: none;
    font-weight: 700;
    border-radius: 1em;
    padding: 0.4em 1.15em;
    transition: background .23s;
}
.btn.btn-primary.btn-sm:hover {
    filter: brightness(1.06);
}
.btn.btn-outline-primary.btn-sm {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary) !important;
    font-weight: 700;
    border-radius: 1em;
    padding: 0.38em 1.05em;
    transition: background .22s, color .22s;
}
.btn.btn-outline-primary.btn-sm:hover {
    background: var(--accent-primary);
    color: #fff !important;
}
@media (max-width: 750px) {
    .tests-grid { grid-template-columns: 1fr; }
}