/* ===== 汇率换算计算器 - 基于 lcbk-cardflow 风格 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
    background: #f5f7fa;
    -webkit-font-smoothing: antialiased;
}
body.dark { background: #1a1f2e; color: #e0e6ed; }
a { color: #f59e0b; text-decoration: none; transition: color .2s; }
a:hover { color: #d97706; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
#header {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}
body.dark #header { background: rgba(26,31,46,.95); border-color: #2d3748; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}
.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: #1a202c;
}
body.dark .brand { color: #f7fafc; }
.brand-logo {
    display: inline-block;
    color: #f59e0b;
    font-size: 22px;
    margin-right: 4px;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11px; color: #94a3b8; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.main-nav a {
    padding: 8px 14px;
    font-size: 14px;
    color: #4b5563;
    border-radius: 6px;
    transition: all .2s;
}
.main-nav a:hover {
    background: #f3f4f6;
    color: #f59e0b;
}
.main-nav a.active {
    background: #f59e0b;
    color: #fff;
}
body.dark .main-nav a { color: #d1d5db; }
body.dark .main-nav a:hover { background: #2d3748; }
body.dark .main-nav a.active { background: #f59e0b; color: #fff; }

.header-actions {
    display: flex;
    gap: 8px;
    font-size: 20px;
    cursor: pointer;
}
.header-actions a { color: inherit; }

/* ===== Home banner ===== */
.home-banner {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 0 20px;
}
.home-banner img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(14,165,233,.15);
}

