/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

/* 粒子背景容器 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 彩虹文本效果 */
.rainbow-text {
    background: linear-gradient(90deg, #ff0000, #ff9900, #33cc33, #3399ff, #cc33ff);
    background-size: 500% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 6s ease infinite;
}

/* 彩虹边框效果 */
.rainbow-border {
    position: relative;
    border-radius: 1rem;
    background: linear-gradient(90deg, #ff0000, #ff9900, #33cc33, #3399ff, #cc33ff);
    background-size: 500% 100%;
    animation: rainbow 6s ease infinite;
    padding: 2px;
}

/* 彩虹按钮效果 */
.btn-rainbow {
    background: linear-gradient(90deg, #ff0000, #ff9900, #33cc33, #3399ff, #cc33ff);
    background-size: 500% 100%;
    animation: rainbow 6s ease infinite;
    transition: all 0.3s ease;
}

.btn-rainbow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 渐变按钮效果 */
.btn-primary {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    background-size: 200% 100%;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 玻璃态卡片效果 */
.glass-card {
    background: rgba(25, 25, 25, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 8px 32px rgba(106, 17, 203, 0.37);
    transform: translateY(-5px);
}

/* 动画效果 */
@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* 表单样式 */
.form-input {
    background: rgba(25, 25, 25, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
    color: #fff;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.3);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
}

.form-group {
    margin-bottom: 1rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 0.5rem;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #fff;
}

/* 通知提示样式 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #4CAF50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196F3;
}

.toast.warning {
    border-left: 4px solid #ff9800;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 导航栏样式 */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 移动端导航菜单 */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
}

/* 活动论坛分类 */
.active-forum-category {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

.forum-category {
    transition: all 0.3s ease;
}

.forum-category:hover {
    background-color: #333;
}

/* 帖子卡片样式 */
.post-card {
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.2);
}

/* 设置选项卡样式 */
.settings-tab {
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-tab.active {
    color: #a855f7;
    border-bottom: 2px solid #a855f7;
}

.settings-content {
    display: none;
}

.settings-content.active {
    display: block;
}

/* 管理员选项卡样式 */
.admin-tab {
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab.active {
    color: #a855f7;
    border-bottom: 2px solid #a855f7;
}

.admin-content {
    display: none;
}

.admin-content.active {
    display: block;
}

/* 页面切换样式 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 警告提示 */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    display: none;
}

.alert.error {
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    display: block;
}

.alert.success {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    display: block;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        margin: 20% auto;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .modal-content {
        margin: 30% auto;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1rem;
    }
}
