/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #0f52ba 0%, #1e88e5 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
}

header .logo-img {
    max-height: 50px;
    width: auto;
    vertical-align: middle;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    z-index: 1000;
}

nav a:hover {
    background-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

nav a.active {
    background-color: white;
    color: #0f52ba;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* 二级导航 */
nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    min-width: 200px;
    display: none;
    z-index: 999;
}

nav ul li:hover > ul {
    display: block;
}

nav ul ul li {
    width: 100%;
}

nav ul ul a {
    color: #333;
    padding: 10px 20px;
    border-radius: 0;
    font-size: 1rem;
}

nav ul ul a:hover {
    background-color: #f5f5f5;
    color: #0f52ba;
    transform: none;
    box-shadow: none;
}

nav ul ul a.active {
    background-color: #e3f2fd;
    color: #0f52ba;
    box-shadow: none;
    transform: none;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(135deg, #0f52ba 0%, #42a5f5 100%);
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjZmZmZmZmMTAiPjwvcmVjdD4KPHBhdGggZD0iTTAgNUw1IDBaTTYgNEw0IDZaTS0xIDFMMSAtMVoiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxIj48L3BhdGg+Cjwvc3ZnPg==');
    opacity: 0.1;
    animation: moveBackground 20s linear infinite;
}

/* 粒子效果 */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 50px 50px, 70px 70px, 90px 90px;
    animation: floatParticles 15s ease-in-out infinite;
}

/* 大气泡效果 */
.hero .bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 30px rgba(255,255,255,0.3);
    animation: floatBubble 15s infinite ease-in-out;
    z-index: 0;
}

.hero .bubble:nth-child(1) {
    width: 180px;
    height: 180px;
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.hero .bubble:nth-child(2) {
    width: 220px;
    height: 220px;
    top: 15%;
    right: 10%;
    animation-delay: 3s;
}

.hero .bubble:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 15%;
    animation-delay: 6s;
}

.hero .bubble:nth-child(4) {
    width: 200px;
    height: 200px;
    bottom: 5%;
    right: 5%;
    animation-delay: 9s;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    letter-spacing: -1px;
    animation: fadeInDown 1s ease-out, textGlow 2s ease-in-out infinite alternate;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-bio {
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-bio p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero .btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.hero .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hero .btn:hover::before {
    left: 100%;
}

.hero .btn.primary {
    background-color: white;
    color: #0f52ba;
    animation: buttonPulse 2s ease-in-out infinite;
}

.hero .btn.secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.hero .btn.primary:hover {
    background-color: #f8f9fa;
}

.hero .btn.secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

.hero-image {
    flex: 0 0 300px;
    animation: fadeInRight 1s ease-out 0.5s both, float 6s ease-in-out infinite;
}

.image-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 5px solid white;
    animation: rotate 20s linear infinite;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-container:hover img {
    transform: scale(1.1);
}

.image-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite, rotate 15s linear infinite reverse;
}



@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

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

@keyframes textGlow {
    0% {
        text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    100% {
        text-shadow: 0 0 20px rgba(255,255,255,0.5), 0 4px 8px rgba(0,0,0,0.2);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    50% {
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes floatBubble {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-50px) translateX(30px) scale(1.1);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-100px) translateX(0) scale(1.2);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-50px) translateX(-30px) scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.1;
    }
}



/* 文章列表 */
.posts {
    padding: 60px 0;
}

.posts h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    color: #1a73e8;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    position: relative;
    transform-style: preserve-3d;
    padding: 0;
    margin: 0;
    border: none;
}

.post-content {
    background-color: white;
    padding: 25px;
}

.post-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    vertical-align: top;
    position: relative;
    z-index: 0;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-content {
    padding: 25px;
}

.post-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-content h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.post-content h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0f52ba, #42a5f5);
    transition: width 0.3s ease;
}

.post-content h3 a:hover {
    color: #0f52ba;
}

.post-content h3 a:hover::after {
    width: 100%;
}

.post-meta {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-content p {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.7;
}

.post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #0f52ba, #42a5f5);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.3);
}

.read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 82, 186, 0.4);
    background: linear-gradient(90deg, #0d47a1, #1976d2);
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* 分类页面 */
.categories {
    padding: 60px 0;
}

.categories h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    color: #1a73e8;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a73e8;
}

.category-card p {
    color: #666;
    margin-bottom: 15px;
}

.category-card .post-count {
    font-size: 0.9rem;
    color: #999;
}

/* 文章详情页 */
.article {
    padding: 60px 0;
}

