/*
Theme Name: Hailuo
Theme URI: http://hailuo.com/
Author: ZZ Developer
Author URI: http://hailuo.com/
Description: 海螺 - 探索自然界的神圣几何。深色科技风单页主题，包含动态Canvas粒子背景和交互动画。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hailuo
*/

:root {
    --bg-color: #050a14;
    --text-main: #e6f1f3;
    --text-muted: #8892b0;
    --accent: #64ffda;
    --gold: #d4af37;
    --glass: rgba(10, 25, 47, 0.7);
    --font-heading: 'PingFang SC', 'Playfair Display', serif;
    --font-body: 'Helvetica Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* 自定义光标 */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    mix-blend-mode: difference;
}

#cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    height: 4px;
    background-color: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
}

/* 背景 Canvas */
#spiral-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* 顶部导航 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: exclusion;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
}

.logo a {
    color: inherit;
}

/* 主导航 - WordPress Menu */
.main-nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.main-nav ul li a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    color: var(--accent);
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

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

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-main);
}

/* 主要内容容器 */
main {
    position: relative;
    z-index: 10;
}

/* 通用 Section 样式 */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 10%;
}

.content-wrap {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.text-col {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-col.visible {
    opacity: 1;
    transform: translateY(0);
}

h1,
h2 {
    font-family: var(--font-heading);
    background: linear-gradient(45deg, var(--text-main), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.subtitle {
    color: var(--gold);
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
    letter-spacing: 2px;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 30px;
    text-align: justify;
}

/* 视觉演示区域 */
.visual-col {
    height: 400px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 交互组件：斐波那契演示 */
.fibonacci-box {
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: rotateFull 20s linear infinite;
}

.rect {
    position: absolute;
    border: 1px solid var(--accent);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.1);
    transition: all 0.5s ease;
}

/* 交互组件：声学波纹 */
.sound-wave {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.bar {
    width: 4px;
    background: var(--gold);
    height: 20px;
    border-radius: 2px;
    animation: sound 1s ease-in-out infinite;
}

/* Hero Section 特殊样式 */
#hero {
    text-align: center;
    display: flex;
    flex-direction: column;
}

#hero h1 {
    font-size: 6vw;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 2s ease forwards 0.5s;
}

#hero p {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s ease forwards 1s;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-main), transparent);
    animation: scrollDown 2s infinite;
}

/* 底部 */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020408;
    position: relative;
    z-index: 20;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* 动画关键帧 */
@keyframes rotateFull {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes sound {

    0%,
    100% {
        height: 20px;
        opacity: 0.3;
    }

    50% {
        height: 80px;
        opacity: 1;
    }
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ========================================
   Articles Section - 首页文章区块
======================================== */
#articles .content-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 50px;
}

.article-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: none;
    opacity: 0;
    transform: translateY(20px);
}

.article-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.article-card:hover {
    background: rgba(100, 255, 218, 0.05);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.card-meta {
    font-family: monospace;
    color: var(--gold);
    font-size: 0.75rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-main);
    transition: color 0.3s;
    background: none;
    -webkit-text-fill-color: var(--text-main);
}

.article-card:hover h3 {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.article-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.read-more {
    font-size: 0.8rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

.article-card:hover .read-more::after {
    width: 100%;
}

/* ========================================
   Blog Archive - 文章列表页
======================================== */
.archive-header {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
}

.archive-header h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.archive-header p {
    max-width: 600px;
    text-align: center;
}

.archive-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 80px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-family: monospace;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(100, 255, 218, 0.05);
}

/* ========================================
   Single Post - 文章详情页
======================================== */
.single-header {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 150px 40px 80px;
}

.single-meta {
    font-family: monospace;
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.single-header h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin-bottom: 30px;
}

.single-header .category-link {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.single-header .category-link:hover {
    background: var(--accent);
    color: var(--bg-color);
}

.single-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px 100px;
}

.single-content p {
    font-size: 1.15rem;
    line-height: 2;
    margin-bottom: 30px;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    margin: 50px 0 25px;
    font-size: 2rem;
}

.single-content h3 {
    font-size: 1.6rem;
}

.single-content h4 {
    font-size: 1.3rem;
}

.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 40px 0;
}

.single-content blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    color: var(--text-main);
}

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

.single-content li {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.single-content a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.single-content a:hover {
    border-color: var(--accent);
}

.single-content code {
    background: rgba(100, 255, 218, 0.1);
    padding: 3px 8px;
    border-radius: 3px;
    font-family: monospace;
    color: var(--accent);
}

.single-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 30px 0;
}

.single-content pre code {
    background: none;
    padding: 0;
}

/* 文章导航 - 上一篇/下一篇 */
.post-navigation {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.nav-previous,
.nav-next {
    flex: 1;
}

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

.post-navigation .nav-label {
    font-family: monospace;
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.post-navigation a {
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.post-navigation a:hover {
    color: var(--accent);
}

/* ========================================
   响应式调整
======================================== */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .main-nav ul li a {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 101;
    }

    .content-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }

    h2 {
        font-size: 2.5rem;
    }

    .text-col p {
        text-align: left;
    }

    .visual-col {
        display: none;
    }

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

    .archive-header h1 {
        font-size: 2.5rem;
    }

    .single-header h1 {
        font-size: 2rem;
    }

    .post-navigation {
        flex-direction: column;
    }

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