/* 规则页面样式 */
/* 与首页一致的动态背景 */
body {
    background: transparent; /* 移除固定背景，让动态背景显示 */
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 修复CSS变量定义 */
:root {
    --primary: var(--primary-color);
    --accent: var(--accent-color);
    --dark-text: var(--text-color);
    --light-text: var(--text-light);
    --primary-dark: var(--secondary-color);
    --error: #f44336;
    --warning: #ff9800;
    --z-particles: -2;
}

/* 移除页面特定的背景定义，使用统一背景系统 */

.rules-section {
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.rules-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    margin: 40px 0;
}

.rule-item {
    margin-bottom: 30px;
    padding: 25px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.15);
    background: rgba(248, 249, 250, 0.5);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.rule-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.rule-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rule-content {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.05rem;
}

.rule-content ul {
    padding-left: 20px;
    margin: 15px 0;
}

.rule-content li {
    margin-bottom: 12px;
    padding: 8px 0;
    border-left: 3px solid rgba(52, 152, 219, 0.3);
    padding-left: 15px;
    margin-left: 10px;
}

.rule-content strong {
    color: var(--primary-color);
    font-weight: 700;
}

.rule-content .warning {
    color: var(--error);
    font-weight: 600;
}

.rule-content .highlight {
    background: rgba(33, 150, 243, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary);
}

.rule-category {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    border: 2px solid;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-important {
    background: rgba(244, 67, 54, 0.15);
    color: #d32f2f;
    border-color: #d32f2f;
}

.category-general {
    background: rgba(33, 150, 243, 0.15);
    color: #1976d2;
    border-color: #1976d2;
}

.category-gameplay {
    background: rgba(76, 175, 80, 0.15);
    color: #388e3c;
    border-color: #388e3c;
}

.category-community {
    background: rgba(156, 39, 176, 0.15);
    color: #7b1fa2;
    border-color: #7b1fa2;
}

.page-header {
    padding: clamp(120px, 15vh, 140px) 0 clamp(30px, 5vh, 40px);
    text-align: center;
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    margin-bottom: clamp(15px, 3vh, 20px);
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    line-height: 1.2;
}

.page-description {
    max-width: min(800px, 90vw);
    margin: 0 auto clamp(25px, 4vh, 40px);
    color: var(--light-text);
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    line-height: 1.7;
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(12px, 2vh, 15px) clamp(15px, 3vw, 20px);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: clamp(20px, 4vh, 30px);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(6px, 1.5vh, 8px) clamp(12px, 2.5vw, 15px);
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    transform: translateX(-5px);
    background: rgba(255, 255, 255, 1);
}

.rules-toc {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    border-left: 4px solid var(--primary);
}

.rules-toc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.rules-toc-list {
    list-style-type: none;
    padding: 0;
}

.rules-toc-list li {
    margin-bottom: 10px;
}

.rules-toc-list a {
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-toc-list a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.rules-toc-list i {
    font-size: 0.8rem;
}

.rules-note {
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
}

.rules-note-title {
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .rules-container {
        padding: 25px 20px;
    }
    
    .rule-title {
        font-size: 1.2rem;
    }
    
    .rule-content {
        font-size: 1rem;
    }
    
    .page-header {
        padding: 100px 0 30px;
    }
    
    .rules-toc {
        padding: 20px 15px;
    }
    
    .rules-note {
        padding: 15px;
    }
    
    .rule-content ul {
        padding-left: 15px;
    }
}