/* ============================================
   唯无一 博客系统 - 统一风格样式表
   设计语言：蓝白科技风（与404页面一致）
   ============================================ */

/* ---- 基础重置 ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #455a64;
    background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 50%, #e8f5e9 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---- 动画背景层 ---- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(100, 181, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 181, 246, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.floating-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.2) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite;
}

.floating-shapes .shape:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.floating-shapes .shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 8%;
    animation-delay: -5s;
}

.floating-shapes .shape:nth-child(3) {
    width: 120px;
    height: 120px;
    bottom: 15%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.light-beam {
    position: fixed;
    top: -50%;
    left: 50%;
    width: 1px;
    height: 200%;
    background: linear-gradient(to bottom,
        transparent,
        rgba(100, 181, 246, 0.1),
        rgba(100, 181, 246, 0.25),
        rgba(100, 181, 246, 0.1),
        transparent
    );
    transform: translateX(-50%);
    animation: beamRotate 30s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes beamRotate {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

/* ---- 内容层 ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ---- Header ---- */
header {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 50%, #4dd0e1 100%);
    color: white;
    padding: 70px 0;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(2, 136, 209, 0.2);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

header h1 {
    font-size: 40px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

header h1 a {
    color: white;
    text-decoration: none;
    transition: text-shadow 0.3s;
}

header h1 a:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

header .description {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
}

/* ---- 导航 ---- */
nav {
    background: rgba(2, 136, 209, 0.95);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

nav .container {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 16px 0;
    display: block;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s;
}

nav ul li a:hover {
    color: white;
}

nav ul li a:hover::after {
    width: 100%;
}

/* ---- 主内容区 ---- */
main {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}

.articles {
    flex: 1;
}

/* ---- 文章卡片 ---- */
article, .article-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    margin-bottom: 24px;
    border-radius: 16px;
    box-shadow:
        0 2px 15px rgba(100, 181, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.1);
    transition: all 0.3s ease;
}

article:hover, .article-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(100, 181, 246, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(2, 136, 209, 0.2);
}

article h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

article h2 a {
    color: #37474f;
    text-decoration: none;
    transition: color 0.3s;
}

article h2 a:hover {
    color: #0288d1;
}

article .meta {
    color: #90a4ae;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

article .meta span {
    margin-right: 15px;
}

article .meta .category {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(2, 136, 209, 0.2);
}

article .excerpt {
    color: #78909c;
    margin-bottom: 20px;
    line-height: 1.7;
}

article .actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

article .read-more {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.25);
}

article .read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}

article .comment-count,
article .like-count {
    color: #90a4ae;
    font-size: 14px;
}

/* ---- 侧边栏 ---- */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.widget {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow:
        0 2px 15px rgba(100, 181, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.1);
}

.widget h3 {
    border-bottom: 2px solid rgba(2, 136, 209, 0.3);
    padding-bottom: 12px;
    margin-bottom: 16px;
    color: #37474f;
    font-size: 18px;
}

.widget p {
    color: #78909c;
    line-height: 1.7;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 10px;
    padding-left: 16px;
    position: relative;
}

.widget ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #03a9f4;
}

.widget ul li a {
    color: #546e7a;
    text-decoration: none;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: #0288d1;
}

/* ---- 分页 ---- */
.pagination {
    text-align: center;
    padding: 30px 0;
}

.pagination a {
    display: inline-block;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.9);
    color: #0288d1;
    text-decoration: none;
    border-radius: 25px;
    margin: 0 4px;
    font-weight: 500;
    border: 1px solid rgba(100, 181, 246, 0.2);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3);
}

/* ---- Footer ---- */
footer {
    background: rgba(38, 50, 56, 0.95);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(100, 181, 246, 0.2);
}

footer .container p {
    margin: 0;
    line-height: 2;
}

footer a {
    color: #4dd0e1;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #80deea;
}

