@charset "UTF-8";
/* ============================================
   AI 카드뉴스 생성기 — Page CSS
   Design System: #FF6B6B | #1A1A1A | #F5F5F5
   ============================================ */

/* ── 페이지 래퍼 ── */
.cn-page {
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
  background: #F5F5F5;
  color: #333;
  font-family: "Europa", "Noto Sans KR", sans-serif;
}

/* ── SIDEBAR ── */
.cn-sidebar {
  width: 300px;
  min-width: 300px;
  background: #fff;
  border-right: 1px solid #E5E5E5;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.cn-sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid #E5E5E5;
}
.cn-sidebar-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.3px;
}
.cn-sidebar-header p {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.cn-sidebar-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 폼 */
.cn-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 6px;
}
.cn-form-group input,
.cn-form-group select,
.cn-form-group textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  color: #333;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cn-form-group input:focus,
.cn-form-group select:focus,
.cn-form-group textarea:focus {
  border-color: #FF6B6B;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}
.cn-form-group input::placeholder { color: #bbb; }
.cn-form-group textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.cn-api-hint {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}
.cn-api-hint a { color: #FF6B6B; text-decoration: none; }

/* 컬러 스와치 (테마 선택) */
.cn-color-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cn-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
}
.cn-swatch:hover { transform: scale(1.1); }
.cn-swatch.active { border-color: #1A1A1A; }

/* 생성 버튼 */
#cn-btn-generate {
  width: 100%;
  padding: 12px;
  background: #FF6B6B;
  border: none;
  border-radius: 6px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
#cn-btn-generate:hover { background: #e85c5c; transform: translateY(-1px); }
#cn-btn-generate:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* 카드 썸네일 네비 */
.cn-thumb-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cn-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.cn-thumb:hover { background: #F5F5F5; }
.cn-thumb.active { background: rgba(255, 107, 107, 0.06); border-color: #FF6B6B; }
.cn-thumb-num {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: #666;
}
.cn-thumb.active .cn-thumb-num {
  background: #FF6B6B;
  color: #fff;
}
.cn-thumb-title {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── MAIN ── */
.cn-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
  position: relative;
}

/* 빈 상태 */
.cn-empty {
  text-align: center;
  color: #999;
}
.cn-empty .icon { font-size: 52px; margin-bottom: 16px; }
.cn-empty h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 8px;
}
.cn-empty p { font-size: 14px; line-height: 1.6; color: #999; }
.cn-step-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  text-align: left;
}
.cn-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 13px;
  color: #555;
}
.cn-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FF6B6B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}

/* 로딩 상태 */
.cn-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.cn-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #E5E5E5;
  border-top-color: #FF6B6B;
  border-radius: 50%;
  animation: cn-spin 0.8s linear infinite;
}
@keyframes cn-spin { to { transform: rotate(360deg); } }
.cn-loading-text { font-size: 15px; font-weight: 600; color: #1A1A1A; }
.cn-loading-sub { font-size: 12px; color: #999; }
.cn-dots { display: flex; gap: 6px; }
.cn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF6B6B;
  animation: cn-pulse 1.4s ease-in-out infinite;
}
.cn-dot:nth-child(2) { animation-delay: 0.2s; }
.cn-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes cn-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* 미리보기 영역 */
.cn-preview {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-height: 100%;
}
.cn-display-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.cn-display {
  width: 480px;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  background: #fff;
}
.cn-display .cn-card-inner {
  width: 1080px;
  height: 1350px;
  transform: scale(calc(480/1080));
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 0;
}
.cn-nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #E5E5E5;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cn-nav-arrow:hover { border-color: #FF6B6B; color: #FF6B6B; }
.cn-nav-arrow:disabled { opacity: 0.3; cursor: default; }
.cn-counter {
  font-size: 13px;
  color: #999;
  letter-spacing: 0.5px;
}
.cn-dl-row { display: flex; gap: 10px; }
.cn-btn-dl {
  padding: 10px 20px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.cn-btn-dl-single {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
}
.cn-btn-dl-single:hover { border-color: #FF6B6B; color: #FF6B6B; }
.cn-btn-dl-all {
  background: #FF6B6B;
  color: white;
}
.cn-btn-dl-all:hover { background: #e85c5c; }

/* ── 카드 템플릿 (1080×1350, 4:5 세로형) ── */
.cn-render-area {
  position: fixed;
  left: -9999px;
  top: -9999px;
  pointer-events: none;
}
.cn-card {
  width: 1080px;
  height: 1350px;
  font-family: 'Noto Sans KR', sans-serif;
  position: relative;
  overflow: hidden;
}

/* COVER */
.cn-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 90px;
}
.cn-cover-tag {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.85;
}
.cn-cover-title {
  font-size: 82px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 28px;
  word-break: keep-all;
}
.cn-cover-subtitle {
  font-size: 34px;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1.5;
  word-break: keep-all;
  margin-bottom: 50px;
}
.cn-cover-date {
  font-size: 26px;
  font-weight: 500;
  opacity: 0.55;
  letter-spacing: 1px;
}
.cn-cover-deco {
  position: absolute;
  top: 0; right: 0;
  width: 420px; height: 420px;
  border-radius: 0 0 0 100%;
  opacity: 0.12;
}
.cn-cover-deco2 {
  position: absolute;
  bottom: -100px; right: -100px;
  width: 350px; height: 350px;
  border-radius: 50%;
  opacity: 0.07;
}
.cn-cover-bignum {
  position: absolute;
  top: 70px; right: 80px;
  font-size: 200px;
  font-weight: 900;
  opacity: 0.05;
  line-height: 1;
  letter-spacing: -8px;
}

/* NEWS */
.cn-news {
  display: flex;
  flex-direction: column;
  padding: 90px;
}
.cn-news-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 50px;
}
.cn-news-num {
  width: 80px; height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 900;
  flex-shrink: 0;
}
.cn-news-label {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
}
.cn-news-emoji { font-size: 100px; margin-bottom: 30px; line-height: 1; }
.cn-news-headline {
  font-size: 62px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.5px;
  word-break: keep-all;
  margin-bottom: 40px;
}
.cn-news-body {
  font-size: 44px;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  opacity: 0.8;
  border-top: 2px solid;
  padding-top: 36px;
}
.cn-page-indicator {
  position: absolute;
  bottom: 60px; right: 90px;
  font-size: 26px;
  font-weight: 700;
  opacity: 0.35;
  letter-spacing: 1px;
}
.cn-brand {
  position: absolute;
  bottom: 56px; left: 90px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.4;
}

/* SUMMARY */
.cn-summary {
  display: flex;
  flex-direction: column;
  padding: 90px;
}
.cn-summary-tag {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 28px;
}
.cn-summary-title {
  font-size: 72px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 56px;
  word-break: keep-all;
}
.cn-summary-points {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
}
.cn-summary-point {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.5;
  word-break: keep-all;
}
.cn-point-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  margin-top: 14px;
  flex-shrink: 0;
}

/* CLOSING */
.cn-closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px;
  text-align: center;
}
.cn-closing-icon { font-size: 100px; margin-bottom: 36px; }
.cn-closing-title {
  font-size: 70px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -2px;
  margin-bottom: 32px;
  word-break: keep-all;
}
.cn-closing-sub {
  font-size: 34px;
  font-weight: 400;
  line-height: 1.7;
  opacity: 0.7;
  word-break: keep-all;
  margin-bottom: 60px;
  max-width: 820px;
}
.cn-closing-btn {
  padding: 28px 70px;
  border-radius: 60px;
  font-size: 32px;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 1px;
}

/* ── 에러 토스트 ── */
#cn-error-toast {
  position: fixed;
  bottom: 30px; right: 30px;
  background: #e74c3c;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  max-width: 320px;
  line-height: 1.5;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s;
  z-index: 9999;
}
#cn-error-toast.show { transform: translateY(0); opacity: 1; }

/* 키 저장 뱃지 */
#cn-key-badge {
  font-size: 11px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #999;
}
#cn-key-badge button {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
