/* app/static/css/style.css — 사용자 화면(입력/결과 페이지) 스타일. 관리자 영역과는 별개. */

:root {
  --su-bg: #f4f4f7;
  --su-fg: #1a1a1a;
  --su-muted: #6b6b76;
  --su-accent: #cc0000;
  --su-accent-dark: #a30000;
  --su-accent-fg: #ffffff;
  --su-border: #e2e2e8;
  --su-card-bg: #ffffff;
  --su-error-bg: #fdecea;
  --su-error-fg: #8a1c14;
  --su-shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px rgba(20, 20, 30, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--su-bg);
  color: var(--su-fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

.ad-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  background: #ececf0;
  color: var(--su-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* 카드형 컨테이너 — 입력 화면과 결과 화면 둘 다 여기에 얹힌다 */
.summarize-app,
.result-page {
  background: var(--su-card-bg);
  border: 1px solid var(--su-border);
  border-radius: 16px;
  box-shadow: var(--su-shadow);
  padding: 40px 32px;
}

.summarize-app {
  text-align: center;
}

h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.lead {
  color: var(--su-muted);
  margin: 0 0 32px;
  font-size: 0.98rem;
}

.summarize-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#url-input {
  width: 100%;
  max-width: 480px;
  padding: 14px 16px;
  border: 1.5px solid var(--su-border);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#url-input:focus {
  outline: none;
  border-color: var(--su-accent);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 1rem;
  background: var(--su-accent);
  color: var(--su-accent-fg);
  transition: background-color 0.15s ease, transform 0.05s ease;
}

button:hover:not(:disabled) {
  background: var(--su-accent-dark);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

#summarize-btn {
  display: block;
  margin: 4px auto 0;
  padding: 18px 64px;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(204, 0, 0, 0.28);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.error-message {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--su-error-bg);
  color: var(--su-error-fg);
  font-size: 0.92rem;
}

.loading-message {
  margin-top: 20px;
  color: var(--su-muted);
}

/* 강제 시청 광고 오버레이 — 스킵/닫기 버튼이 없다 (INV-1). */
.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ad-overlay-content {
  background: var(--su-card-bg);
  color: var(--su-fg);
  padding: 36px;
  border-radius: 16px;
  text-align: center;
  max-width: 90%;
  box-shadow: var(--su-shadow);
}

.ad-overlay-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--su-muted);
}

.ad-placeholder {
  margin: 16px 0;
  padding: 48px 24px;
  background: #ececf0;
  border-radius: 10px;
  color: var(--su-muted);
}

.ad-countdown {
  font-weight: 600;
}

.result-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.share-controls {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-controls button {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.92rem;
}

.copy-feedback {
  color: var(--su-muted);
  font-size: 0.88rem;
}

.summary-section {
  margin-bottom: 30px;
}

.summary-section:last-child {
  margin-bottom: 0;
}

.summary-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--su-border);
}

.summary-paragraph {
  margin: 0;
}

.key-points {
  margin: 0;
  padding-left: 22px;
}

.key-points li {
  margin-bottom: 6px;
}

.chapters {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.chapter-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--su-border);
}

.chapter-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.chapter-time {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--su-accent);
  background: rgba(204, 0, 0, 0.08);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 8px;
}

.chapter-label {
  font-weight: 600;
}

.chapter-text {
  color: var(--su-muted);
  margin: 6px 0 0;
}

@media (max-width: 520px) {
  .summarize-app,
  .result-page {
    padding: 28px 20px;
    border-radius: 12px;
  }

  #summarize-btn {
    width: 100%;
    padding: 16px 24px;
  }
}