body.dark-mode footer {
    background: rgba(10, 20, 35, 0.97);
    border-top-color: rgba(100, 181, 246, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

/* ---- 文章详情页 ---- */
.single-article {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 16px;
    box-shadow:
        0 2px 15px rgba(100, 181, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.1);
    margin-bottom: 30px;
}

.single-article h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #263238;
    line-height: 1.4;
}

.single-article .content {
    margin: 30px 0;
    font-size: 16px;
    line-height: 1.9;
    color: #455a64;
}

.single-article .content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.single-article .content h1,
.single-article .content h2,
.single-article .content h3 {
    margin: 25px 0 15px;
    color: #263238;
}

.single-article .content h2 {
    font-size: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(100, 181, 246, 0.2);
}

.single-article .content h3 {
    font-size: 20px;
}

.single-article .content p {
    margin-bottom: 16px;
}

.single-article .content pre {
    background: #263238;
    color: #b2dfdb;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 16px 0;
}

.single-article .content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.single-article .content blockquote {
    border-left: 4px solid #0288d1;
    padding: 15px 20px;
    margin: 16px 0;
    background: rgba(2, 136, 209, 0.05);
    border-radius: 0 12px 12px 0;
    color: #546e7a;
}

.single-article .content a {
    color: #0288d1;
    text-decoration: none;
    border-bottom: 1px solid rgba(2, 136, 209, 0.3);
    transition: border-color 0.3s;
}

.single-article .content a:hover {
    border-bottom-color: #0288d1;
}

.single-article .content ul,
.single-article .content ol {
    margin: 16px 0;
    padding-left: 24px;
}

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

.single-article .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
}

.single-article .content th {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 12px 16px;
    text-align: left;
}

.single-article .content td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.1);
}

.single-article .content tr:hover td {
    background: rgba(100, 181, 246, 0.05);
}

.single-article .article-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 181, 246, 0.15);
}

/* ---- 点赞按钮 ---- */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(2, 136, 209, 0.4);
    color: #0288d1;
    padding: 12px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.like-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.3);
}

.like-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}

.like-btn:disabled {
    background: rgba(2, 136, 209, 0.08);
    color: #90a4ae;
    border-color: rgba(2, 136, 209, 0.1);
    cursor: not-allowed;
}

.like-icon {
    font-size: 22px;
    line-height: 1;
}

/* ---- 评论区 ---- */
.comments-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    box-shadow:
        0 2px 15px rgba(100, 181, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.1);
}

.comments-section h3 {
    margin-bottom: 20px;
    color: #37474f;
    font-size: 20px;
}

.comments {
    margin-bottom: 30px;
}

.comment {
    padding: 20px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.1);
    transition: background 0.3s;
}

.comment:hover {
    background: rgba(100, 181, 246, 0.03);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #37474f;
}

.comment-date {
    color: #90a4ae;
    font-size: 13px;
}

.comment-content {
    color: #546e7a;
    line-height: 1.7;
}

.no-comments {
    color: #90a4ae;
    text-align: center;
    padding: 30px;
    font-size: 15px;
}

/* ---- 评论表单 ---- */
.comment-form {
    margin-top: 30px;
}

.comment-form h3 {
    margin-bottom: 16px;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form label {
    font-weight: 600;
    color: #37474f;
    font-size: 14px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px 16px;
    border: 2px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
    background: white;
}

.comment-form button {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.25);
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}

/* ---- 登录页 ---- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 48px 40px;
    border-radius: 20px;
    box-shadow:
        0 8px 30px rgba(100, 181, 246, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(100, 181, 246, 0.15);
    width: 420px;
    max-width: 90vw;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 32px;
    color: #263238;
    font-size: 26px;
    font-weight: 700;
}

.login-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form label {
    font-weight: 600;
    color: #37474f;
    font-size: 14px;
}

.login-form input {
    padding: 14px 16px;
    border: 2px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
    background: white;
}

.login-form button {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.25);
}

.login-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}

.login-form .error {
    background: rgba(229, 115, 115, 0.1);
    color: #c62828;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
    font-size: 14px;
    border: 1px solid rgba(229, 115, 115, 0.2);
}

.login-form .hint {
    text-align: center;
    color: #90a4ae;
    font-size: 13px;
    margin-top: 20px;
    padding: 12px;
    background: rgba(100, 181, 246, 0.05);
    border-radius: 10px;
}

/* ---- 后台管理面板 ---- */
.admin-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    box-shadow:
        0 2px 15px rgba(100, 181, 246, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.1);
}

.admin-panel h2 {
    margin-bottom: 24px;
    color: #263238;
    font-size: 22px;
}

