/* 自定义CSS样式 - 拾光集个人主页 */

/* CSS变量系统 */
:root {
    /* 深色主题颜色变量 - 日落橙茶配色 */
    --primary-color: #ff6b35;
    --secondary-color: #ff8c42;
    --accent-color: #deb887;
    --success-color: #10b981;
    --warning-color: #d2691e;
    --error-color: #dc2626;
    
    --bg-primary: linear-gradient(-45deg, #3c2414, #5d4037, #8b4513, #2c1810);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --bg-card: rgba(255, 255, 255, 0.1);
    --bg-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: #f5deb3;
    --text-muted: #deb887;
    --text-accent: #ff8c42;
    
    --border-color: rgba(255, 171, 112, 0.2);
    --shadow-color: rgba(60, 36, 20, 0.4);
    
    --navbar-bg: rgba(255, 171, 112, 0.1);
    --particle-color: rgba(255, 107, 53, 0.6);
    --cursor-glow: radial-gradient(circle, rgba(255, 140, 66, 0.3), transparent);
}

/* 浅色主题变量 - 奶茶橙配色 */
.light-theme {
    --bg-primary: linear-gradient(135deg, #fef9f3 0%, #fff7ed 25%, #fed7aa 50%, #fdba74 75%, #fb923c 100%);
    --bg-secondary: rgba(255, 255, 255, 0.9);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-hover: rgba(255, 247, 237, 0.95);
    
    --text-primary: #3c2414;
    --text-secondary: #5d4037;
    --text-muted: #8b4513;
    --text-accent: #d2691e;
    
    --border-color: rgba(210, 105, 30, 0.2);
    --shadow-color: rgba(60, 36, 20, 0.1);
    
    --navbar-bg: rgba(254, 249, 243, 0.95);
    --particle-color: rgba(255, 140, 66, 0.4);
    --cursor-glow: radial-gradient(circle, rgba(210, 105, 30, 0.2), transparent);
}

/* 全局样式 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* 自定义动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
    100% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 打字机光标动画 */
.cursor {
    animation: blink 1s infinite;
    color: #ff8c42;
}

/* 背景渐变 */
.bg-gradient-radial {
    background: radial-gradient(circle, var(--tw-gradient-stops));
}

/* 光标跟随优化 */
#cursor-glow {
    background: var(--cursor-glow);
    will-change: transform;
}

/* 玻璃拟态增强效果 */
.glass-morphism,
.glass-card,
.website-card,
.about-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    color: var(--text-primary);
}

/* 网站卡片悬停增强效果 */
.website-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.website-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.website-card:hover::before {
    left: 100%;
}

.website-card:hover,
.about-card:hover {
    background: var(--bg-hover);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 140, 66, 0.4);
}

/* 关于卡片动画 */
.about-card {
    transition: all 0.3s ease;
}

/* 导航栏增强 */
.navbar {
    background: var(--navbar-bg);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
}

.navbar a {
    color: var(--text-secondary);
}

.navbar a:hover {
    color: var(--text-accent);
}

/* 按钮增强效果 */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* 进度条动画 */
.progress-bar {
    animation: fillProgress 2s ease-out forwards;
}

@keyframes fillProgress {
    from { width: 0%; }
}

/* Bento Grid 增强 */
.bento-grid {
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .bento-grid {
        gap: 2rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #8b5cf6, #ec4899);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #7c3aed, #db2777);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .typing-text {
        font-size: 1.25rem;
    }
}

/* 加载动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 统一背景系统 */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.hero-bg,
#home,
main,
section {
    background: var(--bg-primary);
}

/* 深色主题动画背景 */
body:not(.light-theme) .hero-bg {
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* 粒子效果背景 */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--particle-color);
    border-radius: 50%;
    animation: particleFloat 6s linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) rotate(360deg);
    }
}

/* 文字渐变动画 */
.text-gradient-animate {
    background: linear-gradient(-45deg, #ff6b35, #ff8c42, #deb887, #d2691e);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

/* 卡片阴影层次 */
.card-shadow-1 { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.card-shadow-2 { box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); }
.card-shadow-3 { box-shadow: 0 15px 25px rgba(0, 0, 0, 0.3); }

/* 悬浮动画类 */
.hover-float:hover {
    animation: float 2s ease-in-out infinite;
}

/* 3D变换效果 */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* ========== 浅色主题特定样式 ========== */

/* 浅色主题渐变文字适配 */
.light-theme .bg-gradient-to-r.from-white.to-orange-200,
.light-theme .bg-gradient-to-r.from-white {
    background: linear-gradient(to right, #3c2414, #d2691e, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-theme .bg-gradient-to-r.from-orange-400 {
    background: linear-gradient(to right, #d2691e, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-theme .text-gradient-animate {
    background: linear-gradient(-45deg, #d2691e, #ff8c42, #8b4513, #ff6b35);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 3s ease infinite;
}

/* 浅色主题特定适配 */
.light-theme .text-purple-300,
.light-theme .text-blue-300,
.light-theme .text-green-300,
.light-theme .text-yellow-300,
.light-theme .text-orange-300,
.light-theme .text-indigo-300,
.light-theme .text-teal-300,
.light-theme .text-pink-300 {
    filter: brightness(0.7) saturate(1.2);
}

/* 响应式优化增强 */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .website-card.lg\:col-span-2 {
        grid-column: span 2 !important;
    }
    
    .website-card.lg\:row-span-2 {
        grid-row: span 1 !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.5rem !important;
    }
    
    .bento-grid {
        grid-template-columns: 1fr !important;
    }
    
    .website-card.md\:col-span-2,
    .website-card.lg\:col-span-2 {
        grid-column: span 1 !important;
    }
    
    .about-card.md\:col-span-2 {
        grid-column: span 1 !important;
    }
    
    .about-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .hero-buttons {
        flex-direction: column !important;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .navbar-start .text-xl {
        font-size: 1rem;
    }
    
    .typing-text {
        font-size: 1.25rem !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .website-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .about-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:hover::before {
        width: 0;
        height: 0;
    }
} 