@tailwind base;
@tailwind components;
@tailwind utilities;

/* --- 全局基础设置 --- */
html { 
    scroll-behavior: smooth; 
}

body { 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

/* 隐藏滚动条但保留滚动功能 */
.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* 自定义精致滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 20px;
}
.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.5);
}

/* 遮罩渐变 */
.mask-gradient-right { 
    mask-image: linear-gradient(to right, black 95%, transparent 100%); 
    -webkit-mask-image: linear-gradient(to right, black 95%, transparent 100%); 
}

/* --- 搜索框样式 --- */
#search-form:focus-within { 
    border-color: #FF8C19; 
    box-shadow: 0 0 0 4px rgba(255, 140, 25, 0.1); 
    background: #fff; 
}
.dark #search-form:focus-within { 
    background: #1f2937; 
    border-color: rgba(255, 140, 25, 0.5);
}

/* --- 顶部导航栏玻璃拟态 --- */
#header-bg { 
    background: linear-gradient(to bottom, rgba(245,245,247,0.85), rgba(245,245,247,0.4)); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}
.dark #header-bg { 
    background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.4)); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

/* --- 主面板容器样式 --- */
.panel-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.35) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}
.dark .panel-container {
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.6) 0%, rgba(20, 20, 20, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* 装饰性背景光斑 */
.glass-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    border-radius: 9999px;
    filter: blur(60px);
    transition: opacity 0.5s ease;
}
.panel-container:hover .glass-decoration { 
    opacity: 1; 
}

/* --- 卡片通用样式 --- */
.site-card { 
    background-color: rgba(255, 255, 255, 0.5); 
    border: 1px solid rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(10px); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark .site-card { 
    background-color: rgba(255, 255, 255, 0.03); 
    border-color: rgba(255, 255, 255, 0.05); 
}

/* 标准卡片悬浮态 */
.site-card:hover { 
    transform: translateY(-4px); 
    background: rgba(255, 255, 255, 0.8); 
    border-color: rgba(255, 255, 255, 0.9); 
    box-shadow: 0 15px 30px -5px rgba(255, 140, 25, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    z-index: 10;
}
.dark .site-card:hover { 
    background: rgba(40, 40, 40, 0.8); 
    border-color: rgba(255, 255, 255, 0.15); 
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* --- 滑块动画 --- */
.glider-transition {
    transition-property: left, width, top, height, opacity;
    transition-duration: 300ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

#engine-glider {
    position: absolute; 
    bottom: 0; 
    height: 3px; 
    background: #FF8C19;
    border-radius: 99px; 
    box-shadow: 0 0 10px rgba(255, 140, 25, 0.6); 
    pointer-events: none; 
    z-index: 10;
}

.subcategory-glider {
    position: absolute; 
    top: 0; 
    bottom: 0; 
    border-radius: 9999px;
    background: #FF8C19; 
    box-shadow: 0 2px 8px rgba(255, 140, 25, 0.3); 
    pointer-events: none; 
    z-index: 1;
}

/* --- 背景动画 --- */
.animate-blob { 
    animation: blob 10s infinite; 
}
.animation-delay-2000 { 
    animation-delay: 2s; 
}
.animation-delay-4000 { 
    animation-delay: 4s; 
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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