/* ============================================================
   NARA — Narrative AI for every game
   style.css
   
   구조:
   1. 전역 변수 & 리셋
   2. 네비게이션
   3. 랜딩 히어로
   4. HOW IT WORKS
   5. 앱 공통 (screen, bottom-nav, 버튼)
   6. Branch 화면
   7. Upload 화면
   8. Genre 화면
   9. Format 화면
   10. Questions 화면 (노드)
   11. Synopsis 화면
   12. Storyboard 화면
   13. Export 화면
   14. 로딩 오버레이
============================================================ */


/* ============================================================
   1. 전역 변수 & 리셋
============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d0d14;
  --surface: #16161f;
  --surface2: #1e1e2a;
  --border: #2a2a3a;
  --accent: #7c6ef5;
  --accent2: #a78bfa;
  --text: #f0eefc;
  --text2: #9996b8;
  --text3: #6b6890;
  --green: #4ade80;
  --red: #f87171;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Apple SD Gothic Neo', sans-serif;
  overflow-x: hidden;
}


/* ============================================================
   2. 네비게이션
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* NARA 홀로그램 로고 */
.logo-holo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  animation: holo 4s ease-in-out infinite;
}

@keyframes holo {
  0%,100% { color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.8), -1px 0 rgba(236,72,153,0.7), 1px 0 rgba(59,130,246,0.7); }
  25%      { color: #f9a8d4; text-shadow: 0 0 12px rgba(236,72,153,0.9), -2px 0 rgba(255,255,255,0.5), 2px 0 rgba(59,130,246,0.8); }
  50%      { color: #93c5fd; text-shadow: 0 0 12px rgba(59,130,246,0.9), -2px 0 rgba(236,72,153,0.6), 1px 0 rgba(255,255,255,0.6); }
  75%      { color: #e9d5ff; text-shadow: 0 0 10px rgba(167,139,250,0.9), -1px 0 rgba(59,130,246,0.6), 2px 0 rgba(236,72,153,0.5); }
}

/* 진행 점 */
.nav-dots { display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all 0.3s; }
.dot.active { background: var(--accent); transform: scale(1.3); }
.dot.done   { background: var(--green); }

/* 상단 진행 바 */
.progress-bar {
  position: fixed;
  top: 65px; left: 0; right: 0;
  height: 3px;
  background: var(--border);
  z-index: 999;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.4s;
}


/* ============================================================
   3. 랜딩 히어로
============================================================ */
#landing {
  position: relative;
  padding-top: 65px;
}

.hero {
  position: relative;
  height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

/* 배경 영상 래퍼 */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 영상 없을 때 그라데이션 배경 */
.hero-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d0d14, #1a1030, #0d0814);
}
.hero-fallback-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,110,245,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,110,245,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* 어두운 그라데이션 오버레이 */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,13,20,0.85) 0%,
    rgba(13,13,20,0.25) 60%,
    rgba(13,13,20,0.15) 100%
  );
  z-index: 1;
}

/* 히어로 텍스트 콘텐츠 */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(124,110,245,0.5);
  border-radius: 100px;
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
  background: rgba(124,110,245,0.1);
}

.hero-title {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-title span {
  background: linear-gradient(135deg, #fff, var(--accent2), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: rgba(240,238,252,0.75);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 40px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 시작하기 버튼 */
.btn-start {
  padding: 16px 40px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 30px rgba(124,110,245,0.4);
}
.btn-start:hover { background: var(--accent2); transform: translateY(-2px); }

/* HOW IT WORKS 버튼 */
.btn-hiw {
  padding: 16px 28px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-hiw:hover { border-color: var(--accent2); color: var(--accent2); }

/* 영상 교체 버튼 (우하단) */
.video-replace-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  padding: 8px 16px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.video-replace-btn:hover { border-color: var(--accent); color: var(--accent2); }


/* ============================================================
   4. HOW IT WORKS 섹션
============================================================ */
.hiw { background: var(--bg); padding: 100px 40px; display: none; }
.hiw.show { display: block; }

.hiw-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: start;
}

.hiw-sticky { position: sticky; top: 100px; }
.hiw-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent2); margin-bottom: 20px; }
.hiw-headline { font-size: 42px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; }
.hiw-sub { font-size: 15px; color: var(--text2); line-height: 1.7; margin-top: 12px; }
.hiw-nara { margin-top: 28px; font-size: 13px; color: var(--text3); line-height: 2.2; }
.hiw-nara span { color: var(--accent2); font-weight: 700; }

.hiw-steps { display: flex; flex-direction: column; }
.hiw-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.hiw-step:first-child { padding-top: 0; }
.hiw-step:last-child  { border-bottom: none; }

.hiw-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent2);
}
.hiw-step-cat { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.hiw-step-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.5px; }
.hiw-step-desc { font-size: 14px; color: var(--text2); line-height: 1.7; }


