/* ========================================
   自定义CSS样式文件
   使用CSS变量实现主题管理，避免!important冗余
   ======================================== */

/* ========================================
   0. CSS变量定义 - 主题色系统
   ======================================== */

:root {
    /* 浅色模式颜色变量 */
    --color-gold-600: #2563eb;
    --color-gold-500: #3b82f6;
    --color-gold-400: #60a5fa;
    --color-gold-700: #1d4ed8;
    --color-gold-100: #dbeafe;
    --color-gold-200: #bfdbfe;
    --color-gold-300: #93c5fd;
}

.dark {
    /* 深色模式颜色变量 */
    --color-gold-600: #d4af37;
    --color-gold-500: #d4af37;
    --color-gold-400: #eccd86;
    --color-gold-700: #9c7b1a;
    --color-gold-100: #fdf9f0;
    --color-gold-200: #f8efd6;
    --color-gold-300: #f4e4bc;
}

/* ========================================
   1. Tailwind CSS 工具类扩展
   ======================================== */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }

    /* 渐变背景 - 主色调 */
    .bg-gradient-primary {
        background: linear-gradient(135deg, var(--color-gold-500) 0%, var(--color-gold-600) 100%);
    }

    /* 主色背景 */
    .bg-primary {
        background-color: var(--color-gold-600);
    }

    /* 渐变文字 */
    .text-gradient {
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        background-image: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
    }

    /* 文字阴影 */
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Hero区域渐变背景 */
    .hero-gradient {
        background:
            linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.5) 80%, rgba(255, 255, 255, 1) 100%),
            radial-gradient(circle at 20% 50%, rgba(102, 126, 234, .1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(118, 75, 162, .1) 0%, transparent 50%),
            #f8f9fa;
    }
    .dark .hero-gradient {
        background: #111827;
    }
}

/* ========================================
   2. 金色主题颜色映射
   使用CSS变量避免!important冗余
   ======================================== */

.text-gold-600 { color: var(--color-gold-600); }
.text-gold-400 { color: var(--color-gold-400); }
.text-gold-500 { color: var(--color-gold-500); }
.bg-gold-600 { background-color: var(--color-gold-600); }
.bg-gold-500 { background-color: var(--color-gold-500); }
.bg-gold-700 { background-color: var(--color-gold-700); }
.bg-gold-100 { background-color: var(--color-gold-100); }
.bg-gold-200 { background-color: var(--color-gold-200); }
.bg-gold-300 { background-color: var(--color-gold-300); }
.border-gold-600 { border-color: var(--color-gold-600); }
.border-gold-500 { border-color: var(--color-gold-500); }
.border-gold-400 { border-color: var(--color-gold-400); }
.hover\:text-gold-600:hover { color: var(--color-gold-600); }
.hover\:text-gold-400:hover { color: var(--color-gold-400); }
.hover\:bg-gold-600:hover { background-color: var(--color-gold-600); }
.hover\:bg-gold-700:hover { background-color: var(--color-gold-700); }
.hover\:border-gold-600:hover { border-color: var(--color-gold-600); }
.hover\:border-gold-400:hover { border-color: var(--color-gold-400); }

/* ========================================
   3. 优雅炫酷下载按钮样式
   ======================================== */

/* 流动边框按钮 */
.flowing-border {
    position: relative;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 流动边框效果 */
.flowing-border::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: linear-gradient(90deg,
        #667eea, #764ba2, #f093fb, #4facfe,
        #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 200% 200%;
    animation: borderFlow 4s linear infinite;
    z-index: -1;
}

.flowing-border:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

/* 按钮内容 */
.flowing-border-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 扫光效果 */
.flowing-border-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent);
    animation: shine 3s infinite;
}

.flowing-border:hover .flowing-border-content {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 点击波纹效果 */
.flowing-border:active .flowing-border-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: rippleEffect 0.6s ease-out;
}

/* 图标轻微浮动 */
.flowing-border-content svg {
    display: inline-block;
    transition: transform 0.3s ease;
}

.flowing-border:hover .flowing-border-content svg {
    transform: translateY(-2px);
}

