/* 欢知日记星 - 产品着陆页样式 */

/* 自定义动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
    position: relative;
    overflow: hidden;
}

.gradient-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.gradient-bg > * {
    position: relative;
    z-index: 10;
}

/* 星星图案背景 */
.star-pattern {
    background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 2px, transparent 2px),
                      radial-gradient(circle at 80% 50%, rgba(255,255,255,0.03) 1px, transparent 1px),
                      radial-gradient(circle at 40% 20%, rgba(255,255,255,0.03) 1px, transparent 1px),
                      radial-gradient(circle at 60% 80%, rgba(255,255,255,0.05) 2px, transparent 2px);
    background-size: 100px 100px, 80px 80px, 120px 120px, 90px 90px;
    animation: twinkle 3s ease-in-out infinite;
}

/* Logo 浮动动画 */
.hero-logo {
    animation: float 3s ease-in-out infinite;
    position: relative;
}

.hero-logo::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    border-radius: inherit;
    animation: shine 2s ease-in-out infinite;
    pointer-events: none;
}

/* 功能卡片动画 */
.feature-card {
    animation: fadeInUp 0.6s ease-out;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.2);
}

/* 下载卡片样式 */
.download-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    transition: left 0.5s ease;
}

.download-card:hover::before {
    left: 100%;
}

.download-card:hover {
    border-color: #fbbf24;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(251, 191, 36, 0.2);
}

/* 使用场景卡片动画 */
.scenario-card {
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: scale(1.05);
}

.scenario-icon {
    animation: twinkle 2s ease-in-out infinite;
}

/* 修复英雄区域按钮点击问题 */
.gradient-bg a {
    position: relative;
    z-index: 20 !important;
    pointer-events: auto !important;
    display: inline-block !important;
}

.gradient-bg .flex {
    position: relative;
    z-index: 15;
}

/* 英雄区域文字增强 */
.gradient-bg h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: #ffffff !important;
}

.gradient-bg p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #f9fafb !important;
}

/* 特殊文字效果 */
.text-gradient {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 星星装饰效果 */
.star-decoration {
    position: relative;
}

.star-decoration::before {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1rem;
    animation: twinkle 2s ease-in-out infinite;
}

/* 心情颜色主题 */
.mood-happy {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.mood-love {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.mood-calm {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.mood-excited {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .scenario-card {
        margin-bottom: 1rem;
    }
    
    .star-pattern {
        background-size: 50px 50px, 40px 40px, 60px 60px, 45px 45px;
    }
}

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

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

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

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

/* 暗色模式下的滚动条 */
.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

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

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* 按钮特效 */
.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

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

.btn-primary:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
}

/* 英雄区域按钮增强 */
.gradient-bg .btn-primary,
.gradient-bg a[class*="bg-white"] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.gradient-bg a[class*="border-white"] {
    border-width: 2px;
    font-weight: 600;
    text-shadow: none;
}

/* 卡片阴影效果 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(251, 191, 36, 0.1), 0 10px 10px -5px rgba(251, 191, 36, 0.04);
}

/* 日记主题装饰 */
.diary-decoration {
    position: relative;
}

.diary-decoration::after {
    content: '📖';
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.3;
}

/* 交互式元素 */
.interactive-element {
    cursor: pointer;
    transition: all 0.2s ease;
}

.interactive-element:hover {
    transform: scale(1.02);
}

.interactive-element:active {
    transform: scale(0.98);
}

/* 焦点样式 */
.focus-ring:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* 无障碍访问 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 特殊效果 - 日记本翻页 */
@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.page-flip {
    animation: pageFlip 2s ease-in-out infinite;
}

/* 温暖的光晕效果 */
.warm-glow {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.warm-glow:hover {
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
}
