/*
Theme Name: KoKo的学习笔记
Theme URI: https://v4ko.cn     
Author: KoKo
Author URI: https://v4ko.cn     
Description: 祢凝时光，视筑空间
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: ai-photo-theme
*/

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

:root {
    --bg-primary: #F0F0F0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-black: #000000;
    --accent-white: #FFFFFF;
    --card-width: 355px;
    --card-gap: 30px;
}

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    z-index: 1000;
    padding: 0 5%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.3px;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo span {
    white-space: nowrap;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-item a {
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
}

.nav-item a:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--accent-black);
}

.nav-item.active a,
.nav-item.current a {
    background-color: var(--accent-black);
    color: var(--accent-white);
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 5% 80px;
    background-image: url('/wp-content/themes/ai-photo-theme/public/sfy.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--accent-white);
    margin-bottom: 30px;
    letter-spacing: -2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.95);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    font-weight: 400;
    text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}

/* 内容区块 */
.content-section {
    padding: 100px 0;
    background-color: var(--bg-primary);
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 5%;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-black);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 横向滚动容器 */
.cards-scroll-container {
    position: relative;
    width: 100%;
    padding: 0 5%;
}

.cards-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0 40px;
}

.cards-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.cards-scroll-track {
    display: flex;
    gap: var(--card-gap);
    width: max-content;
    padding: 0;
    margin: 0;
}

/* 卡片样式 */
.card {
    position: relative;
    width: var(--card-width);
    height: 500px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0,0,0,0.25);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.card:hover .card-bg {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.card-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
    width: fit-content;
}

.card-title {
    color: var(--accent-white);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-desc {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 卡片图片背景 */
.card-1 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/card1-bg.jpg');
}

.card-2 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/card2-bg.jpg');
}

.card-3 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/card3-bg.jpg');
}

.card-4 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/portfolio1.jpg');
}

.card-5 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/portfolio2.jpg');
}

.card-6 .card-bg {
    background-image: url('/wp-content/themes/ai-photo-theme/public/portfolio3.jpg');
}

/* 滚动提示 */
.scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scroll-hint svg {
    width: 24px;
    height: 24px;
    animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* 滚动按钮 */
.scroll-buttons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    left: 0;
    pointer-events: none;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.scroll-btn:hover {
    background: white;
    transform: scale(1.1);
}

.scroll-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

/* 页脚 */
.footer {
    background-color: var(--accent-black);
    color: var(--accent-white);
    padding: 60px 5%;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-text {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* ==================== 移动端响应式 ==================== */
@media (max-width: 768px) {
    :root {
        --card-width: 300px;
        --card-gap: 16px;
    }
    
    .navbar {
        padding: 0 4%;
        height: 70px;
    }
    
    .logo {
        font-size: 1rem;
        gap: 8px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .nav-menu {
        gap: 4px;
    }
    
    .nav-item a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .hero {
        padding: 100px 4% 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .card {
        height: 400px;
        width: var(--card-width);
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .card-overlay {
        padding: 30px;
    }
    
    .scroll-buttons {
        display: none;
    }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .about-content {
        max-width: 100%;
    }
    
    .about-title {
        font-size: 1.75rem;
    }
    
    .about-text {
        font-size: 1rem;
    }
    
    .qr-image {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    :root {
        --card-width: 280px;
    }
    
    .card {
        height: 380px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 关于区域 */
.about-section {
    padding: 100px 5%;
    background-color: var(--bg-primary);
    border-top: 1px solid rgba(0,0,0,0.05);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: center;
}

.about-content {
    max-width: 600px;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-black);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-qr {
    display: flex;
    justify-content: center;
}

.qr-wrapper {
    text-align: center;
}

.qr-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    object-fit: cover;
}

.qr-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 选中文字样式 */
::selection {
    background-color: var(--accent-black);
    color: var(--accent-white);
}