/* blog.css - LeoLee 博客公共样式 */
:root {
    --bg: #fdfaf6;
    --card-bg: #ffffff;
    --text: #2c2416;
    --text-light: #5c5347;
    --accent: #c6754e;
    --accent-soft: #f0e2d8;
    --border: #e8dfd4;
    --tag-bg: #f5efe8;
    --tag-text: #8b6f55;
    --link: #a0523c;
    --link-hover: #7a3522;
    --media-bg: #faf8f4;
    --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
    --radius: 12px;
    --radius-sm: 8px;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: "Georgia", "Noto Serif SC", "STSong", "Songti SC", "SimSun", "KaiTi", "楷体", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-bottom: 60px;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a574, #c6754e, #b8603a, #c6754e, #d4a574);
    z-index: 100;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px;
}

.header {
    text-align: center;
    padding: 40px 20px 20px;
    margin-bottom: 10px;
}
.header .title {
    font-size: 1.6rem;
    font-weight: normal;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 4px;
}
.header .subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    letter-spacing: 0.08em;
}

.day-section {
    margin-bottom: 40px;
}
.day-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.day-date {
    font-size: 1.35rem;
    font-weight: bold;
    letter-spacing: 0.03em;
    color: var(--text);
    white-space: nowrap;
}
.day-date .weekday {
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: 6px;
}
.day-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.day-tag {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.content-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}
.content-card:hover { box-shadow: var(--shadow-md); }
.content-card p { 
    margin-bottom: 10px;
    word-break: break-all;
    overflow-wrap: break-word;
}
.content-card p:last-child { margin-bottom: 0; }

.media-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.media-image:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.image-wrapper { margin: 10px 0; text-align: center; }
.image-caption { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; font-style: italic; }

.model-wrapper {
    display: block;
    margin: 12px auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    background: #fafafa;
    max-width: 100%;
    width: 600px;
    height: 500px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.model-wrapper:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: scale(1.01);
}
.model-wrapper model-viewer {
    display: block;
    width: 100%;
    height: 100%;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
    transition: color 0.15s ease, border-color 0.15s ease;
    word-break: break-all;
}
a:hover { color: var(--link-hover); border-bottom-style: solid; }
a.external-link { display: inline-flex; align-items: center; gap: 3px; }
a.external-link::after { content: '↗'; font-size: 0.7em; opacity: 0.7; margin-left: 2px; }

.link-block {
    display: block;
    padding: 8px 12px;
    background: var(--media-bg);
    border-radius: var(--radius-sm);
    margin: 6px 0;
    border-left: 3px solid var(--accent);
    font-size: 0.9rem;
    word-break: break-all;
}
.link-block a { border-bottom: none; font-weight: 500; }

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 12px auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    background: #000;
    aspect-ratio: 16/9;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-link-fallback {
    display: block;
    text-align: center;
    padding: 14px;
    background: var(--media-bg);
    border-radius: var(--radius-sm);
    margin: 10px 0;
    font-size: 0.9rem;
}
.video-link-fallback a { font-weight: 500; border-bottom: none; }

.news-tag {
    display: inline-block;
    background: #fef3e8;
    color: #c06030;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-right: 4px;
    text-transform: uppercase;
}
.news-item { margin: 6px 0; padding: 6px 0; border-bottom: 1px dotted #f0e8dd; }
.news-item:last-child { border-bottom: none; }

.divider { border: none; border-top: 1px dotted #dcd3c6; margin: 16px 0; }

blockquote {
    border-left: 3px solid var(--accent-soft);
    padding: 8px 14px;
    margin: 10px 0;
    color: #6b5e4e;
    font-style: italic;
    background: #fdfaf6;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.gif-block { text-align: center; margin: 10px 0; }
.gif-block img { max-width: 100%; border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 代码/提示词块 */
.prompt-block {
    background: var(--code-bg);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin: 12px 0;
    font-family: "SF Mono", "Consolas", "Menlo", "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    color: #4a3f35;
    border: 1px solid #e6ddd2;
    overflow-x: auto;
}

/* 音频容器 */
.audio-container {
    background: var(--media-bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 12px 0;
    border: 1px solid var(--border);
}
.audio-container iframe {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 6px;
}
.audio-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}
.audio-cover {
    display: block;
    max-width: 200px;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 0 auto 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
    .container { padding: 16px 12px; }
    .content-card { padding: 14px 16px; }
    .day-date { font-size: 1.2rem; }
    .header { padding: 24px 12px 10px; }
    .header .title { font-size: 1.3rem; }
    .model-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 6/5;
    }
    .container {
        width: 100%;
        overflow-x: hidden;
    }
}