/* 自定义样式 */

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 滚动时显示的动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 视差滚动效果 */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮悬停效果 */
.btn-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-hover:hover::before {
    left: 100%;
}

/* 画廊过滤动画 */
.gallery-item {
    transition: all 0.5s ease;
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    height: 0;
    margin: 0;
    padding: 0;
}

/* 表单焦点效果 */
.form-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* 背景图案 */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(184, 148, 31, 0.1) 0%, transparent 50%);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 自定义选择器样式 */
::selection {
    background-color: #d4af37;
    color: white;
}

::-moz-selection {
    background-color: #d4af37;
    color: white;
}

/* 焦点可见性 */
.focus-visible:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .bg-primary-50 {
        background-color: #f8fafc;
    }
    
    .text-gray-600 {
        color: #374151;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auto-dark .bg-white {
        background-color: #374151;
    }
    
    .auto-dark .text-gray-900 {
        color: #f9fafb;
    }
    
    .auto-dark .text-gray-600 {
        color: #d1d5db;
    }
}

/* 悬停缩放特效 */
.hover-zoom {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.hover-zoom:hover {
    transform: scale(1.1);
}

/* 确保图片容器支持缩放效果 */
.zoom-container {
    overflow: hidden;
    border-radius: inherit;
}

.zoom-container img {
    transition: transform 0.3s ease;
}

.zoom-container:hover img {
    transform: scale(1.1);
}

/* 夜间模式特定样式 */
.dark .hero-gradient {
    background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #1f2937 100%);
}

.dark .hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
}

.dark .card-dark {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.3);
}

.dark .text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark .glass-effect {
    background: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.2);
}

/* 主题切换按钮动画 */
#theme-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dark #theme-toggle:hover {
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

/* 图标切换动画 */
#sun-icon, #moon-icon {
    transition: all 0.3s ease;
}

/* 文本选择颜色 - 夜间模式 */
.dark ::selection {
    background-color: rgba(212, 175, 55, 0.3);
    color: #ffffff;
}

/* 滚动条样式 - 夜间模式 */
.dark ::-webkit-scrollbar {
    width: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* 链接悬停效果 - 夜间模式 */
.dark a:hover {
    color: #ecd486;
}

/* 按钮样式增强 - 夜间模式 */
.dark .btn-gold {
    background: linear-gradient(135deg, #d4af37, #b8941f);
    color: #000000;
}

.dark .btn-gold:hover {
    background: linear-gradient(135deg, #ecd486, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* 卡片样式增强 - 夜间模式 */
.dark .feature-card {
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s ease;
}

.dark .feature-card:hover {
    background: rgba(55, 65, 81, 0.9);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 视频播放按钮 - 夜间模式 */
.dark .video-play-btn {
    background: rgba(31, 41, 55, 0.9);
    border: 2px solid #d4af37;
}

.dark .video-play-btn:hover {
    background: #d4af37;
    color: #000000;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* 导航栏样式 - 夜间模式 */
.dark .navbar {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(75, 85, 99, 0.2);
}

/* 页脚样式 - 夜间模式 */
.dark .footer {
    background: linear-gradient(135deg, #111827, #1f2937);
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

/* 输入框样式 - 夜间模式 */
.dark input, .dark textarea {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.4);
    color: #ffffff;
}

.dark input:focus, .dark textarea:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* 加载动画 - 夜间模式 */
.dark .loading-spinner {
    border-color: rgba(75, 85, 99, 0.3);
    border-top-color: #d4af37;
}

/* 工具提示 - 夜间模式 */
.dark .tooltip {
    background: rgba(17, 24, 39, 0.95);
    color: #ffffff;
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* 模态窗口 - 夜间模式 */
.dark .modal {
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.dark .modal-backdrop {
    background: rgba(0, 0, 0, 0.7);
}

/* 渐变背景增强 - 夜间模式 */
.dark .gradient-bg {
    background: linear-gradient(135deg, 
        rgba(17, 24, 39, 0.9) 0%, 
        rgba(31, 41, 55, 0.8) 50%, 
        rgba(17, 24, 39, 0.9) 100%);
}

/* 文本渐变 - 夜间模式 */
.dark .text-gradient {
    background: linear-gradient(135deg, #ecd486, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 平滑过渡 */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* 禁用某些元素的过渡以避免闪烁 */
img, svg, video {
    transition: none;
}

* {
    box-sizing: border-box;
}

img, svg, video {
    max-width: 100%;
    height: auto;
}

/* 色彩流动边框效果 */
.flowing-border {
    position: relative;
    border-radius: 0.5rem;
    padding: 4px;
    background: transparent;
    overflow: hidden;
}

.flowing-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(0deg, 
        #ff6b6b 0%, 
        #4ecdc4 14%, 
        #45b7d1 28%, 
        #96ceb4 42%, 
        #ffeaa7 56%, 
        #dda0dd 70%, 
        #ff9ff3 84%, 
        #ff6b6b 100%
    );
    border-radius: 50%;
    animation: rotateGradient 3s linear infinite;
    z-index: 0;
}

.flowing-border::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: white;
    border-radius: calc(0.5rem - 2px);
    z-index: 1;
}

.flowing-border-content {
    position: relative;
    background: #d4af37;
    border-radius: calc(0.5rem - 4px);
    padding: 1rem 2rem;
    z-index: 2;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    margin: 2px;
}

.flowing-border:hover .flowing-border-content {
    background: #b8941f;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 暗色模式下的流动边框 */
.dark .flowing-border::after {
    background: #1f2937;
}

.dark .flowing-border-content {
    background: #d4af37;
    color: white;
}

.dark .flowing-border:hover .flowing-border-content {
    background: #b8941f;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
} 