/* ============================================================
   5. 앱 공통 (screen, bottom-nav, 버튼)
============================================================ */
#app { display: none; }
#app.show { display: block; padding-top: 65px; }

.screen { display: none; }
.screen.active { display: flex; flex-direction: column; min-height: calc(100vh - 65px); }

.screen-wrap { padding: 60px 40px; max-width: 800px; margin: 0 auto; width: 100%; }
.screen-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.screen-desc  { font-size: 15px; color: var(--text2); margin-bottom: 40px; }

/* 하단 이전/다음 네비 */
.bottom-nav {
  margin-top: auto;
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.btn-back {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover { border-color: var(--text2); color: var(--text); }

.btn-next {
  padding: 12px 32px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-next:hover    { background: var(--accent2); }
.btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* 공통 액션 버튼 */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-dislike {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 10px;
  color: var(--red);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-dislike:hover { background: rgba(248,113,113,0.2); }

/* 공통 폼 요소 */
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  display: block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-group { margin-bottom: 20px; }

.form-input,
.form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
}
.form-input:focus,
.form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 100px; resize: vertical; }

/* 인라인 프롬프트 수정창 */
.action-row { display: flex; gap: 12px; flex-wrap: wrap; }
.prompt-edit { margin-top: 16px; display: none; }
.prompt-edit.show { display: block; }
.prompt-edit textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 10px;
}

/* 스피너 */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ============================================================
   6. Branch 화면 (스토리 있어요/없어요)
============================================================ */
.branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.branch-card {
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface);
}
.branch-card:hover    { border-color: var(--accent); background: rgba(124,110,245,0.07); transform: translateY(-3px); }
.branch-card.selected { border-color: var(--accent); background: rgba(124,110,245,0.12); }

.branch-icon  { font-size: 40px; margin-bottom: 16px; }
.branch-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.branch-desc  { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.branch-tags  { display: flex; flex-wrap: wrap; gap: 6px; }
.branch-tag   { padding: 4px 10px; background: var(--surface2); border-radius: 100px; font-size: 11px; color: var(--text3); }

/* 시나리오 파일 업로드 박스 */
.scenario-upload {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  margin-bottom: 20px;
}
.scenario-upload:hover    { border-color: var(--accent); background: rgba(124,110,245,0.05); }
.scenario-upload.has-file { border-color: var(--green); border-style: solid; }
.scenario-upload input    { position: absolute; inset: 0; opacity: 0; cursor: pointer; }


/* ============================================================
   7. Upload 화면 (에셋 업로드)
============================================================ */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.upload-box {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.upload-box:hover    { border-color: var(--accent); background: rgba(124,110,245,0.05); }
.upload-box.has-file { border-color: var(--green); border-style: solid; }
.upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-preview { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; display: none; }


/* ============================================================
   8. Genre 화면 (장르 선택)
============================================================ */
.genre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.genre-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.genre-card:hover    { border-color: var(--accent); background: rgba(124,110,245,0.05); }
.genre-card.selected { border-color: var(--accent); background: rgba(124,110,245,0.1); }
.genre-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px; right: 16px;
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: white;
}

.genre-emoji { font-size: 32px; margin-bottom: 12px; }
.genre-name  { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.genre-desc  { font-size: 13px; color: var(--text2); line-height: 1.5; }
.genre-tag   { display: inline-block; padding: 3px 10px; background: var(--surface2); border-radius: 100px; font-size: 11px; color: var(--text3); margin-top: 10px; }


/* ============================================================
   9. Format 화면 (시네마틱 / 숏폼 선택)
============================================================ */
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.format-card {
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface);
  position: relative;
}
.format-card:hover    { border-color: var(--accent); background: rgba(124,110,245,0.07); transform: translateY(-3px); }
.format-card.selected { border-color: var(--accent); background: rgba(124,110,245,0.12); }
.format-card.selected::after {
  content: '✓';
  position: absolute;
  top: 16px; right: 16px;
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: white;
}

.format-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.format-badge.cinematic { background: rgba(124,110,245,0.2); color: var(--accent2); }
.format-badge.shortform { background: rgba(74,222,128,0.15); color: var(--green); }

.format-icon     { font-size: 36px; margin-bottom: 12px; }
.format-title    { font-size: 20px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.5px; }
.format-duration { font-size: 13px; color: var(--text3); margin-bottom: 12px; }
.format-desc     { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 16px; }
.format-tags     { display: flex; flex-wrap: wrap; gap: 6px; }
.format-tag      { padding: 4px 12px; background: var(--surface2); border-radius: 100px; font-size: 11px; color: var(--text3); }


/* ============================================================
   10. Questions 화면 (노드 연결 방식)
============================================================ */
.node-container { display: flex; flex-direction: column; margin-bottom: 32px; }

.node-item { display: flex; gap: 20px; align-items: flex-start; }

.node-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.node-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text3);
  background: var(--surface);
  transition: all 0.3s;
  flex-shrink: 0;
}
.node-circle.active { border-color: var(--accent); color: var(--accent); background: rgba(124,110,245,0.1); }
.node-circle.done   { border-color: var(--green);  color: var(--green);  background: rgba(74,222,128,0.1); }