/* ========================================
   4. 打字机效果样式
   ======================================== */

.typewriter-title {
    display: inline-block;
    overflow: visible;
    position: relative;
}

#typewriter-text {
    color: #1e293b;
}

.dark #typewriter-text {
    color: #ffffff;
}

.typewriter-cursor {
    animation: blink 0.7s infinite;
    font-weight: 400;
    color: #3b82f6;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.dark .typewriter-cursor {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
}

/* ========================================
   5. 功能选项卡样式
   ======================================== */

/* 选项卡内容淡入动画 */
.feature-tab-content {
    animation: fadeIn 0.5s ease-in-out;
}

/* 选项卡图片悬停效果 */
.feature-gif-wrapper img {
    transition: transform 0.3s ease;
}

.feature-gif-wrapper:hover img {
    transform: scale(1.02);
}

/* 选项卡交互 */
.feature-tab {
    transition: all 0.3s ease;
}

.feature-tab:hover {
    transform: translateY(-2px);
}

.feature-tab.active {
    border-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.dark .feature-tab.active {
    border-color: var(--color-gold-600);
}

/* ========================================
   6. 按钮样式
   ======================================== */

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold-500) 0%, var(--color-gold-600) 100%);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-gold-600) 0%, var(--color-gold-700) 100%);
}

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

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

/* ========================================
   7. 自定义滚动条样式
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 深色模式滚动条 */
.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ========================================
   8. 试用徽章样式
   ======================================== */

.hero-trial-badge {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #10b981;
}

.dark .hero-trial-badge {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    border-color: rgba(52, 211, 153, 0.4);
    color: #34d399;
}

/* ========================================
   9. Hero Badge脉冲动画
   ======================================== */

.hero-badge .inline-flex {
    animation: hero-badge-pulse 2s ease-in-out infinite;
}

@keyframes hero-badge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.dark .hero-badge .inline-flex {
    animation: hero-badge-pulse-dark 2s ease-in-out infinite;
}

@keyframes hero-badge-pulse-dark {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(212, 175, 55, 0);
    }
}

/* ========================================
   10. 通用动画定义
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

@keyframes subtleShine {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes scroll-down {
    0% {
        opacity: 0;
        top: 8px;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        top: 16px;
    }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* ========================================
   11. 抖音风格标签样式
   ======================================== */

.douyin-badge {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
}

.douyin-badge::before {
    content: '抖音';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fe2c55;
    opacity: 0.3;
    transform: translate(1px, 1px);
}

.douyin-badge::after {
    content: '抖音';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d4ff;
    opacity: 0.3;
    transform: translate(-1px, -1px);
}

.douyin-badge:hover::before {
    animation: glitch-1 0.3s infinite;
}

.douyin-badge:hover::after {
    animation: glitch-2 0.3s infinite;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(1px, 1px); }
    25% { transform: translate(-1px, 2px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-2px, 1px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(-1px, -1px); }
    25% { transform: translate(2px, -2px); }
    50% { transform: translate(-1px, 2px); }
    75% { transform: translate(1px, -1px); }
}

/* ========================================
   12. 会员价格卡片样式
   ======================================== */

.pricing-card {
    perspective: 1000px;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.2s; }
.pricing-card:nth-child(3) { animation-delay: 0.3s; }
.pricing-card:nth-child(4) { animation-delay: 0.4s; }

.pricing-card-highlight::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #D4AF37, #FFD700, #D4AF37);
    border-radius: 1rem;
    z-index: -1;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

.pricing-number {
    display: inline-block;
    animation: price-bounce 2s ease-in-out infinite;
}

@keyframes price-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.pricing-card:hover {
    filter: drop-shadow(0 20px 40px rgba(212, 175, 55, 0.3));
}

/* ========================================
   13. 工具卡片样式
   ======================================== */

.tool-card {
    animation: toolFadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes toolFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card:hover .relative {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

@keyframes textFloat {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0px);
    }
}

.tool-card:hover .download-text-float {
    animation: textFloat 1.5s ease-in-out infinite;
}