.admin-panel .error {
    background: rgba(229, 115, 115, 0.1);
    color: #c62828;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid rgba(229, 115, 115, 0.2);
}

.add-btn {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.25);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}

/* ---- 文章表格 ---- */
.article-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.article-table th,
.article-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(100, 181, 246, 0.1);
}

.article-table th {
    background: rgba(2, 136, 209, 0.08);
    font-weight: 600;
    color: #37474f;
    font-size: 14px;
}

.article-table tbody tr {
    transition: background 0.3s;
}

.article-table tbody tr:hover {
    background: rgba(100, 181, 246, 0.04);
}

.article-table td a {
    color: #0288d1;
    text-decoration: none;
    margin-right: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.article-table td a:hover {
    color: #01579b;
}

.article-table td a:last-child {
    color: #e57373;
}

.article-table td a:last-child:hover {
    color: #c62828;
}

/* ---- 后台编辑表单 ---- */
.admin-panel form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-panel form label {
    font-weight: 600;
    color: #37474f;
    font-size: 14px;
}

.admin-panel form input[type="text"],
.admin-panel form input[type="password"],
.admin-panel form textarea {
    padding: 14px 16px;
    border: 2px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    font-family: inherit;
}

.admin-panel form input:focus,
.admin-panel form textarea:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
    background: white;
}

/* Editor.md 容器在后台面板内适配 */
.admin-panel #editor-container {
    border: 2px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    overflow: hidden;
}
.admin-panel .editormd {
    margin: 0;
    border: none;
}

.admin-panel .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.admin-panel .form-actions button {
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-panel .form-actions button[type="submit"] {
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.25);
}

.admin-panel .form-actions button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.35);
}

.admin-panel .form-actions button[type="button"] {
    background: rgba(120, 144, 156, 0.15);
    color: #546e7a;
}

.admin-panel .form-actions button[type="button"]:hover {
    background: rgba(120, 144, 156, 0.25);
}

/* 插入视频按钮 */
.btn-video {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    transition: all 0.3s;
}
.btn-video:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3); }

/* ---- 响应式 / 移动端 ---- */
@media (max-width: 768px) {
    header {
        padding: 40px 0;
    }

    header h1 {
        font-size: 28px;
    }

    header .description {
        font-size: 15px;
    }

    nav ul {
        gap: 20px;
    }

    main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    article, .article-card {
        padding: 20px;
    }

    article h2 {
        font-size: 20px;
    }

    .single-article {
        padding: 20px;
    }

    .single-article h1 {
        font-size: 24px;
    }

    .single-article .content {
        font-size: 15px;
    }

    .login-form {
        padding: 30px 24px;
    }

    .admin-panel {
        padding: 20px;
    }

    .article-table {
        display: block;
        overflow-x: auto;
    }

    .form-actions {
        flex-direction: column;
    }
}

/* ---- 搜索框（导航栏内嵌） ---- */
.search-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-inline input {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    width: 180px;
    transition: all 0.3s;
    outline: none;
}

.search-inline input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-inline input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    width: 220px;
}

.search-inline button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.search-inline button:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ---- 返回顶部按钮 ---- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0288d1 0%, #03a9f4 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(2, 136, 209, 0.3);
    transition: all 0.3s;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(2, 136, 209, 0.4);
}

/* ---- 阅读进度条 ---- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0288d1, #4dd0e1);
    z-index: 1000;
    width: 0;
    transition: width 0.1s linear;
}

/* ---- 文章目录 TOC ---- */
.toc {
    background: rgba(2, 136, 209, 0.04);
    border: 1px solid rgba(100, 181, 246, 0.15);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0 30px;
}

.toc h3 {
    font-size: 16px;
    color: #0288d1;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.15);
}

.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc ul li {
    margin-bottom: 6px;
}

.toc ul li a {
    color: #546e7a;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: block;
    padding: 3px 0;
}

.toc ul li a:hover {
    color: #0288d1;
}

.toc ul li.toc-h3 {
    padding-left: 16px;
}

/* ---- 文章标签 ---- */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(2, 136, 209, 0.08);
    color: #0288d1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(2, 136, 209, 0.15);
}

/* ---- 文章导航（上一篇/下一篇） ---- */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 181, 246, 0.15);
    gap: 20px;
}

