/* 全局样式 */
body {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    font-family: 'Noto Sans SC', sans-serif;
    min-height: 100vh;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 51, 234, 0.8);
}

/* 毛玻璃效果 */
.glass-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(26, 26, 46, 0.7);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(59, 130, 246, 0.2));
}

/* 按钮悬停效果 */
.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

/* 卡片悬停效果 */
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.3);
    transition: all 0.3s ease;
}

/* 标签按钮激活状态 */
.category-btn.active {
    background: linear-gradient(135deg, #9333ea, #3b82f6);
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
}

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

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

/* 梦境记录项样式 */
.history-item {
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: rgba(147, 51, 234, 0.5);
}

/* 梦境词条样式 */
.dictionary-item {
    transition: all 0.3s ease;
}

.dictionary-item:hover {
    border-color: rgba(147, 51, 234, 0.5);
    transform: translateY(-2px);
}

/* 输入框焦点样式 */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.5);
}

/* 导航栏链接样式 */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #a855f7;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 快捷标签样式 */
.tag-btn {
    transition: all 0.3s ease;
}

.tag-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

/* 解析结果动画 */
#result-container {
    animation: fadeIn 0.8s ease-out forwards;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}