/* ===== Layout ===== */
.layout {
    display: flex;
    gap: 24px;
    padding: 24px 20px 40px;
}
.main-area {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ===== Crumbs ===== */
.crumbs {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 16px;
    padding: 0 4px;
}
.crumbs a { color: #64748b; }
.crumbs a:hover { color: #f59e0b; }

/* ===== Post grid ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media screen and (max-width: 900px) {
    .post-grid { grid-template-columns: 1fr; }
}

.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    box-shadow: 0 8px 24px rgba(14,165,233,.12);
    transform: translateY(-2px);
}
body.dark .post-card { background: #232b3d; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
body.dark .post-card:hover { box-shadow: 0 8px 24px rgba(14,165,233,.25); }

.post-cover {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
}
.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.post-card:hover .post-cover img {
    transform: scale(1.04);
}

.post-body {
    padding: 18px 20px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.post-cat {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #d97706;
    margin-bottom: 8px;
    width: fit-content;
}
.cat-major { background: #e0f2fe; color: #d97706; }
.cat-asia { background: #fef3c7; color: #b45309; }
.cat-commodity { background: #d1fae5; color: #047857; }
.cat-em { background: #fee2e2; color: #b91c1c; }
.cat-safe { background: #ede9fe; color: #6d28d9; }
.cat-guide { background: #fce7f3; color: #be185d; }
.cat-policy { background: #cffafe; color: #0e7490; }
.cat-trading { background: #f3e8ff; color: #7e22ce; }
.cat-risk { background: #ffe4e6; color: #be123c; }

.post-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.post-title a {
    color: #1a202c;
}
.post-title a:hover { color: #f59e0b; }
body.dark .post-title a { color: #f1f5f9; }

.post-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-excerpt {
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
    flex: 1;
}
.read-more {
    color: #f59e0b;
    font-size: 13px;
    font-weight: 500;
    align-self: flex-start;
}
.read-more:hover { color: #d97706; }

/* ===== Pagination ===== */
.pagination {
    text-align: center;
    margin-top: 28px;
    padding: 0 20px;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    background: #fff;
    transition: all .2s;
}
.pagination a:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}
.pagination .current {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

/* ===== Article single ===== */
.post-single {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
body.dark .post-single { background: #232b3d; }

.post-header {
    padding: 32px 36px 24px;
    border-bottom: 1px solid #f3f4f6;
}
body.dark .post-header { border-color: #2d3748; }
.post-header .post-cat { margin-bottom: 12px; }
.post-header .post-title {
    font-size: 26px;
    margin-bottom: 12px;
}

.post-cover-main {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f3f4f6;
}

.post-content {
    padding: 32px 36px;
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
}
body.dark .post-content { color: #cbd5e1; }
.post-content p { margin-bottom: 16px; }
.post-content h2, .post-content h3 {
    margin: 28px 0 12px;
    color: #0f172a;
    font-weight: 700;
}
.post-content h2 { font-size: 20px; }
.post-content h3 { font-size: 17px; color: #f59e0b; }
.post-content img {
    border-radius: 8px;
    margin: 16px 0;
    cursor: zoom-in;
    width: 100%;
}
.post-content blockquote {
    border-left: 4px solid #f59e0b;
    padding: 12px 20px;
    color: #475569;
    background: #f0f9ff;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
body.dark .post-content blockquote {
    background: #0c2a3e;
    color: #cbd5e1;
}

.post-tags {
    padding: 20px 36px;
    border-top: 1px solid #f3f4f6;
    font-size: 13px;
    color: #94a3b8;
}
body.dark .post-tags { border-color: #2d3748; }
.post-tags a {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0 4px 4px 0;
    color: #475569;
    font-size: 12px;
}
.post-tags a:hover { background: #f59e0b; color: #fff; }

/* ===== Neighbor ===== */
.neighbor-log {
    background: #fff;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.dark .neighbor-log { background: #232b3d; }
.neighbor-log a { color: #475569; }
.neighbor-log a:hover { color: #f59e0b; }

/* ===== Comments ===== */
.comments-area {
    background: #fff;
    border-radius: 12px;
    padding: 28px 36px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.dark .comments-area { background: #232b3d; }
.comments-area h3 {
    font-size: 17px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}
body.dark .comments-area h3 { border-color: #2d3748; }
.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}
.comment-author { font-weight: 600; color: #1a202c; }
.comment-author span { font-weight: normal; color: #94a3b8; margin-left: 8px; font-size: 12px; }
.comment-content { color: #475569; font-size: 14px; margin-top: 4px; }
.comment-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-form input,
.comment-form textarea {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1a202c;
    outline: none;
    transition: border-color .2s;
}
.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #f59e0b;
}
body.dark .comment-form input,
body.dark .comment-form textarea {
    background: #2d3748;
    border-color: #4a5568;
    color: #f1f5f9;
}
.form-actions {
    display: flex;
    gap: 10px;
}
.btn-primary {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s;
}
.btn-primary:hover { background: #d97706; }
.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e5e7eb;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* ===== Sidebar ===== */
.widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.dark .widget { background: #232b3d; }
.widget h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f59e0b;
    color: #0f172a;
}
body.dark .widget h3 { color: #f1f5f9; }

.cat-list li,
.hot-list li,
.new-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.cat-list li:last-child,
.hot-list li:last-child,
.new-list li:last-child { border-bottom: none; }
.cat-list a, .hot-list a, .new-list a { color: #475569; }
.cat-list a:hover, .hot-list a:hover, .new-list a:hover { color: #f59e0b; }
.cat-list .active a { color: #f59e0b; font-weight: 600; }

.tag-cloud a {
    display: inline-block;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 4px;
    margin: 0 4px 6px 0;
    font-size: 12px;
    color: #475569;
    transition: all .2s;
}
.tag-cloud a:hover {
    background: #f59e0b;
    color: #fff;
}

/* ===== Cat title ===== */
.cat-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f172a;
}
body.dark .cat-title { color: #f1f5f9; }
.cat-title small {
    font-size: 14px;
    color: #94a3b8;
    font-weight: normal;
    margin-left: 8px;
}

/* ===== About page ===== */
.about-content {
    background: #fff;
    border-radius: 12px;
    padding: 36px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
}
body.dark .about-content { background: #232b3d; color: #cbd5e1; }
.about-content h1 {
    font-size: 26px;
    margin-bottom: 20px;
    color: #0f172a;
}
body.dark .about-content h1 { color: #f1f5f9; }
.about-content h2 {
    font-size: 19px;
    margin: 24px 0 12px;
    color: #f59e0b;
}
.about-content p { margin-bottom: 14px; }
.about-content ul {
    padding-left: 24px;
    list-style: disc;
    margin-bottom: 14px;
}
.about-content ul li {
    padding: 4px 0;
}

/* ===== Image manage page ===== */
.upload-card {
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 36px;
    text-align: center;
    margin-bottom: 16px;
    transition: all .2s;
}
body.dark .upload-card { background: #232b3d; }
.upload-card.drag-over {
    border-color: #f59e0b;
    background: #f0f9ff;
}
body.dark .upload-card.drag-over { background: #0c2a3e; }
.upload-card p { margin: 8px 0; color: #475569; }
.upload-icon { font-size: 36px; }
.upload-hint { font-size: 12px; color: #94a3b8; }
.upload-card input[type=file] { display: none; }
.upload-btn {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 8px;
}
.upload-btn:hover { background: #d97706; }

.manage-toolbar {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.dark .manage-toolbar { background: #232b3d; }
.manage-toolbar h2 { font-size: 16px; font-weight: 700; margin: 0; }
.manage-toolbar .stats { font-size: 13px; color: #94a3b8; }
.manage-toolbar .btn-group { display: flex; gap: 8px; }
.manage-toolbar button {
    background: #fff;
    color: #475569;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.manage-toolbar button.primary {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}
.manage-toolbar button.primary:hover { background: #d97706; }
body.dark .manage-toolbar button { background: #2d3748; border-color: #4a5568; color: #d1d5db; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
body.dark .gallery-item { background: #232b3d; }
.gallery-item:hover { box-shadow: 0 8px 20px rgba(14,165,233,.15); }
.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: zoom-in;
}
.gallery-info { padding: 10px 12px; }
.gallery-name {
    font-size: 13px;
    color: #1a202c;
    margin-bottom: 4px;
    word-break: break-all;
    line-height: 1.4;
}
body.dark .gallery-name { color: #f1f5f9; }
.gallery-meta { font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.gallery-actions {
    display: flex;
    gap: 6px;
}
.gallery-actions button {
    flex: 1;
    font-size: 12px;
    padding: 5px 0;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #475569;
    border-radius: 4px;
    cursor: pointer;
}
.gallery-actions button:hover { background: #f1f5f9; color: #f59e0b; }
.gallery-actions button.danger:hover { background: #fee; color: #b91c1c; border-color: #fcc; }
body.dark .gallery-actions button { background: #2d3748; border-color: #4a5568; color: #d1d5db; }

.gallery-empty {
    background: #fff;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
body.dark .gallery-empty { background: #232b3d; }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
}
.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ddd;
    font-size: 13px;
    background: rgba(0,0,0,.5);
    padding: 6px 14px;
    border-radius: 3px;
}

/* ===== Footer ===== */
#footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 32px 0 16px;
    color: #64748b;
    font-size: 13px;
}
body.dark #footer { background: #232b3d; border-color: #2d3748; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}
@media screen and (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}
body.dark .footer-col h4 { color: #f1f5f9; }
.footer-col p { line-height: 1.7; color: #94a3b8; }
.footer-col ul li { padding: 4px 0; }
.footer-col ul li a { color: #64748b; }
.footer-col ul li a:hover { color: #f59e0b; }
.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    text-align: center;
    color: #94a3b8;
}
body.dark .footer-bottom { border-color: #2d3748; }
.footer-bottom a { color: #f59e0b; }

/* ===== Responsive ===== */
@media screen and (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-grid { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .post-content { padding: 20px; }
    .post-header { padding: 20px; }
}