@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(255, 255, 255, 0.5);
    --glass-border-strong: rgba(255, 255, 255, 0.9);
    --glow-cyan: #00e5ff;
    --glow-magenta: #ff00ff;
    --text-primary: #f0f0f0;
    --bg-dark: #0f172a;
}

body {
    background-color: var(--bg-dark);
    /* 性能优化：使用伪元素实现背景渐变与几何图形避免重排 */
    color: var(--text-primary);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 渐变流光背景层 */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255, 0, 255, 0.1) 0%, transparent 40%);
    z-index: -2;
    pointer-events: none;
}

/* 顶部导航 */
.glass-nav {
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transform: translateZ(0);
    will-change: backdrop-filter, transform;
}

/* 高光毛玻璃卡片 */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    will-change: transform, box-shadow, border-color, backdrop-filter;
    transform: translateZ(0);
}

/* 高光反射边缘特效 */
.glass-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
    z-index: 1;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 45px 0 rgba(0, 229, 255, 0.2), inset 0 0 0 2px var(--glass-border-strong);
    border-color: var(--glass-border-strong);
}

.glass-card:hover::after {
    left: 200%;
}

/* 发光按钮 */
.glass-btn {
    background: linear-gradient(135deg, var(--glow-cyan), #0077ff);
    color: #fff;
    font-weight: 800;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.4), inset 0 2px 4px rgba(255,255,255,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    will-change: transform, box-shadow;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.5s ease;
}

.glass-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.6), inset 0 2px 4px rgba(255,255,255,0.7);
}

.glass-btn:hover::before {
    left: 100%;
}

.glass-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--glow-cyan);
    border: 2px solid var(--glow-cyan);
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    will-change: transform, box-shadow, background-color;
    display: inline-block;
    text-align: center;
    transform: translateZ(0);
}

.glass-btn-outline:hover {
    background-color: rgba(0, 229, 255, 0.15);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.3);
}

/* 博客区 - 浅色卡片嵌在深色背景，调整对比度 */
.blog-section {
    background-color: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-card {
    background: #ffffff; /* 要求是浅色背景博客 */
    color: #1e293b;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform, box-shadow;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.15);
}

.text-cyan {
    color: var(--glow-cyan);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff, var(--glow-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

img {
    border-radius: 12px;
    object-fit: cover;
}