/*
Theme Name: Whale AI
Theme URI: https://whaleai.com
Author: 刘闯
Author URI: https://whaleai.com
Description: Whale AI - 现代科技感AI博客主题，采用深蓝色调、渐变文字、动态光效和毛玻璃效果。专为人工智能技术博客设计，支持响应式布局。
Version: 7.4.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: whale-ai
Tags: blog, technology, ai, modern, responsive, dark, blue

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 默认颜色值，会被functions.php中的动态CSS覆盖 */
    --primary-bg: #0a192f;
    --accent-color: #00d4ff;
    --secondary-accent: #0066ff;
    --text-color: #e6f1ff;
    --text-secondary: #8892b0;
    --heading-color: #ccd6f6;
    --navbar-bg: rgba(10, 25, 47, 0.95);
    --button-bg: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    --card-bg: rgba(17, 34, 64, 0.7);
    
    /* 兼容旧变量名 */
    --primary-dark: var(--primary-bg);
    --tech-blue-light: var(--accent-color);
    --tech-blue: var(--secondary-accent);
    --text-primary: var(--text-color);
    --glass-bg: var(--card-bg);
    --glass-border: rgba(0, 212, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==================== 动态背景光效 ==================== */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== 渐变文字效果 ==================== */
.gradient-text {
    background: linear-gradient(135deg, var(--tech-blue-light) 0%, var(--tech-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 毛玻璃效果 ==================== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo {
    font-size: 2rem;
}

.brand-text {
    background: linear-gradient(135deg, var(--tech-blue-light) 0%, var(--tech-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--tech-blue-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tech-blue-light), var(--tech-blue));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ==================== 页眉搜索框 ==================== */
.header-search-area {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-field {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(10, 25, 47, 0.5);
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: var(--tech-blue-light);
    background: rgba(10, 25, 47, 0.8);
    width: 250px;
}

.search-field::placeholder {
    color: var(--text-secondary);
}

.search-submit {
    background: none;
    border: none;
    color: var(--tech-blue-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: scale(1.1);
}

/* ==================== 小工具通用样式 ==================== */
.header-widget {
    display: flex;
    align-items: center;
}

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

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: var(--tech-blue-light);
}

/* ==================== Hero 区域 ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    background-color: var(--primary-bg);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.7); /* 增加遮罩层以确保文字可读性 */
    z-index: 0;
}

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

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--tech-blue-light) 0%, var(--tech-blue) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--tech-blue-light);
    border: 2px solid var(--tech-blue-light);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

/* ==================== 区块标题 ==================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

/* ==================== 特色功能区域 ==================== */
.features {
    padding: 5rem 0;
}

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

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 文章区域 ==================== */
.articles {
    padding: 5rem 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.article-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.article-content {
    padding: 1.5rem;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--tech-blue-light);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.load-more {
    text-align: center;
}

/* ==================== 关于区域 ==================== */
.about {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-image {
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image {
    font-size: 8rem;
    opacity: 0.8;
}

/* ==================== 订阅区域 ==================== */
.newsletter {
    padding: 5rem 0;
}

.newsletter-content {
    padding: 3rem;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.newsletter-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(10, 25, 47, 0.5);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 200px;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--tech-blue-light);
}

.newsletter-form input::placeholder {
    color: var(--text-secondary);
}

/* ==================== 页脚 ==================== */
.footer {
    background: rgba(10, 25, 47, 0.95);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: center; /* 垂直居中对齐 */
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--tech-blue-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

/* ==================== WordPress 特定样式 ==================== */
.wp-caption {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 10px;
    margin: 1rem 0;
}

.wp-caption-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 1rem auto;
}

.sticky {
    border: 2px solid var(--tech-blue-light);
    padding: 1rem;
    border-radius: 8px;
}

.bypostauthor {
    background: rgba(0, 212, 255, 0.05);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 25, 47, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 3rem;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ==================== 文章详情页特色图片 ==================== */
.post-thumbnail {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

/* 默认缩略图（无特色图片时显示） */
.default-thumbnail {
    height: 400px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.default-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 102, 255, 0.2) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.default-thumbnail-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.default-thumbnail-content .entry-title {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.3;
}

.single-post .entry-header {
    margin-bottom: 2rem;
}

.single-post .entry-header.with-thumbnail {
    margin-top: -1rem;
    margin-bottom: 2rem;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.single-post .entry-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.single-post .entry-meta a {
    color: var(--tech-blue-light);
    text-decoration: none;
}

.single-post .entry-meta a:hover {
    text-decoration: underline;
}

.single-post .entry-content {
    padding: 2rem;
    margin-bottom: 2rem;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.single-post .entry-content a {
    color: var(--tech-blue-light);
    text-decoration: none;
}

.single-post .entry-content a:hover {
    text-decoration: underline;
}

.post-tags {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.tags-label {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.post-tags a {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--tech-blue-light);
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.post-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-navigation a:hover {
    color: var(--tech-blue-light);
}

.nav-previous {
    text-align: left;
}

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

.related-posts {
    margin: 3rem 0;
}

.related-posts .section-title {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .single-post .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-previous,
    .nav-next {
        text-align: center;
    }
}
