/* ============================================================
   MockTest.css — Career Counselling Center
   Mock Test System UI Styling
   Used by: MockTest.aspx, MockTestExam.aspx, MockTestResult.aspx
   ============================================================ */

/* ── VARIABLES ── */
:root {
    --primary:      #4f46e5;
    --primary-dark: #3730a3;
    --primary-light:#ede9fe;
    --success:      #16a34a;
    --success-light:#dcfce7;
    --danger:       #dc2626;
    --danger-light: #fee2e2;
    --warning:      #d97706;
    --warning-light:#fef3c7;
    --neutral:      #6b7280;
    --neutral-light:#f3f4f6;
    --border:       #e5e7eb;
    --white:        #ffffff;
    --text:         #111827;
    --text-muted:   #6b7280;
    --radius:       10px;
    --shadow:       0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg:    0 8px 24px rgba(0,0,0,0.12);
}

/* ── BASE ── */
* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
    color: var(--text);
    margin: 0;
    padding: 0;
}

/* ── PAGE HEADER ── */
.mock-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.mock-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.mock-header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

/* ── EXAM TIMER ── */
.timer-box {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    padding: 10px 20px;
    text-align: center;
    min-width: 120px;
}
.timer-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.8;
}
.timer-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    line-height: 1.2;
}
.timer-warning { color: #fbbf24; animation: pulse 1s infinite; }
.timer-danger  { color: #f87171; animation: pulse 0.5s infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── LAYOUT: EXAM ── */
.exam-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 20px;
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 20px;
}
@media (max-width: 900px) {
    .exam-layout { grid-template-columns: 1fr; }
    .exam-sidebar { order: -1; }
}

/* ── QUESTION PANEL ── */
.question-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.question-header {
    background: var(--neutral-light);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.question-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
}
.question-subject {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--border);
    padding: 3px 10px;
    border-radius: 20px;
}
.question-difficulty {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.diff-easy   { background: var(--success-light); color: var(--success); }
.diff-medium { background: var(--warning-light); color: var(--warning); }
.diff-hard   { background: var(--danger-light);  color: var(--danger);  }

.question-body {
    padding: 24px 24px 16px;
}
.question-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 500;
}

