/* 剧本专业排版 - 经典书稿风格 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500&display=swap');

:root {
  --bg: #faf8f3;
  --paper: #ffffff;
  --text: #2a2a2a;
  --heading: #1a1a1a;
  --accent: #8b4513;
  --subtle: #999;
  --border: #d4c5b0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 2;
  -webkit-font-smoothing: antialiased;
}

/* Page container */
.page-wrapper {
  max-width: 740px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}

/* Header / Title area */
.script-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 2px solid var(--accent);
}

.script-header .series-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  color: #aaa;
  margin-bottom: 12px;
}

.script-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.script-header .episode-info {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  color: #888;
  margin-top: 8px;
}

.script-header .meta-block {
  margin-top: 20px;
  display: inline-flex;
  gap: 20px;
  padding: 10px 24px;
  background: #f0ebe4;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.78rem;
  color: #777;
}

.script-header .meta-block span {
  display: inline-block;
}

/* Main content */
.script-content {
  font-size: 1.05rem;
}

/* Scene headings - 场次标题 */
.script-content h2 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--heading);
  margin: 48px 0 20px;
  padding: 8px 0 8px 16px;
  border-left: 3px solid var(--accent);
  letter-spacing: 0.02em;
}

.script-content h2:first-child {
  margin-top: 0;
}

/* Sub-headings */
.script-content h3 {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  margin: 32px 0 12px;
}

/* Paragraphs */
.script-content p {
  margin-bottom: 16px;
  text-indent: 2em;
}

/* Scene descriptions - 场景描写 */
.script-content .scene-desc {
  text-indent: 2em;
  margin-bottom: 16px;
  color: #444;
}

/* Character names - 角色名 */
.script-content .character {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 500;
  text-align: center;
  text-indent: 0;
  margin: 24px 0 2px;
  color: var(--heading);
  letter-spacing: 0.15em;
}

/* Dialogue - 对白 */
.script-content .dialogue {
  text-indent: 0;
  padding: 0 3em;
  margin-bottom: 8px;
  color: var(--text);
}

/* Parenthetical - 语气提示 */
.script-content .parenthetical {
  text-indent: 0;
  text-align: center;
  font-size: 0.88rem;
  color: #888;
  margin: 2px 0 6px;
}

/* Action / direction lines */
.script-content .action,
.script-content .direction {
  text-indent: 0;
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
  margin: 2px 0 6px;
  font-style: italic;
}

/* Transitions - 转场 */
.script-content .transition {
  font-family: 'Noto Sans SC', sans-serif;
  text-align: right;
  text-indent: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #bbb;
  letter-spacing: 0.1em;
  margin: 28px 0;
}

/* Blockquote for notes */
.script-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: #f0ebe4;
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: #666;
}

.script-content blockquote p {
  text-indent: 0;
  margin-bottom: 0;
}

/* Lists */
.script-content ul, .script-content ol {
  margin: 16px 0;
  padding-left: 3em;
}

.script-content li {
  margin-bottom: 8px;
}

/* Dividers */
.script-content hr {
  border: none;
  text-align: center;
  margin: 40px 0;
}

.script-content hr::after {
  content: '* * *';
  color: #ccc;
  letter-spacing: 1em;
}

/* Code blocks (for technical notes) */
.script-content pre {
  margin: 20px 0;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.85rem;
  overflow-x: auto;
}

.script-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Footer */
.script-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
  text-align: center;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.75rem;
  color: #bbb;
}

/* Responsive */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 30px 20px 80px;
  }

  .script-header h1 {
    font-size: 1.6rem;
  }

  .script-header .meta-block {
    flex-direction: column;
    gap: 4px;
  }

  .script-content {
    font-size: 1rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    font-size: 12pt;
  }

  .page-wrapper {
    max-width: none;
    padding: 0;
  }

  .script-content h2 {
    page-break-after: avoid;
  }
}
