/**
 * 自定义样式
 * 为网站添加独特风格和动画效果
 */

/* 自定义动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 应用动画的类 */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* 通用响应式布局容器 */
.responsive-container {
    padding-left: 40px;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .responsive-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 图片悬停效果 */
.img-hover-zoom {
    overflow: hidden;
    border-radius: 4px;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 添加一些响应式工具类 */
@media (max-width: 640px) {
    .mobile-py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .mobile-px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* 全局移动端间距调整 */
    .px-10 {
        padding-left: 1.25rem !important; /* 20px */
        padding-right: 1.25rem !important; /* 20px */
    }
}

/* 项目卡片样式 */
.project-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.project-card .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 3/2;
}

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

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

.project-card .content {
    position: absolute;
    inset: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
    transition: background 0.3s ease;
}

.project-card:hover .content {
    background: rgba(0, 0, 0, 0.3);
}

.project-card .project-title {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
}

.project-card .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: flex-start;
    max-width: 100%;
}

.project-card .tags-container .tag:nth-child(n+4) {
    display: none;
}

/* 自定义文本选择效果 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #000;
}

:root {
    /* 主色调 */
    --bg-primary: #000000;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, rgba(13,14,14,1) 0%, rgba(25,26,26,1) 100%);
    --gradient-accent: linear-gradient(135deg, rgba(82,82,229,0.1) 0%, rgba(82,82,229,0) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(82,82,229,0.2) 0%, rgba(82,82,229,0) 50%);
    
    /* 文字颜色 */
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    
    /* 边框和阴影 */
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(82, 82, 229, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* 全局样式 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* 添加微噪点背景纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
    z-index: -1;
}

/* 卡片样式 */
.card {
    background: var(--gradient-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px var(--shadow-color);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px var(--glow-color);
    transform: translateY(-2px);
}

/* 主要按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #FFFFFF;
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* 次要按钮样式 */
.btn-secondary {
    background: transparent;
    border: 1px solid #FFFFFF;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 按钮内的图标样式 */
.btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

/* 导航栏样式 */
nav {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

/* 文本渐变效果 */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 流光动画 */
@keyframes flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.flow-effect {
    background: linear-gradient(270deg, var(--glow-color), transparent);
    background-size: 200% 100%;
    animation: flow 8s ease infinite;
}

h2 {
    line-height: 1.5;
}

.main-heading {
    font-size: 3.5rem;
    line-height: 1.25;
    font-weight: bold;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.heading-lg {
    font-size: 3rem;
    line-height: 1.25;
    font-weight: bold;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .main-heading {
        font-size: 2.25rem;
    }
    
    .heading-lg {
        font-size: 2rem;
    }
}

.max-w-1400 {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

@media (max-width: 768px) {
    .content-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .main-heading,
    .gradient-text,
    h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    .project-desc {
        font-size: 15px !important;
    }
    section.py-24 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    .max-w-1400 {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 14px;
    width: fit-content;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: flex-start;
    max-width: 100%;
}

/* 首页特定样式 */
.threads-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.threads-container canvas {
    width: 100%;
    height: 100%;
}

/* 首页动画类 */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* 动画延迟类 */
.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; }
.delay-600 { transition-delay: 0.6s; }

/* 视频容器 */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 40.625%; /* 780/1920 = 0.40625，即40.625% */
}

.video-container video,
.video-container .video-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-container video {
    object-fit: cover;
}

.video-container .video-overlay {
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* 下一个项目按钮样式 */
.next-project {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6rem 2.5rem;
}

.next-project-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    text-decoration: none;
}

.next-project-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.next-project-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.next-project-wrapper:hover .next-project-label {
    color: var(--text-primary);
}

.next-project-wrapper:hover .next-project-title {
    transform: translateX(10px);
}

@media (max-width: 768px) {
    .next-project-title {
        font-size: 2rem;
    }
} 