/* 比赛规则页面特定样式 */

/* 全局尺寸规范 - 与style.css保持一致 */
:root {
    /* 网站标准尺寸 */
    --site-width: 1920px;
    --site-height: 1080px;
    
    /* 主体内容区域宽度 */
    --content-width: 1200px;
    
    /* 导航栏高度范围 */
    --navbar-height-min: 60px;
    --navbar-height-max: 100px;
    
    /* Banner高度范围 */
    --banner-height-min: 300px;
    --banner-height-max: 800px;
}

/* 规则页面特定样式 - 覆盖全局背景设置 */
body {
    background-image: none !important;
    background-color: white !important;
    color: #333 !important;
}

/* 移除霓虹光效背景 */
body::before {
    display: none !important;
}

/* 规则头部样式 */
.rules-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rules-header h2 {
    color: #ff69b4;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
}

.rules-header p {
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

/* 图片展示区域样式 */
.rules-images {
    margin-top: 20px;
}

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.rule-image-container {
    background: white;
    overflow: hidden;
}

.rule-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    padding: 15px;
    background: white;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-gallery {
        gap: 20px;
    }
    
    .image-caption {
        padding: 12px;
        font-size: 14px;
    }
}

/* 文档加载区域样式 */
.document-loader {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 加载控件容器 */
.loader-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 文档选择器样式 */
.doc-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-selector label {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.doc-selector select {
    padding: 10px 15px;
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.doc-selector select:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.doc-selector button {
    padding: 10px 20px;
    background-color: #ff69b4;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.doc-selector button:hover {
    background-color: #ff52a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

/* 上传文档样式 */
.doc-upload {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-upload label {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.doc-upload input[type="file"] {
    background-color: white;
    color: #333;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    cursor: pointer;
}

/* 文档显示容器 */
.document-container {
    margin-bottom: 40px;
}

/* 加载中消息样式 */
.loading-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 40px;
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.rules-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff69b4, #00ffff);
}

.rules-header h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff69b4;
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
}

.rules-header p {
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
}

/* 规则标签样式 */
.rules-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.rule-tab {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: none;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rule-tab::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;
}

.rule-tab.active {
    background-color: #ff69b4;
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

.rule-tab:hover:not(.active) {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.rule-tab:hover::before {
    left: 100%;
}

/* 规则分区样式 */
.rule-section {
    margin-bottom: 40px;
}

.rule-section-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #ff69b4;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 20px;
}

.rule-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 30px;
    background-color: #ff69b4;
    border-radius: 5px;
}

/* 规则内容样式 */
.rule-content, .rules-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #ddd;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.rule-content::before, .rules-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff69b4, #00ffff);
}

.rule-content h3, .rules-content h3 {
    color: #ff69b4;
    margin: 30px 0 15px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    position: relative;
    padding-bottom: 10px;
}

.rule-content h3::after, .rules-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #ff69b4, transparent);
}

.rule-content h4, .rules-content h4 {
    color: #ffffff;
    margin: 20px 0 10px;
    font-size: 22px;
}

.rule-content p, .rules-content p {
    margin-bottom: 15px;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}

.rule-content ul, .rules-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.rule-content li, .rules-content li {
    margin-bottom: 10px;
    color: #333;
    line-height: 1.6;
    position: relative;
    padding-left: 15px;
}

.rule-content li::before, .rules-content li::before {
    content: '•';
    color: #ff69b4;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 18px;
}

/* 特殊样式 */
.rule-content .highlight, .rules-content .highlight {
    background-color: rgba(255, 105, 180, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ff69b4;
    margin: 20px 0;
}

.rule-content .important, .rules-content .important {
    color: #ff4757;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 71, 87, 0.3);
}

.rule-content .note, .rules-content .note {
    background-color: #e6f7ff;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid #1890ff;
    margin: 15px 0;
    color: #333;
}

/* 表格样式 */
.rule-content table, .rules-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.rule-content th, .rules-content th, .rule-content td, .rules-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.rule-content th, .rules-content th {
    background-color: #fff0f5;
    color: #ff69b4;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.rule-content tr:hover, .rules-content tr:hover {
    background-color: #f9f9f9;
}

/* 代码块样式 */
.rule-content code, .rules-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d73a49;
    font-size: 14px;
}

.rule-content pre, .rules-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #ddd;
}

.rule-content pre code, .rules-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* 引用样式 */
.rule-content blockquote, .rules-content blockquote {
    border-left: 4px solid #ff69b4;
    padding-left: 20px;
    margin: 20px 0;
    color: #333;
    font-style: italic;
    background-color: #fff0f5;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

/* 按钮样式 */
.rule-content .btn, .rules-content .btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff69b4, #ff85c0);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 10px 5px;
    border: none;
    cursor: pointer;
}

.rule-content .btn:hover, .rules-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .rules-header {
        padding: 30px;
    }
    
    .rules-header h2 {
        font-size: 32px;
    }
    
    .rule-content, .rules-content {
        padding: 25px;
    }
    
    .rule-content h3, .rules-content h3 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .rules-tabs {
        gap: 8px;
    }
    
    .rule-tab {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .rules-header {
        padding: 25px;
    }
    
    .rules-header h2 {
        font-size: 28px;
    }
    
    .rules-header p {
        font-size: 14px;
    }
    
    .rule-section-title {
        font-size: 20px;
        padding-left: 15px;
    }
    
    .rule-section-title::before {
        width: 8px;
        height: 24px;
    }
    
    .rule-content, .rules-content {
        padding: 20px;
    }
    
    .rule-content h3, .rules-content h3 {
        font-size: 20px;
    }
    
    .rule-content h4, .rules-content h4 {
        font-size: 18px;
    }
    
    .rule-content p, .rules-content p {
        font-size: 14px;
    }
    
    .rule-content ul, .rules-content ul {
        margin-left: 15px;
    }
    
    .rule-content li, .rules-content li {
        padding-left: 12px;
        font-size: 14px;
    }
    
    .rule-content table, .rules-content table {
        font-size: 12px;
    }
    
    .rule-content th, .rules-content th,
    .rule-content td, .rules-content td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .rules-header {
        padding: 20px;
    }
    
    .rules-header h2 {
        font-size: 24px;
    }
    
    .rules-header p {
        font-size: 13px;
    }
    
    .rule-tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .rule-section-title {
        font-size: 18px;
        padding-left: 12px;
    }
    
    .rule-section-title::before {
        width: 6px;
        height: 20px;
    }
    
    .rule-content, .rules-content {
        padding: 15px;
    }
    
    .rule-content h3, .rules-content h3 {
        font-size: 18px;
    }
    
    .rule-content h4, .rules-content h4 {
        font-size: 16px;
    }
    
    .rule-content p, .rules-content p {
        font-size: 13px;
    }
    
    .rule-content ul, .rules-content ul {
        margin-left: 10px;
    }
    
    .rule-content li, .rules-content li {
        padding-left: 10px;
        font-size: 13px;
    }
    
    .rule-content .highlight, .rules-content .highlight {
        padding: 10px;
    }
    
    .rule-content .note, .rules-content .note {
        padding: 8px 10px;
    }
    
    .rule-content blockquote, .rules-content blockquote {
        padding: 10px 15px;
        padding-left: 15px;
    }
    
    .rule-content table, .rules-content table {
        font-size: 11px;
    }
    
    .rule-content th, .rules-content th,
    .rule-content td, .rules-content td {
        padding: 6px 8px;
    }
    
    .rule-content pre, .rules-content pre {
        padding: 10px;
        font-size: 12px;
    }
}

/* 加载动画 */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.rule-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    animation: pulse 2s infinite;
}

/* 空状态样式 */
.rule-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.rule-empty h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.rule-empty p {
    font-size: 16px;
    line-height: 1.6;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 焦点样式 */
*:focus {
    outline: 2px solid #ff69b4;
    outline-offset: 2px;
}

/* 自定义滚动条 */
.rule-content::-webkit-scrollbar,
.rules-content::-webkit-scrollbar {
    width: 8px;
}

.rule-content::-webkit-scrollbar-track,
.rules-content::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 4px;
}

.rule-content::-webkit-scrollbar-thumb,
.rules-content::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 4px;
}

.rule-content::-webkit-scrollbar-thumb:hover,
.rules-content::-webkit-scrollbar-thumb:hover {
    background: #ff85c0;
}

/* 打印样式 */
@media print {
    .rules-tabs {
        display: none;
    }
    
    .rule-content, .rules-content {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .rule-content h3, .rules-content h3 {
        color: #ff69b4 !important;
    }
    
    .rule-content li::before, .rules-content li::before {
        color: #ff69b4 !important;
    }
}
