/* 全局样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 105, 180, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(70, 130, 180, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(144, 238, 144, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 70% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 20%);
    background-attachment: fixed;
}

.dark body {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 105, 180, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(70, 130, 180, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(144, 238, 144, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 70% 20%, rgba(255, 215, 0, 0.03) 0%, transparent 20%);
}

/* 玻璃拟态效果 */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    transition: all 0.3s ease;
}

.dark .glass {
    background: rgba(17, 25, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
}

.dark .glass:hover {
    background: rgba(17, 25, 40, 0.85);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

/* 按钮卡片悬停效果 */
.btn-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-card:hover {
    transform: translateY(-5px);
}

.btn-card .bg-white.dark\:bg-gray-800 {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .btn-card .bg-white.dark\:bg-gray-800 {
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-card:hover .bg-white.dark\:bg-gray-800 {
    background: rgba(255, 255, 255, 0.8);
}

.dark .btn-card:hover .bg-white.dark\:bg-gray-800 {
    background: rgba(31, 41, 55, 0.8);
}

/* 表单输入框动画 */
input, textarea, select {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.dark input, .dark textarea, .dark select {
    background: rgba(31, 41, 55, 0.7);
}

input:focus, textarea:focus, select:focus {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.dark input:focus, .dark textarea:focus, .dark select:focus {
    background: rgba(31, 41, 55, 0.9);
}

/* 搜索框玻璃效果 */
#searchInput {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark #searchInput {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(193, 193, 193, 0.6);
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 168, 168, 0.8);
}

/* 暗色模式滚动条 */
.dark ::-webkit-scrollbar-track {
    background: rgba(45, 55, 72, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(74, 85, 104, 0.6);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(113, 128, 150, 0.8);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 彩虹文本效果增强 */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow 10s ease infinite;
    background-size: 400% 100%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* 按钮效果增强 */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::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: all 0.6s ease;
}

button:hover::before {
    left: 100%;
}

.dark button::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* 卡片阴影增强 */
.rounded-xl {
    position: relative;
}

.rounded-xl::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 0.75rem;
    z-index: -1;
    transition: all 0.3s ease;
}

.rounded-xl:hover::after {
    bottom: -8px;
    right: -8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .glass {
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
}