.article-nav-prev,
.article-nav-next {
    flex: 1;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.1);
    transition: all 0.3s;
}

.article-nav-prev:hover,
.article-nav-next:hover {
    background: rgba(2, 136, 209, 0.05);
    border-color: rgba(2, 136, 209, 0.2);
    transform: translateY(-1px);
}

.article-nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #90a4ae;
    margin-bottom: 4px;
}

.nav-title {
    display: block;
    color: #37474f;
    font-weight: 500;
    font-size: 14px;
}

.article-nav-prev.disabled,
.article-nav-next.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ---- 相关推荐 ---- */
.related-articles {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(100, 181, 246, 0.1);
    box-shadow: 0 2px 15px rgba(100, 181, 246, 0.08);
}

.related-articles h3 {
    color: #37474f;
    margin-bottom: 16px;
    font-size: 18px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.related-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(2, 136, 209, 0.04);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.related-card:hover {
    background: rgba(2, 136, 209, 0.08);
    border-color: rgba(2, 136, 209, 0.15);
    transform: translateY(-1px);
}

.related-title {
    color: #37474f;
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-date {
    color: #90a4ae;
    font-size: 12px;
    margin-left: 12px;
    flex-shrink: 0;
}

/* ---- 阅读时间 ---- */
.reading-time {
    font-size: 13px;
    color: #90a4ae;
}

/* ---- select 下拉框通用样式 ---- */
.admin-panel form select {
    padding: 14px 16px;
    border: 2px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    font-family: inherit;
    cursor: pointer;
}

.admin-panel form select:focus {
    outline: none;
    border-color: #0288d1;
    box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
    background: white;
}

/* ---- 深色模式切换按钮 ---- */
.theme-toggle {
    position: fixed;
    bottom: 100px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ---- 社交分享 ---- */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.share-btn:hover { transform: translateY(-2px); }

.share-weibo { background: #e6162d; color: white; }
.share-twitter { background: #1da1f2; color: white; }
.share-copy { background: rgba(2,136,209,0.1); color: #0288d1; border: 1px solid rgba(2,136,209,0.2); }
.share-qq { background: #12b7f5; color: white; }
.share-wechat { background: #07c160; color: white; }
.share-douyin { background: #161823; color: #fff; }

/* 微信二维码弹窗 */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.qr-box {
    background: #fff;
    padding: 24px 28px;
    border-radius: 16px;
    text-align: center;
    position: relative;
    max-width: 90%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.qr-box h3 { margin: 0 0 8px; color: #263238; }
.qr-box img { width: 220px; height: 220px; margin: 10px 0; border-radius: 8px; }
.qr-box p { margin: 0; font-size: 13px; color: #607d8b; }
.qr-close {
    position: absolute; top: 8px; right: 14px;
    font-size: 26px; line-height: 1; cursor: pointer; color: #b0bec5;
}
.qr-close:hover { color: #546e7a; }
body.dark-mode .qr-box { background: #1a2438; }
body.dark-mode .qr-box h3,
body.dark-mode .qr-box p { color: #cfd8dc; }

/* 内容区视频 / 嵌入自适应 */
.content video,
.content iframe {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}
.content iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* ---- 深色模式样式 ---- */
body.dark-mode {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2332 50%, #0a1628 100%);
    color: #b0bec5;
}

body.dark-mode .bg-grid {
    background-image:
        linear-gradient(rgba(100, 181, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 181, 246, 0.04) 1px, transparent 1px);
}

body.dark-mode header {
    background: linear-gradient(135deg, #01579b 0%, #0277bd 50%, #00838f 100%);
}

body.dark-mode nav {
    background: rgba(1, 87, 155, 0.95);
}

body.dark-mode article,
body.dark-mode .article-card,
body.dark-mode .single-article,
body.dark-mode .widget,
body.dark-mode .comments-section,
body.dark-mode .login-form,
body.dark-mode .admin-panel,
body.dark-mode .related-articles,
body.dark-mode .about-section {
    background: rgba(20, 30, 48, 0.9);
    border-color: rgba(100, 181, 246, 0.08);
    color: #b0bec5;
}

body.dark-mode article h2 a,
body.dark-mode .widget h3,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
    color: #cfd8dc;
}

body.dark-mode article .excerpt,
body.dark-mode .widget p,
body.dark-mode .widget ul li a,
body.dark-mode .single-article .content,
body.dark-mode .about-section p {
    color: #90a4ae;
}

body.dark-mode .single-article .content h2 {
    border-bottom-color: rgba(100, 181, 246, 0.15);
}

body.dark-mode .article-nav-prev,
body.dark-mode .article-nav-next {
    background: rgba(20, 30, 48, 0.7);
    border-color: rgba(100, 181, 246, 0.08);
}

body.dark-mode .article-nav-prev:hover,
body.dark-mode .article-nav-next:hover {
    background: rgba(2, 136, 209, 0.1);
}

body.dark-mode .nav-title { color: #cfd8dc; }
body.dark-mode .related-card { background: rgba(2, 136, 209, 0.06); }
body.dark-mode .related-title { color: #cfd8dc; }
body.dark-mode .toc { background: rgba(2, 136, 209, 0.06); }
body.dark-mode .toc ul li a { color: #90a4ae; }
body.dark-mode .article-table th { background: rgba(2, 136, 209, 0.12); color: #b0bec5; }
body.dark-mode .article-table th, .article-table td { border-bottom-color: rgba(100, 181, 246, 0.06); }
body.dark-mode .admin-panel form input,
body.dark-mode .admin-panel form textarea,
body.dark-mode .admin-panel form select,
body.dark-mode .login-form input,
body.dark-mode .comment-form input,
body.dark-mode .comment-form textarea {
    background: rgba(15, 25, 40, 0.7);
    border-color: rgba(100, 181, 246, 0.15);
    color: #b0bec5;
}
body.dark-mode .admin-panel form input:focus,
body.dark-mode .admin-panel form textarea:focus,
body.dark-mode .login-form input:focus,
body.dark-mode .comment-form input:focus,
body.dark-mode .comment-form textarea:focus {
    background: rgba(15, 25, 40, 0.9);
    border-color: #0288d1;
}

body.dark-mode .search-inline input,
body.dark-mode .search-inline button { border-color: rgba(255,255,255,0.2); }

body.dark-mode .pagination a { background: rgba(20, 30, 48, 0.9); color: #4dd0e1; }
body.dark-mode .pagination a:hover,
body.dark-mode .pagination a.active { background: linear-gradient(135deg, #0288d1, #03a9f4); }

body.dark-mode .theme-toggle { background: rgba(20, 30, 48, 0.9); border-color: rgba(100,181,246,0.3); }

body.dark-mode .floating-shapes .shape {
    background: radial-gradient(circle, rgba(100, 181, 246, 0.1) 0%, transparent 70%);
}

/* ---- 评论回复 ---- */
.comment-reply-link {
    display: inline-block;
    font-size: 12px;
    color: #0288d1;
    text-decoration: none;
    margin-top: 6px;
    cursor: pointer;
    transition: color .3s;
}
.comment-reply-link:hover { color: #01579b; }
.reply-form input,
.reply-form textarea {
    font-family: inherit;
}
.reply-form input:focus,
.reply-form textarea:focus {
    outline: none;
    border-color: #0288d1 !important;
}

/* ---- 归档页面 ---- */
.archive-year { color: #263238; font-size: 22px; margin: 30px 0 15px; padding-bottom: 8px; border-bottom: 2px solid rgba(2,136,209,0.2); }
.archive-month { color: #546e7a; font-size: 16px; font-weight: 600; margin: 16px 0 10px; padding-left: 10px; border-left: 3px solid #03a9f4; }
.archive-list { list-style: none; padding: 0 0 10px 20px; margin: 0; }
.archive-list li { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.archive-list li a { color: #37474f; text-decoration: none; font-size: 15px; transition: color .3s; flex: 1; }
.archive-list li a:hover { color: #0288d1; }
.archive-list .archive-date { color: #90a4ae; font-size: 13px; margin-left: 16px; white-space: nowrap; }
.archive-count { color: #90a4ae; font-size: 13px; margin-left: 8px; }

body.dark-mode .archive-year { color: #cfd8dc; border-bottom-color: rgba(100,181,246,0.15); }
body.dark-mode .archive-month { color: #b0bec5; }
body.dark-mode .archive-list li a { color: #b0bec5; }
body.dark-mode .archive-list li a:hover { color: #4dd0e1; }