.node-line { width: 2px; height: 40px; background: var(--border); margin: 4px 0; transition: background 0.3s; }
.node-line.done { background: var(--green); }

.node-right   { flex: 1; padding-bottom: 32px; }
.node-question { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

.node-answer {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}
.node-answer:focus    { border-color: var(--accent); }
.node-answer.answered { border-color: var(--green); }


/* ============================================================
   11. Synopsis 화면
============================================================ */
.synopsis-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text2);
  min-height: 200px;
}


/* ============================================================
   12. Storyboard 화면
============================================================ */
.sb-wrap {
  padding: 40px 40px 100px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.sb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.sb-ep    { font-size: 13px; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
.sb-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.sb-desc  { font-size: 14px; color: var(--text2); }
.sb-count { font-size: 13px; color: var(--text3); white-space: nowrap; margin-top: 4px; }

/* 카드 그리드 (가로 스크롤) */
.sb-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.sb-card {
  flex: 0 0 160px;
  border-radius: 14px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: var(--surface);
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
}
.sb-card:hover    { border-color: var(--accent); }
.sb-card.liked    { border-color: var(--green); }
.sb-card.disliked { border-color: var(--red); }

/* 카드 이미지 영역 */
.sb-img {
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, #1e1a3a, #2d1f4a, #1a1a2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
}
.sb-num {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* 카드 좋아요/싫어요 버튼 */
.sb-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.sb-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.sb-btn:hover               { transform: scale(1.1); }
.sb-btn.like:hover          { border-color: var(--green); background: rgba(74,222,128,0.1); }
.sb-btn.dislike:hover       { border-color: var(--red);   background: rgba(248,113,113,0.1); }
.sb-btn.liked               { border-color: var(--green); background: rgba(74,222,128,0.15); }
.sb-btn.disliked            { border-color: var(--red);   background: rgba(248,113,113,0.15); }

.sb-footer-hint { font-size: 13px; color: var(--text3); margin-bottom: 16px; }

/* 우하단 플로팅 버튼 */
.sb-float-btns {
  position: fixed;
  bottom: 32px; right: 40px;
  display: flex;
  gap: 12px;
  z-index: 100;
}

.btn-regen {
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-regen:hover { border-color: var(--accent); color: var(--accent); }

.btn-gen-video {
  padding: 12px 28px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(124,110,245,0.4);
}
.btn-gen-video:hover { background: var(--accent2); }

/* 싫어요 팝업 오버레이 */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 499;
  backdrop-filter: blur(4px);
}
.popup-overlay.show { display: block; }

/* 싫어요 팝업 채팅창 */
.dislike-popup {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dislike-popup.show { display: block; }

.popup-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.popup-sub   { font-size: 13px; color: var(--text2); margin-bottom: 16px; }

.popup-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  resize: none;
  height: 100px;
  margin-bottom: 12px;
  transition: border 0.2s;
}
.popup-textarea:focus { border-color: var(--accent); }

.popup-btns { display: flex; gap: 8px; justify-content: flex-end; }

.popup-cancel {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
}
.popup-apply {
  padding: 10px 20px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.popup-apply:hover { background: var(--accent2); }


/* ============================================================
   13. Export 화면 (완성 & SNS 배포)
============================================================ */
.export-video {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 400px;
  max-width: 225px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  color: var(--text3);
  font-size: 14px;
  flex-direction: column;
  gap: 12px;
}

.sns-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.sns-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text2);
}
.sns-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(124,110,245,0.1); }

.sns-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.sns-caption  { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 12px; }
.sns-hashtags { font-size: 13px; color: var(--accent2); line-height: 1.8; }

.export-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-export.download { background: var(--accent); color: white; }
.btn-export.download:hover { background: var(--accent2); }
.btn-export.sns { background: var(--surface); border: 1px solid var(--border); color: var(--text2); }
.btn-export.sns:hover { border-color: var(--accent); color: var(--accent); }


/* ============================================================
   14. 로딩 오버레이 (AI 생성 중)
============================================================ */
.gen-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,13,20,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}
.gen-overlay.show { display: flex; }

.gen-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.gen-text { font-size: 16px; color: var(--text2); }
.gen-sub  { font-size: 13px; color: var(--text3); }