.article-content {
    background-color: white;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.article-content .content {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.article-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #1a73e8;
    text-align: center;
}

.article-meta {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
    text-align: center;
}

/* 单页 */
.page {
    padding: 60px 0;
}

.page-content {
    background-color: white;
    padding: 60px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.page-content .content {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.page-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #1a73e8;
    text-align: center;
}

.fancy-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.8rem;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(135deg, #0f52ba, #42a5f5, #1dd1a1);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow: none;
    animation: titleGlow 3s ease-in-out infinite;
    width: 100%;
    text-align: center;
}

.title-icon {
    font-size: 1.8rem;
    color: #feca57;
    animation: starPulse 1.5s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(254, 202, 87, 0.8);
}

.title-icon:last-child {
    animation-delay: 0.75s;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(15deg);
        opacity: 0.8;
    }
}

.section-divider {
    position: relative;
    height: 3px;
    background: linear-gradient(90deg,
        #ff6b6b,
        #feca57,
        #48dbfb,
        #1dd1a1,
        #5f27cd,
        #ff6b6b);
    background-size: 200% 100%;
    margin: 15px 0 40px 0;
    width: 100%;
    border-radius: 3px;
    animation: rainbowFlow 3s linear infinite;
    box-shadow:
        0 0 10px rgba(255, 107, 107, 0.5),
        0 0 20px rgba(254, 202, 87, 0.5),
        0 0 30px rgba(72, 219, 251, 0.5),
        0 0 40px rgba(29, 209, 161, 0.5);
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 分页 */
.pagination {
    margin-top: 60px;
    text-align: center;
}

.pagination span,
.pagination a {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

/* 当前页：emlog的pagination()函数输出的当前页是<span>标签（无class），其他页是<a> */
.pagination span {
    background: linear-gradient(90deg, #0f52ba, #42a5f5);
    color: white;
    border: 1px solid #0f52ba;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.3);
    cursor: default;
}

.pagination a {
    color: #333;
    background-color: white;
    border: 1px solid #e0e0e0;
}

.pagination a:hover {
    background-color: #f0f4f8;
    border-color: #42a5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.15);
}

/* 兼容带current/active class的情况 */
.pagination span.current,
.pagination a.current {
    background: linear-gradient(90deg, #0f52ba, #42a5f5) !important;
    color: white !important;
    border-color: #0f52ba !important;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.3) !important;
}

/* 文章标签样式 */
.article-tags {
    margin: 8px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tags-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background-color: #42a5f5;
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #0f52ba;
    transform: translateY(-2px);
}

/* 上下篇导航样式 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #1a73e8;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    color: #0d47a1;
    transform: translateY(-2px);
}

.nav-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #64748b;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 300px;
}

.prev-post {
    text-align: left;
}

.next-post {
    text-align: right;
}

/* 相关文章推荐样式 */
.related-posts {
    margin: 8px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.related-posts h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.related-card h5 {
    padding: 15px;
    font-size: 1rem;
    margin: 0;
}

.related-card h5 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card h5 a:hover {
    color: #0f52ba;
}

/* 评论区样式 */
.comments {
    margin: 8px 0;
}

.comment-form {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.comment-form h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #333;
}

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

.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 200px;
}

.form-row .form-group label {
    white-space: nowrap;
    margin-bottom: 0;
    margin-right: 10px;
    flex-shrink: 0;
}

.form-row .form-group input {
    flex: 1;
}

.form-group {
    margin-bottom: 0;
}

.form-group textarea {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #42a5f5;
    box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.captcha-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-inline .captcha {
    height: 42px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.captcha-inline .captcha:hover {
    opacity: 0.8;
}

.captcha-inline .captcha_input {
    width: 120px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.captcha-inline .captcha_input:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.login-hint {
    color: #999;
    font-size: 0.9rem;
}

.login-hint a {
    color: #42a5f5;
    text-decoration: none;
}

.login-hint a:hover {
    text-decoration: underline;
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.captcha-row input[type="text"] {
    width: 140px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.captcha-row input[type="text"]:focus {
    border-color: #42a5f5;
    box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.2);
}

.captcha-row img {
    height: 42px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.captcha-row img:hover {
    opacity: 0.8;
}

.btn-primary {
    background: linear-gradient(90deg, #0f52ba, #42a5f5);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 82, 186, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 82, 186, 0.4);
}

.comment-list {
    margin-top: 30px;
}

.comment-list h5 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #333;
}

.comment-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.comment-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

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

.comment-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.comment-header span {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.comment-content p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

.comment-actions {
    margin-top: 10px;
}

.reply-btn {
    color: #42a5f5;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.reply-btn:hover {
    color: #0f52ba;
}

.comment-replies {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
}

.comment-item.reply {
    background-color: #f0f4f8;
    padding: 10px;
    margin-bottom: 10px;
}

/* 友情链接区域 */
.links-section {
    background-color: #333;
    padding: 15px 0;
    border-top: 1px solid #444;
    border-bottom: 1px solid #444;
}

.links-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.links-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.links-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.link-item {
    display: inline-block;
    padding: 6px 12px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    background-color: #1e88e5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background-color: #1976d2;
}

/* 软件页面样式 */
.software-page {
    padding: 60px 0;
}

.software-page .page-header {
    text-align: center;
    margin-bottom: 50px;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.software-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.software-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.software-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.software-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.software-info p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.software-actions {
    margin-top: 20px;
    width: 100%;
}

.download-btn {
    width: 100%;
    display: block;
}

.software-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.software-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 上下篇导航 */
.post-navigation {
    margin: 8px 0;
    display: flex;
    gap: 20px;
}

.post-navigation .prev-post,
.post-navigation .next-post {
    flex: 1;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.post-navigation .prev-post:hover,
.post-navigation .next-post:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.post-navigation .prev-post.disabled,
.post-navigation .next-post.disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.post-navigation a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-navigation .nav-label {
    display: block;
    font-size: 0.9rem;
    color: #0f52ba;
    margin-bottom: 8px;
    font-weight: 500;
}

.post-navigation .nav-title {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    line-height: 1.5;
}

/* 相关文章推荐 */
.related-posts h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f52ba;
}

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

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
}

.related-card h5 {
    margin: 0;
    padding: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.related-card h5 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card h5 a:hover {
    color: #0f52ba;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #ddd;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-content p,
.footer-content div,
.footer-content span {
    margin-bottom: 0.2rem;
}

.footer-content p:last-child,
.footer-content div:last-child,
.footer-content span:last-child {
    margin-bottom: 0;
}

.footer-content a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: white;
    text-decoration: underline;
}

.footer-icp {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-icp span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        text-align: center;
    }
    
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        flex: 0 0 250px;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .article-content,
    .page-content {
        padding: 20px;
    }
    
    .article-content h2,
    .page-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    nav a {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .posts h2,
    .categories h2 {
        font-size: 1.8rem;
    }
}

/* 文章内容样式补充 */
.article-body,
.page-body {
    margin-top: 30px;
    line-height: 1.8;
    color: #333;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6,
.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6 {
    margin: 30px 0 15px;
    color: #1a73e8;
}

.article-body h1,
.page-body h1 {
    font-size: 2.2rem;
}

.article-body h2,
.page-body h2 {
    font-size: 1.8rem;
}

.article-body h3,
.page-body h3 {
    font-size: 1.5rem;
}

.article-body p,
.page-body p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-body ul,
.article-body ol,
.page-body ul,
.page-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li,
.page-body li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.article-body a,
.page-body a {
    color: #42a5f5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-body a:hover,
.page-body a:hover {
    color: #0f52ba;
    text-decoration: underline;
}

.article-body img,
.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

.article-body pre,
.page-body pre {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-body code,
.page-body code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-body pre code,
.page-body pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

.article-body blockquote,
.page-body blockquote {
    border-left: 4px solid #42a5f5;
    padding: 15px 20px;
    margin: 20px 0;
    background-color: #f8f9fa;
    border-radius: 0 8px 8px 0;
    color: #555;
}

.article-body table,
.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
}

.article-body table th,
.article-body table td,
.page-body table th,
.page-body table td {
    border: 1px solid #e2e8f0;
    padding: 12px;
    text-align: left;
}

.article-body table th,
.page-body table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 评论区域样式补充 */
.commentform {
    margin: 20px 0;
}

.log_comment {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
}

.comment-submit {
    display: flex;
    gap: 10px;
}

.comment-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 软件页面样式补充 */
.software-card .software-info {
    text-align: center;
    padding: 0 15px;
}

/* 登录弹窗样式 */
.auth-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    z-index: 1090;
    backdrop-filter: blur(2px);
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
    padding: 24px;
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
    background: transparent;
    color: #333;
    padding: 0;
    line-height: 1;
    font-size: 1.5rem;
    cursor: pointer;
}

.auth-modal-close:hover {
    background: #f0f4f8;
}

.auth-modal-head h3 {
    margin-bottom: 4px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.auth-modal-alert {
    display: none;
    margin-bottom: 14px;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
}

.auth-form-row {
    margin-bottom: 12px;
}

.auth-form-row input {
    height: 46px;
    width: 100%;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    font-size: 1rem;
}

.auth-captcha-row,
.auth-inline-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auth-captcha-row input,
.auth-inline-row input {
    flex: 1;
}

.auth-captcha-row img {
    width: 110px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}

.auth-inline-btn {
    margin: 0;
    height: 42px;
    line-height: 1;
    white-space: nowrap;
    padding: 0 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #42a5f5;
    color: #fff;
    font-size: 0.9rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    margin: 2px 0 10px;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    margin: 4px 0 0;
    height: 46px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #0f52ba, #42a5f5);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-submit:hover {
    opacity: 0.9;
}

.auth-modal-switch {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-modal-switch a {
    color: #42a5f5;
    text-decoration: none;
    font-size: 14px;
}

.auth-modal-switch a:hover {
    text-decoration: underline;
}

.auth-login-ext {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* 用户导航菜单 */
.nav-user-menu {
    position: relative;
}

.nav-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.nav-user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 120px;
    list-style: none;
    z-index: 100;
}

.nav-user-dropdown li a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.nav-user-dropdown li a:hover {
    background: #f0f4f8;
    color: #0f52ba;
}

.nav-user-menu:hover .nav-user-dropdown {
    display: block;
}
