/* shicity.teci.cn - 全局样式 v0.1 */
:root {
    --ink: #1e3a5f;
    --ink-deep: #0f2236;
    --paper: #f5f1e8;
    --paper-warm: #ede5d3;
    --cinnabar: #c93a2e;
    --gold: #b8860b;
    --muted: #7a7466;
    --line: #d9cfb8;
    --shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}

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

html, body {
    font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", serif;
    background: var(--paper);
    color: var(--ink-deep);
    line-height: 1.7;
    font-size: 16px;
}

body {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(201,58,46,0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(30,58,95,0.05) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ 顶部导航 ============ */
.nav {
    background: var(--ink);
    color: var(--paper);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--paper);
    text-decoration: none;
    letter-spacing: 2px;
    margin-right: 40px;
}

.nav-brand .accent { color: var(--cinnabar); }

.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--paper);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 15px;
    transition: background 0.2s;
}

.nav-links a:hover { background: rgba(255,255,255,0.1); }
.nav-links a.active {
    background: var(--cinnabar);
    color: var(--paper);
}

/* ============ 页面标题 ============ */
.page-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.page-header .title {
    font-size: 44px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 8px;
    margin-bottom: 12px;
}

.page-header .subtitle {
    font-size: 16px;
    color: var(--muted);
    letter-spacing: 4px;
}

.page-header .divider {
    width: 80px;
    height: 2px;
    background: var(--cinnabar);
    margin: 20px auto;
}

/* ============ 卡片 ============ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0 60px;
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.15);
}

.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cinnabar);
}

.card-title {
    font-size: 20px;
    color: var(--ink);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.card-desc {
    color: var(--ink-deep);
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 16px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--paper-warm);
    color: var(--ink);
    border-radius: 3px;
    font-size: 12px;
}

.tag-red { background: rgba(201,58,46,0.1); color: var(--cinnabar); }

/* ============ 诗词展示 ============ */
.poem-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.poem-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.poem-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.poem-author {
    font-size: 14px;
    color: var(--muted);
}

.poem-text {
    font-size: 17px;
    line-height: 2.2;
    color: var(--ink-deep);
    text-align: justify;
    letter-spacing: 1px;
    white-space: pre-line;
    padding: 12px 0;
    font-family: "Source Han Serif SC", "Songti SC", serif;
}

.poem-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--cinnabar);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-family: inherit;
    letter-spacing: 1px;
}

.btn:hover { background: #a83226; }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}

.btn-outline:hover {
    background: var(--ink);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============ 表单 ============ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 15px;
}

.form-hint {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

select, input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 15px;
    background: white;
    color: var(--ink-deep);
    font-family: inherit;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--cinnabar);
}

.scene-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.scene-item {
    padding: 12px 16px;
    background: var(--paper-warm);
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.scene-item:hover { border-color: var(--cinnabar); }
.scene-item.selected {
    border-color: var(--cinnabar);
    background: white;
}

.scene-item .scene-name {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.scene-item .scene-desc {
    font-size: 13px;
    color: var(--muted);
}

/* ============ AI 输出 ============ */
.ai-output {
    background: white;
    border: 1px solid var(--line);
    border-left: 4px solid var(--cinnabar);
    padding: 24px;
    margin-top: 24px;
    border-radius: 0 6px 6px 0;
    box-shadow: var(--shadow);
    line-height: 2;
    font-size: 17px;
    white-space: pre-wrap;
    color: var(--ink-deep);
    font-family: "Source Han Serif SC", "Songti SC", serif;
}

.ai-output .poem-line {
    display: block;
    padding: 4px 0;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--line);
    border-top-color: var(--cinnabar);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 城市展示 ============ */
.city-hero {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-deep) 100%);
    color: var(--paper);
    padding: 60px 24px;
    text-align: center;
    margin-bottom: 40px;
}

.city-hero h1 {
    font-size: 52px;
    letter-spacing: 12px;
    margin-bottom: 8px;
}

.city-hero .alias {
    font-size: 18px;
    opacity: 0.7;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.city-hero .one-line {
    font-size: 20px;
    line-height: 2;
    max-width: 720px;
    margin: 0 auto;
    font-style: italic;
}

.city-hero .stats {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 40px;
}

.city-hero .stat {
    text-align: center;
}

.city-hero .stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--gold);
}

.city-hero .stat-label {
    font-size: 13px;
    opacity: 0.7;
}

/* ============ 诗人卡片 ============ */
.poets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.poet-card {
    background: white;
    border-left: 4px solid var(--gold);
    padding: 20px;
    border-radius: 0 6px 6px 0;
    box-shadow: var(--shadow);
}

.poet-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
}

.poet-era {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.poet-style {
    color: var(--cinnabar);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.poet-desc {
    font-size: 14px;
    color: var(--ink-deep);
    line-height: 1.7;
}

/* ============ 景点卡片 ============ */
.spot-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.spot-title {
    font-size: 20px;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 8px;
}

.spot-one-line {
    color: var(--cinnabar);
    font-style: italic;
    font-size: 15px;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 3px solid var(--cinnabar);
}

.spot-history {
    font-size: 14px;
    color: var(--ink-deep);
    line-height: 1.8;
    margin-bottom: 12px;
}

.spot-hint {
    background: var(--paper-warm);
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.7;
    margin-bottom: 12px;
}

/* ============ 过滤 ============ */
.filter-bar {
    background: white;
    padding: 16px;
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-bar select {
    flex: 1;
    min-width: 160px;
}

/* ============ 页脚 ============ */
.footer {
    background: var(--ink-deep);
    color: var(--paper);
    text-align: center;
    padding: 40px 24px;
    margin-top: 60px;
}

.footer .signature {
    color: var(--gold);
    margin-top: 12px;
    font-size: 13px;
}

.footer a { color: var(--paper); text-decoration: none; border-bottom: 1px dashed var(--gold); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .page-header .title { font-size: 32px; letter-spacing: 4px; }
    .city-hero h1 { font-size: 36px; letter-spacing: 6px; }
    .nav-brand { font-size: 18px; margin-right: 20px; }
    .nav-links a { padding: 8px 10px; font-size: 14px; }
    .container { padding: 0 16px; }
}
