:root{
  --bg:#f7f9fc;--surface:#fff;--muted:#6b7280;--ink:#0f172a;--line:#e5e7eb;
  --brand:#2563eb;--brand-2:#10b981;--accent:#f59e0b;--danger:#ef4444;
  --radius:14px;--shadow:0 10px 30px rgba(2,6,23,.08);--shadow-sm:0 4px 14px rgba(2,6,23,.06)
}
*{box-sizing:border-box}html,body{height:100%}
body{margin:0;background:linear-gradient(180deg,#eef5ff 0%, var(--bg) 32%, #fff 100%);color:var(--ink);font-family:Pretendard,system-ui,-apple-system,Segoe UI,Roboto,'Noto Sans KR',sans-serif;overflow:hidden}

/* ====== Shell (No sidebar; explorer sits left) ====== */
.app{display:grid;grid-template-rows:auto 1fr;min-height:100vh}
.topbar{
  display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:16px 20px;border-bottom:1px solid #e6edf7;
  backdrop-filter: blur(8px) saturate(1.05); background:linear-gradient(180deg,#f3f7ffcc,#f9fbffcc);
}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#2396ff,#2563eb);color:#fff;display:grid;place-items:center;font-weight:900;box-shadow:var(--shadow-sm)}
.brand .t1{font-weight:900}.brand .t2{font-size:12px;color:#475569}
.search{display:flex;gap:8px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:10px 14px;box-shadow:var(--shadow-sm)}
.search input{flex:1;border:0;outline:none;font:inherit}
.kbd{padding:4px 8px;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:8px;font-size:12px;color:#334155}
.user{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:6px 10px;box-shadow:var(--shadow-sm);position:relative}
.avatar{width:28px;height:28px;border-radius:999px;background:#c7d2fe;display:grid;place-items:center;font-weight:800}

/* 모달 오버레이 */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.5) !important;
  z-index: 999998 !important;
  pointer-events: auto !important;
}

/* 인증 폼 스타일 */
.auth-form {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: white !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
  min-width: 300px !important;
  z-index: 999999 !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.auth-form h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.auth-form input, .auth-form select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus, .auth-form select:focus {
  border-color: var(--brand);
}

.auth-form button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-form button:first-of-type {
  background: var(--brand);
  color: white;
}

.auth-form button:first-of-type:hover {
  background: #1d4ed8;
}

.login-form button:last-of-type, .register-form button:last-of-type {
  background: #f3f4f6;
  color: var(--ink);
}

.login-form button:last-of-type:hover, .register-form button:last-of-type:hover {
  background: #e5e7eb;
}

.switch-btn {
  background: #f3f4f6 !important;
  color: var(--ink) !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
}

.switch-btn:hover {
  background: #e5e7eb !important;
}

/* 역할 선택 버튼 */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0;
}

.role-btn {
  padding: 12px 16px !important;
  background: #f3f4f6 !important;
  color: var(--ink) !important;
  border: 2px solid transparent !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s;
}

.role-btn:hover {
  background: #e5e7eb !important;
}

.role-btn.selected {
  background: var(--brand) !important;
  color: white !important;
  border-color: var(--brand) !important;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info span {
  font-size: 14px;
  font-weight: 500;
}

.user-info button {
  padding: 6px 12px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-info button:hover {
  background: #e5e7eb;
}

.login-btn {
  padding: 8px 16px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-btn:hover {
  background: #1d4ed8;
}

.auth-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.register-btn {
  padding: 8px 16px;
  background: var(--brand-2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.register-btn:hover {
  background: #059669;
}
.badge{padding:4px 8px;border-radius:999px;font-size:12px;background:#ecfeff;color:#0ea5e9;border:1px solid #bae6fd}

/* ====== Main Layout: Explorer (left) + Preview (right) ====== */
.main{display:grid;grid-template-columns:324px 1fr 1fr;gap:18px;padding:18px 20px;height:calc(100vh - 80px);overflow:hidden;position:relative}
.resize-handle{
  position:absolute;top:0;bottom:0;width:6px;background:#e5e7eb;cursor:col-resize;z-index:10;transition:background 0.2s;
}
.resize-handle:hover{
  background:#3b82f6;
}
.resize-handle:active{
  background:#1e40af;
}
.explorer{
  display:grid;grid-template-rows:auto auto auto 1fr auto;gap:12px; /* logo gap handled by topbar */
}
.ex-card{background:#fff;border:1px solid #e6edf6;border-radius:16px;box-shadow:var(--shadow-sm)}
.ex-upload{padding:12px}
.ex-upload .upload-tile{
  position:relative;border:2px dashed #f59e0b;background:linear-gradient(135deg,#fffbeb,#fef3c7);
  border-radius:14px;display:flex;gap:12px;align-items:center;justify-content:center;height:96px;cursor:pointer;transition:.2s
}
.ex-upload .upload-tile:hover{border-color:#d97706;background:linear-gradient(135deg,#fef3c7,#fde68a)}
.ex-upload .upload-tile.drag-over{border-color:#92400e;background:linear-gradient(135deg,#fde68a,#fcd34d)}
.upload-icon{font-size:24px;color:#b45309}.upload-title{font-weight:900;color:#92400e}
.progress-container{position:absolute;left:12px;right:12px;bottom:8px;display:none}
.progress-bar{width:100%;height:6px;border-radius:999px;background:#e5e7eb;overflow:hidden}
.progress-fill{height:100%;width:0%;background:linear-gradient(90deg,#34d399,#10b981);transition:width .25s;border-radius:999px}
.progress-text{font-size:11px;color:#475569;text-align:center;margin-top:4px}

.ex-usage{display:flex;align-items:center;gap:8px;padding:10px 12px}
.usage-bar{flex:1;height:8px;border-radius:999px;background:#e5e7eb;overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.06)}
.usage-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#60a5fa,#2563eb);transition:width .25s}
.usage-text{font-size:12px;color:#475569;font-weight:800}

.ex-breadcrumb{padding:8px 10px}
.breadcrumb{
  display:flex;align-items:center;gap:8px;padding:6px 8px;background:#fff;border:1px solid #e6edf6;border-radius:12px;box-shadow:var(--shadow-sm)
}
.breadcrumb .crumb{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-weight:800;cursor:pointer;background:#f8fafc;border:1px solid #e5e7eb;color:#0f172a}
.breadcrumb .sep{opacity:.5}

.ex-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid #eef2f7}
.btn{appearance:none;border:1px solid transparent;border-radius:12px;padding:8px 12px;font-weight:800;cursor:pointer;background:#eef2ff;color:#1e40af;transition:.2s}
.btn.primary{background:linear-gradient(135deg,#4f9aff,#2563eb);color:#fff;box-shadow:var(--shadow)}
.btn.ghost{background:#fff;border-color:#e5e7eb;color:#0f172a}
.btn.danger{background:#fee2e2;color:#991b1b}
.btn.small{padding:6px 10px;border-radius:10px;font-size:12px}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)}.btn:active{transform:translateY(1px)}
.btn.selected{background:#10b981;box-shadow:0 0 0 2px rgba(16,185,129,0.2)}
.btn.selected:hover{background:#059669}

.grid{display:grid;gap:12px}
.files-grid{display:flex;flex-direction:column;gap:8px;padding:8px 12px}
.tile{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #e6edf6;border-radius:14px;padding:10px 12px;box-shadow:var(--shadow-sm);transition:transform .05s,box-shadow .2s,background .2s,border-color .2s}
.tile:not(.selected):hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.small-tile{min-height:52px;height:auto;cursor:pointer;user-select:none;position:relative}
.small-tile:not(.selected):hover{background:#f8fafc;border-color:#3b82f6}
.tile.selected{background:#e0f2fe;border:0;box-shadow:0 0 0 2px rgba(37,99,235,.25);transform:translateY(-1px)}
.small-tile .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}
/* ë‹¨ì¼ ì¹´ë“œ ë ˆì´ì•„ì›ƒ */
.ex-dashboard{display:flex;flex-direction:column;padding:0;height:100%;overflow:hidden;position:relative}
.ex-dashboard .grid{overflow-y:auto;max-height:calc(100vh - 420px)}

/* í´ë” ì•„ì½”ë””ì–¸ */
.folder-item{display:flex;flex-direction:column;gap:6px}
.folder-header .chev{margin-left:auto;font-size:16px;color:#64748b;user-select:none;padding:8px;border-radius:6px;transition:background-color .2s;min-width:32px;display:flex;align-items:center;justify-content:center}
.folder-header .chev:hover{background-color:#f1f5f9}
.folder-children{display:flex;flex-direction:column;gap:6px;margin-left:24px;padding:8px 0 2px;border-left:2px dashed #e6edf6;position:relative}
.folder-children::before{content:'';position:absolute;left:-2px;top:0;width:2px;height:8px;background:#e6edf6}
.child-tile{padding:8px 10px;background:#f8f9fa;border-color:#e5e7eb}
.folder-children .folder-item{margin-left:0}
.icon{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#fff;font-weight:900;background:linear-gradient(135deg,#a78bfa,#6366f1)}
.icon.folder{background:linear-gradient(135deg,#34d399,#10b981)}
.drop-zone{position:relative}
.drop-zone.drag-over{background:#dbeafe;border-color:#2563eb}
.drop-indicator{position:absolute;inset:0;border:2px dashed #3b82f6;border-radius:12px;background:rgba(59,130,246,.08);display:none}
.up-tile .icon{background:linear-gradient(135deg,#94a3b8,#64748b)}

/* ====== Right: Exam Preview ====== */
.exam-preview{
  background:#fff;border:1px solid #e6edf6;border-radius:16px;box-shadow:var(--shadow-sm);overflow:hidden;min-height:400px;max-height:calc(100vh - 120px);
  display:flex;flex-direction:column;
}
.exam-header{
  padding:16px 20px;border-bottom:1px solid #f1f5f9;display:flex;align-items:center;justify-content:space-between
}
.exam-header h2{
  margin:0;font-size:18px;font-weight:800;color:#1e40af
}
.exam-controls{
  display:flex;gap:8px
}
.exam-content{
  flex:1;display:flex;flex-direction:column;overflow:hidden
}
.exam-stats{
  display:flex;gap:20px;padding:12px 20px;background:#f8fafc;border-bottom:1px solid #e6edf6
}
.stat-item{
  display:flex;flex-direction:column;gap:2px
}
.stat-label{
  font-size:12px;color:#64748b;font-weight:600
}
.stat-value{
  font-size:16px;color:#1e40af;font-weight:800
}
.exam-problems{
  flex:1;overflow-y:auto;padding:20px;background:#f8fafc;
}
.exam-problems::-webkit-scrollbar{
  width:8px;
}
.exam-problems::-webkit-scrollbar-track{
  background:#f1f5f9;border-radius:4px;
}
.exam-problems::-webkit-scrollbar-thumb{
  background:#cbd5e1;border-radius:4px;
}
.exam-problems::-webkit-scrollbar-thumb:hover{
  background:#94a3b8;
}
.exam-page{
  width:794px;height:1123px;background:#fff;margin:0 auto 20px;box-shadow:0 4px 12px rgba(0,0,0,0.1);border-radius:8px;overflow:hidden;position:relative;
}
.exam-page:last-child{
  margin-bottom:0;
}
.exam-page-header{
  background:linear-gradient(135deg,#1e40af,#3b82f6);color:#fff;padding:20px;text-align:center;border-bottom:3px solid #1e40af;
}
.exam-page-title{
  font-size:24px;font-weight:800;margin:0 0 8px;text-shadow:0 1px 2px rgba(0,0,0,0.2);
}
.exam-page-subtitle{
  font-size:14px;opacity:0.9;margin:0;
}
.exam-page-content{
  padding:30px;display:flex;gap:20px;height:calc(1123px - 120px);
}
.exam-page-column{
  flex:1;display:flex;flex-direction:column;gap:16px;
}
.exam-page-footer{
  position:absolute;bottom:0;left:0;right:0;height:40px;background:#f8fafc;border-top:1px solid #e5e7eb;display:flex;align-items:center;justify-content:center;font-size:12px;color:#6b7280;
}
.exam-page-number{
  font-weight:600;
}
.empty-state{
  display:flex;flex-direction:column;align-items:center;justify-content:center;height:200px;color:#64748b;text-align:center
}
.empty-icon{
  font-size:48px;margin-bottom:12px;opacity:0.5
}
.empty-state p{
  margin:0;font-size:14px;font-weight:500
}
.exam-problem{
  border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#f8fafc;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);font-size:13px;
  cursor:pointer;transition:all 0.2s ease;position:relative;word-break:break-word;
}

/* PDF 생성 모달 오버레이 */
.pdf-overlay{
  position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.6);backdrop-filter:blur(6px);
  z-index:10000;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity 0.3s ease;
}
.pdf-overlay.show{opacity:1}

.pdf-progress-modal{
  background:#fff;padding:40px;border-radius:20px;box-shadow:0 25px 80px rgba(0,0,0,0.3);
  min-width:400px;max-width:500px;text-align:center;transform:scale(0.9);transition:transform 0.3s ease;
}
.pdf-overlay.show .pdf-progress-modal{transform:scale(1)}

.progress-spinner{margin-bottom:20px}
.spinner{
  width:48px;height:48px;border:4px solid #e5e7eb;border-top:4px solid #3b82f6;border-radius:50%;
  animation:spin 1s linear infinite;margin:0 auto;
}
@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}

.progress-title{font-size:20px;font-weight:700;color:#1e40af;margin-bottom:24px}

.progress-bar-container{display:flex;align-items:center;gap:16px;margin-bottom:16px}
.progress-bar-modal{
  flex:1;height:12px;background:#e5e7eb;border-radius:6px;overflow:hidden;position:relative;
}
.progress-fill-modal{
  height:100%;background:linear-gradient(90deg,#3b82f6,#1e40af);border-radius:6px;
  transition:width 0.4s ease;width:0%;position:relative;overflow:hidden;
}
.progress-fill-modal::after{
  content:'';position:absolute;top:0;left:0;right:0;bottom:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent);
  animation:shimmer 1.5s infinite;
}
@keyframes shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}

.progress-percentage{font-size:18px;font-weight:800;color:#1e40af;min-width:60px}

.progress-text-modal{font-size:16px;color:#64748b;font-weight:500;margin-bottom:12px}
.progress-details{font-size:14px;color:#94a3b8;min-height:20px}

/* 기존 작은 진행바 (호환성 유지) */
.pdf-progress{
  background:linear-gradient(135deg,#f0f9ff,#e0f2fe);border:1px solid #0ea5e9;border-radius:6px;padding:8px;margin:6px 0;
  box-shadow:0 1px 4px rgba(14,165,233,0.1);
}
.progress-bar{
  width:100%;height:4px;background:#e0f2fe;border-radius:2px;overflow:hidden;margin-bottom:4px;
}
.progress-fill{
  height:100%;background:linear-gradient(90deg,#0ea5e9,#0284c7);border-radius:2px;transition:width 0.15s ease;width:0%;
}
.progress-text{
  font-size:11px;color:#0c4a6e;text-align:center;font-weight:600;
}
.exam-problem:hover{border-color:#3b82f6;background:#f1f5f9;transform:translateY(-1px);box-shadow:0 4px 8px rgba(0,0,0,0.12)}
.exam-problem::before{
  content:'✓';position:absolute;top:8px;right:8px;width:20px;height:20px;background:#10b981;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800
}

/* ====== Right: Preview ====== */
.preview-wrap{
  display:grid;grid-template-rows:auto 1fr auto;gap:12px;height:100%;overflow:hidden
}
.preview-toolbar{
  background:#fff;border:1px solid #e6edf6;border-radius:16px;box-shadow:var(--shadow-sm)
}
.preview-header{
  padding:16px 20px 8px;border-bottom:1px solid #f1f5f9
}
.preview-title{
  margin:0;font-size:18px;font-weight:800;color:#1e40af
}
.tabs-container{
  display:flex;align-items:center;justify-content:space-between;padding:8px 12px
}
.tabs{
  display:flex;gap:4px;flex:1;overflow-x:auto
}
.tab{
  display:flex;align-items:center;gap:6px;padding:6px 12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;transition:all 0.2s;white-space:nowrap;font-size:13px;color:#64748b;position:relative
}
.tab:hover{
  background:#e2e8f0;border-color:#cbd5e1
}
.tab.active{
  background:#fff;border-color:#3b82f6;color:#1e40af;box-shadow:0 1px 3px rgba(59,130,246,0.1)
}
.tab.active::after{
  content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background:#3b82f6;border-radius:1px
}
.tab-icon{
  width:16px;height:16px;border-radius:4px;background:linear-gradient(135deg,#a78bfa,#6366f1);display:flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:800
}
.tab-close{
  width:16px;height:16px;border-radius:50%;background:#e5e7eb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s;color:#64748b;font-size:12px;margin-left:4px
}
.tab-close:hover{
  background:#ef4444;color:#fff
}
.tab-controls{
  display:flex;align-items:center;gap:10px
}
.chkall{display:flex;align-items:center;gap:8px}
.preview{
  background:#fff;border:1px solid #e6edf6;border-radius:16px;box-shadow:var(--shadow-sm);overflow-y:auto;min-height:400px;max-height:calc(100vh - 200px);
  display:flex;gap:16px;padding:16px;
}
.preview::-webkit-scrollbar{
  width:8px;
}
.preview::-webkit-scrollbar-track{
  background:#f1f5f9;border-radius:4px;
}
.preview::-webkit-scrollbar-thumb{
  background:#cbd5e1;border-radius:4px;
}
.preview::-webkit-scrollbar-thumb:hover{
  background:#94a3b8;
}
.preview-column{
  flex:1;display:flex;flex-direction:column;gap:12px;min-width:0;
}
.problem{
  border:1px solid #e2e8f0;border-radius:12px;padding:12px;background:#f8fafc;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);font-size:13px;
  cursor:pointer;transition:all 0.2s ease;position:relative;word-break:break-word;
}
.problem:hover{border-color:#3b82f6;background:#f1f5f9;transform:translateY(-1px);box-shadow:0 4px 8px rgba(0,0,0,0.12)}
.problem.selected{border-color:#2563eb;background:#dbeafe;box-shadow:0 0 0 2px rgba(37,99,235,0.2);transform:translateY(-1px)}
.problem.selected::before{
  content:'✓';position:absolute;top:8px;right:8px;width:20px;height:20px;background:#2563eb;color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800
}
.pnum{font-weight:900;color:#1e40af;margin-right:6px;font-size:14px}
.pbody{line-height:1.5;color:#374151}
.preview .table{border:1px solid #111;border-collapse:collapse;margin:6px 0;width:100%;font-size:12px}
.preview .table td{border:1px solid #111;padding:4px 6px;font-size:12px}
.cta{display:flex;gap:8px;justify-content:flex-end}

.counter{color:var(--muted);font-weight:700}
.note{color:#64748b;margin-top:8px}

@media (max-width:1100px){
  .main{grid-template-columns:1fr;grid-auto-rows:auto}
  .files-grid{grid-template-columns:1fr}
}

/* 내 파일 관련 스타일 */
.file-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background: white;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-icon {
  font-size: 24px;
  margin-right: 12px;
}

.file-info {
  flex: 1;
}

.file-name {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.file-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-light);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  margin-bottom: 16px;
}

.file-problems-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.problems-list {
  max-height: 600px;
  overflow-y: auto;
}

.problem-item {
  display: flex;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.problem-number {
  font-weight: bold;
  color: var(--primary);
  margin-right: 16px;
  min-width: 30px;
}

.problem-content {
  flex: 1;
}

.problem-text {
  margin-bottom: 12px;
  line-height: 1.5;
}

.problem-options {
  margin-bottom: 12px;
}

.option {
  margin-bottom: 4px;
  padding-left: 8px;
}

.problem-answer {
  font-weight: bold;
  color: var(--success);
  margin-bottom: 8px;
}

.problem-explanation {
  color: var(--text-light);
  font-style: italic;
  padding: 8px;
  background: var(--bg-light);
  border-radius: 4px;
}

/* Condition block styling (조건 블록 - 네모 박스) */
.condition-block {
  background: transparent;
  border: 1px solid #000000;
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
}


/* 로그인 필요 오버레이 */
.login-required-overlay{
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(255,255,255,0.95);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:100;
  border-radius:16px;
}
.login-message{
  text-align:center;
  padding:40px;
  max-width:300px;
}
.login-icon{
  font-size:48px;
  margin-bottom:16px;
}
.login-message h3{
  font-size:20px;
  font-weight:700;
  color:var(--ink);
  margin-bottom:12px;
}
.login-message p{
  font-size:14px;
  color:#64748b;
  line-height:1.6;
  margin-bottom:24px;
}
.login-overlay-btn{
  background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color:white;
  border:none;
  padding:12px 32px;
  border-radius:8px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s;
  box-shadow:0 4px 12px rgba(102,126,234,0.3);
}
.login-overlay-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(102,126,234,0.4);
}
.ex-dashboard.disabled > *:not(.login-required-overlay){
  opacity:0.3;
  filter:grayscale(50%);
}
