/* 老牛影视网站样式 */
body { 
    font-family: 'Noto Sans SC', sans-serif; 
    line-height: 1.6;
    scroll-behavior: smooth;
}

.loading { 
    display: flex; 
    justify-content: center; 
}

/* 页面加载动画 */
body:not(.loaded) {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

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

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

/* 渐变背景动画 */
.gradient-bg {
    background: linear-gradient(-45deg, #1f2937, #374151, #4b5563, #6b7280);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* 卡片悬停效果 */
.hover-card {
    transition: all 0.3s ease;
}

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

/* 文本渐变效果 */
.text-gradient {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 按钮悬停效果 */
.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;
}

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

/* 导航栏玻璃效果 */
header {
    backdrop-filter: blur(10px);
    background: rgba(31, 41, 55, 0.8);
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 400px;
}

/* 响应式图片 */
.aspect-ratio {
    position: relative;
}

.aspect-ratio::before {
    content: '';
    display: block;
    padding-top: 133.33%; /* 3:4 ratio */
}

.aspect-ratio > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 加载动画 */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #374151;
    border-top: 4px solid #ef4444;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

/* 脉冲动画 */
.pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 自定义颜色 */
.bg-gray-750 {
    background-color: #334155;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 媒体查询优化 */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .text-4xl {
        font-size: 2.5rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
}

/* 打印样式 */
@media print {
    header, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-gray-900, .bg-gray-800 {
        background: white !important;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body {
        scroll-behavior: auto;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .text-gray-400 {
        color: #d1d5db;
    }
    
    .text-gray-500 {
        color: #9ca3af;
    }
}

/* 焦点样式 */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

/* 无障碍性增强 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}