/* KI-PRUEFUNG - Dark Theme (TTFI Design System) */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-hover: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --accent-orange: #f97316;
    --accent-yellow: #eab308;
    --border-color: #475569;
    --gradient-primary: linear-gradient(135deg, #5BB6FF, #B38CFF);
    --gradient-green: linear-gradient(135deg, #22c55e, #16a34a);
    --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px rgba(59,130,246,0.3);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; }
a { color: var(--accent-blue); text-decoration: none; }

/* Layout */
.app { max-width: 800px; margin: 0 auto; padding: 20px; }
.header { text-align: center; padding: 40px 0 30px; }
.header__brand { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }
.header__title { font-size: 28px; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin: 8px 0; }
.header__sub { color: var(--text-secondary); font-size: 14px; }

/* Cards */
.card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-md); }
.card:hover { border-color: var(--accent-blue); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: all var(--transition); font-family: inherit; }
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-primary:hover { opacity: 0.9; box-shadow: var(--shadow-glow); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-success { background: var(--gradient-green); color: white; }
.btn-danger { background: var(--gradient-red); color: white; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Inputs */
.input { width: 100%; padding: 12px 16px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; font-family: inherit; transition: border var(--transition); }
.input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }

/* Login */
.login-box { max-width: 420px; margin: 60px auto; }
.login-box__icon { font-size: 48px; text-align: center; margin-bottom: 16px; }
.login-box__hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center; }

/* Module Cards */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0; }
.module-card { text-align: center; padding: 28px 20px; cursor: pointer; transition: all var(--transition); }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.module-card__letter { font-size: 32px; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.module-card__name { font-size: 14px; font-weight: 600; margin: 8px 0 4px; }
.module-card__meta { font-size: 12px; color: var(--text-muted); }

/* Exam Top Bar */
.exam-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--bg-secondary); border-radius: var(--radius-lg); margin-bottom: 20px; border: 1px solid var(--border-color); }
.exam-bar__timer { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.exam-bar__timer.warning { color: var(--accent-orange); }
.exam-bar__timer.danger { color: var(--accent-red); animation: pulse 1s infinite; }
.exam-bar__progress { font-size: 14px; color: var(--text-secondary); }
.exam-bar__badge { background: var(--accent-purple); color: white; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Question Card */
.question-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 20px; min-height: 300px; }
.question-card__number { font-size: 12px; color: var(--accent-blue); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.question-card__text { font-size: 16px; line-height: 1.7; margin-bottom: 24px; }

/* Options */
.options { display: flex; flex-direction: column; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-primary); border: 2px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition); font-size: 14px; }
.option:hover { border-color: var(--accent-blue); background: rgba(59,130,246,0.1); }
.option.selected { border-color: var(--accent-blue); background: rgba(59,130,246,0.15); }
.option.correct { border-color: var(--accent-green); background: rgba(34,197,94,0.15); }
.option.incorrect { border-color: var(--accent-red); background: rgba(239,68,68,0.15); }
.option__letter { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.option.selected .option__letter { background: var(--accent-blue); color: white; }
.option.correct .option__letter { background: var(--accent-green); color: white; }
.option.incorrect .option__letter { background: var(--accent-red); color: white; }

/* Progress Dots */
.progress-dots { display: flex; justify-content: center; gap: 8px; margin: 20px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--border-color); cursor: pointer; transition: all var(--transition); }
.dot.current { background: var(--accent-blue); border-color: var(--accent-blue); transform: scale(1.3); }
.dot.answered { background: var(--accent-purple); border-color: var(--accent-purple); }

/* Navigation */
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* Result Circle */
.result-circle { width: 160px; height: 160px; border-radius: 50%; border: 6px solid var(--border-color); display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 24px auto; }
.result-circle.passed { border-color: var(--accent-green); box-shadow: 0 0 30px rgba(34,197,94,0.3); }
.result-circle.failed { border-color: var(--accent-red); box-shadow: 0 0 30px rgba(239,68,68,0.3); }
.result-circle__pct { font-size: 36px; font-weight: 800; }
.result-circle.passed .result-circle__pct { color: var(--accent-green); }
.result-circle.failed .result-circle__pct { color: var(--accent-red); }
.result-circle__label { font-size: 12px; color: var(--text-muted); }

/* Result Badge */
.result-badge { text-align: center; margin: 16px 0; }
.result-badge span { display: inline-block; padding: 6px 20px; border-radius: var(--radius-full); font-weight: 700; font-size: 14px; }
.result-badge .passed { background: rgba(34,197,94,0.2); color: var(--accent-green); }
.result-badge .failed { background: rgba(239,68,68,0.2); color: var(--accent-red); }

/* Review List */
.review-item { padding: 16px; margin-bottom: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.review-item.correct { border-left: 4px solid var(--accent-green); }
.review-item.incorrect { border-left: 4px solid var(--accent-red); }
.review-item__question { font-weight: 600; margin-bottom: 8px; }
.review-item__answer { font-size: 13px; color: var(--text-secondary); margin: 4px 0; }
.review-item__explain { font-size: 13px; color: var(--accent-blue); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-color); }

/* Certificate Card */
.cert-card { background: linear-gradient(135deg, rgba(91,182,255,0.1), rgba(179,140,255,0.1)); border: 2px solid var(--accent-purple); text-align: center; padding: 32px; }
.cert-card__icon { font-size: 48px; margin-bottom: 12px; }
.cert-card__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.cert-card__meta { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* Toast */
.toast { position: fixed; top: 20px; right: 20px; padding: 14px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; z-index: 1000; animation: slideIn 0.3s ease; }
.toast.success { background: var(--accent-green); color: white; }
.toast.error { background: var(--accent-red); color: white; }
.toast.info { background: var(--accent-blue); color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Hidden */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 600px) {
    .modules { grid-template-columns: 1fr; }
    .exam-bar { flex-wrap: wrap; gap: 10px; }
    .question-card { padding: 20px; }
}
