:root {
    --bg-dark: #090d16;
    --bg-surface: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #27354f;
    --border: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   GİRİŞ EKRANI (STUDENT LOGIN)
========================================================= */
.student-login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top, #1e1b4b 0%, var(--bg-dark) 70%);
}

.login-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-glow);
    color: #60a5fa;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.login-brand h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-brand p {
    font-size: 13.5px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.admin-login-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.admin-login-link:hover {
    color: var(--primary);
}

/* =========================================================
   SINAV MOTORU EKRANI
========================================================= */
.exam-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.exam-student-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-tag {
    font-weight: 700;
    font-size: 15px;
}

.dept-tag {
    font-size: 12px;
    background: var(--primary-glow);
    color: #60a5fa;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    color: #f87171;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 15px;
}

.exam-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.question-panel {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.q-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.q-number-pill {
    background: var(--primary-glow);
    color: #60a5fa;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    letter-spacing: 0.5px;
}

.q-progress-text {
    font-size: 13px;
    color: var(--text-muted);
}

.q-text {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.6;
}

.q-code-block {
    background: #020617;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: #38bdf8;
    margin-bottom: 24px;
    overflow-x: auto;
    white-space: pre;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.option-card.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.opt-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.option-card.selected .opt-letter {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.opt-text {
    font-size: 14.5px;
    flex: 1;
    padding-top: 2px;
}

.q-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   SAĞ PANEL (SORU PALETİ 1-100)
========================================================= */
.palette-panel {
    width: 320px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.palette-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.palette-btn {
    aspect-ratio: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.palette-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.palette-btn.current {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.palette-btn.answered {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #34d399;
}

.palette-legend {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-current { background: #38bdf8; }
.legend-answered { background: var(--success); }
.legend-empty { background: var(--border); }

/* =========================================================
   GÜVENLİK VE BLUR KORUMA EKRANI (FULLSCREEN BLOCKER)
========================================================= */
.security-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    text-align: center;
}

.security-blur-overlay.hidden {
    display: none;
}

.security-card {
    background: #1e1b4b;
    border: 2px solid #ef4444;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 520px;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.5);
    animation: pulseWarning 1.5s infinite alternate;
}

@keyframes pulseWarning {
    from { border-color: #ef4444; }
    to { border-color: #f59e0b; }
}

.warning-icon {
    font-size: 50px;
    margin-bottom: 16px;
}

.security-card h2 {
    color: #f87171;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.security-card p {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.violation-pill {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    border-radius: 20px;
    color: #fca5a5;
    font-weight: 700;
    margin-bottom: 24px;
}

/* =========================================================
   SONUÇ KARNESİ EKRANI
========================================================= */
.results-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 560px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
}

.score-badge {
    font-size: 48px;
    font-weight: 900;
    color: #38bdf8;
    margin: 16px 0;
}

.results-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.res-stat-box {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-md);
}

.res-stat-box .val {
    font-size: 20px;
    font-weight: 800;
}

.res-stat-box .lbl {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* =========================================================
   GENEL BUTONLAR
========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2563eb; box-shadow: 0 0 15px var(--primary-glow); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: var(--border); color: var(--text-primary); }
.btn-secondary:hover { background: #475569; }
.btn-block { width: 100%; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    margin-bottom: 18px;
}
.alert-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.alert.hidden { display: none; }