/* ── OPTIONS ── */
.options-list { list-style: none; margin: 0; padding: 0; }
.option-item  { margin-bottom: 12px; }
.option-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--white);
}
.option-label:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.option-label.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}
.option-label.correct {
    border-color: var(--success);
    background: var(--success-light);
}
.option-label.wrong {
    border-color: var(--danger);
    background: var(--danger-light);
}
.option-letter {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--neutral-light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all 0.15s;
}
.option-label.selected .option-letter {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.option-label.correct .option-letter {
    background: var(--success);
    border-color: var(--success);
    color: white;
}
.option-label.wrong .option-letter {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}
.option-text {
    font-size: 14px;
    line-height: 1.5;
    padding-top: 4px;
}
input[type="radio"].option-radio { display: none; }

/* ── QUESTION NAV BUTTONS ── */
.question-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.btn {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-outline  { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover  { background: var(--primary-light); }
.btn-success  { background: var(--success); color: white; }
.btn-success:hover  { background: #15803d; }
.btn-danger   { background: var(--danger); color: white; }
.btn-danger:hover   { background: #b91c1c; }
.btn-warning  { background: var(--warning); color: white; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── SIDEBAR: QUESTION PALETTE ── */
.exam-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.sidebar-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 16px;
    background: var(--neutral-light);
    border-bottom: 1px solid var(--border);
}
.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 14px;
}
.palette-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    color: var(--text-muted);
}
.palette-btn:hover    { border-color: var(--primary); color: var(--primary); }
.palette-btn.answered { background: var(--primary); border-color: var(--primary); color: white; }
.palette-btn.skipped  { background: var(--warning-light); border-color: var(--warning); color: var(--warning); }
.palette-btn.current  { box-shadow: 0 0 0 3px var(--primary-light); }

/* Palette Legend */
.palette-legend { padding: 0 14px 14px; }
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.legend-dot {
    width: 14px; height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Stats in sidebar */
.stats-grid { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.stat-label { color: var(--text-muted); }
.stat-value { font-weight: 700; }
.stat-value.answered { color: var(--primary); }
.stat-value.skipped  { color: var(--warning); }
.stat-value.unattempted { color: var(--neutral); }

/* ── SUBMIT MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: white;
    border-radius: 14px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.modal-icon { font-size: 48px; margin-bottom: 16px; }
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.modal-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.modal-stats {
    background: var(--neutral-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    text-align: center;
}
.modal-stat-val  { font-size: 22px; font-weight: 700; }
.modal-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.modal-btns { display: flex; gap: 10px; justify-content: center; }

/* ── MOCK TEST LIST PAGE ── */
.page-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}
.page-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}
.page-sub { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-muted);
}
.filter-tab:hover, .filter-tab.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* Test Card */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.test-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.test-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.test-card-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.test-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.icon-neet { background: #fce7f3; }
.icon-jee  { background: #dbeafe; }
.icon-gen  { background: #f0fdf4; }
.test-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.test-type  {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}
.type-neet { background: #fce7f3; color: #db2777; }
.type-jee  { background: #dbeafe; color: #2563eb; }
.type-gen  { background: #f0fdf4; color: #16a34a; }

.test-card-body { padding: 14px 20px; }
.test-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.test-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}
.test-meta-item span { font-weight: 600; color: var(--text); }

.marking-info {
    background: var(--neutral-light);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}
.marking-correct { color: var(--success); font-weight: 700; }
.marking-wrong   { color: var(--danger);  font-weight: 700; }

.test-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.attempt-badge {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* ── RESULT PAGE ── */
.result-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}
.result-score-circle {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 4px solid rgba(255,255,255,0.4);
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.result-score-val  { font-size: 36px; font-weight: 800; }
.result-score-max  { font-size: 14px; opacity: 0.8; }
.result-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.result-sub   { opacity: 0.85; font-size: 14px; }

.result-stats-bar {
    max-width: 700px;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.result-stat {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}
.result-stat-val   { font-size: 24px; font-weight: 700; }
.result-stat-label { font-size: 11px; opacity: 0.8; margin-top: 2px; }

/* Subject-wise breakdown */
.breakdown-section {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}
.breakdown-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.breakdown-card-header {
    padding: 14px 20px;
    background: var(--neutral-light);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.subject-score-pill {
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
}

/* Review table */
.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.review-table th {
    background: var(--neutral-light);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.review-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.review-table tr:last-child td { border-bottom: none; }
.review-table tr:hover td { background: #fafafa; }
.status-correct  { color: var(--success); font-weight: 700; }
.status-wrong    { color: var(--danger);  font-weight: 700; }
.status-skipped  { color: var(--neutral); font-weight: 600; }

/* Progress bar */
.progress-bar-wrap {
    height: 8px;
    background: var(--neutral-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.6s ease;
}

/* ── ADMIN PAGES ── */
.admin-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}
.admin-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.admin-card-header {
    padding: 16px 22px;
    background: var(--neutral-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-card-title { font-size: 16px; font-weight: 700; }
.admin-card-body  { padding: 22px; }

/* Form */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
    background: white;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* Admin Grid Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    background: var(--neutral-light);
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table tr:hover td { background: var(--neutral-light); }

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
    border-left: 4px solid;
    display: none;
}
.alert.show  { display: block; }
.alert-success { background: var(--success-light); color: var(--success); border-color: var(--success); }
.alert-danger  { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger);  }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-icon  { font-size: 56px; margin-bottom: 16px; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-sub   { font-size: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .mock-header { flex-direction: column; gap: 12px; text-align: center; }
    .result-stats-bar { grid-template-columns: 1fr 1fr; }
    .question-footer { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
}
