:root {
    --primary-color: #003366;
    --primary-hover: #004080;
    --secondary-color: #FFB905;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Layout */
.navbar {
    background: var(--card-bg);
    padding: 1rem 0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    margin-bottom: 2rem;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.header-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
}

.login-box {
    width: 100%;
    max-width: 400px;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    /* Increased gap for better separation */
    margin-bottom: 2rem;
}

/* ... existing styles ... */

/* Stat Card (Restored) */
.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* New Test Card Styles */
.test-card {
    background: #ffffff;
    border-radius: 12px;
    /* Increased radius */
    padding: 1.5rem;
    /* Standardized padding */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    /* Added visible border */
}

.test-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.test-card-content {
    margin-bottom: 0;
}

.test-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.test-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.test-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-actions {
    margin-top: auto;
    width: 100%;
}

.test-actions .btn {
    width: 100%;
    box-sizing: border-box;
}

/* Test Interface */
.question-block {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-label:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

.option-input {
    margin-right: 1rem;
    width: 1.25rem;
    height: 1.25rem;
}

/* Results */
.result-score {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 2rem 0;
}

.analysis-item {
    border-left: 4px solid transparent;
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.analysis-item.correct {
    border-left-color: var(--success);
}

.analysis-item.wrong {
    border-left-color: var(--danger);
}

.analysis-item.unattempted {
    border-left-color: var(--secondary-color);
}

/* Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        text-align: center;
    }

    .nav-links a {
        margin: 0 0.75rem;
    }

    .table-responsive {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
    }

    /* Adjust modal width */
    .result-box {
        width: 95% !important;
        padding: 20px !important;
    }
}