/* 检查清单页面专用样式 */
.checklist-main {
    padding: 40px 0;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

/* 暗色模式 */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme .checklist-controls,
body.dark-theme .checklist-category,
body.dark-theme .stats-panel,
body.dark-theme .stat-card {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

body.dark-theme .checklist-item label {
    color: #e0e0e0;
}

body.dark-theme .wcag-reference {
    background-color: #3a3a3a;
    color: #b0b0b0;
    border-left-color: #3498db;
}

body.dark-theme .search-container input {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-theme .filter-btn {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-theme .filter-btn.active {
    background-color: #fb6c00;
    color: white;
}

body.dark-theme .item-note {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

/* 屏幕阅读器专用样式（隐藏但可访问） */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 工具栏 */
.checklist-toolbar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    gap: 10px;
}

/* 搜索容器 */
.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.search-container input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #fb6c00;
    box-shadow: 0 0 0 3px rgba(251, 108, 0, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* 筛选按钮 */
.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #fb6c00;
    color: #fb6c00;
}

.filter-btn.active {
    background: #fb6c00;
    color: white;
    border-color: #fb6c00;
}

/* 主题切换和统计按钮 */
.theme-toggle-btn,
.stats-toggle-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #333;
}

.theme-toggle-btn:hover,
.stats-toggle-btn:hover {
    border-color: #fb6c00;
    color: #fb6c00;
    transform: scale(1.05);
}

/* 统计图表面板 */
.stats-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
}

/* 进度统计和控制区域 */
.checklist-controls {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.progress-container {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

#progress-text {
    color: #2c3e50;
}

#progress-percent {
    color: #fb6c00;
    font-size: 18px;
}

.progress-bar {
    background: #e0e0e0;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    background: linear-gradient(90deg, #fb6c00 0%, #ff8930 100%);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(251, 108, 0, 0.3);
}

/* 操作按钮区域 */
.checklist-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-checklist-action {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-checklist-action:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-checklist-action:active {
    transform: translateY(0);
}

.btn-checklist-action i {
    font-size: 16px;
}

.btn-reset {
    background: #e74c3c;
}

.btn-reset:hover {
    background: #c0392b;
}

/* 打印样式优化 */
@media print {
    .checklist-controls {
        display: none;
    }
    
    .checklist-title-section {
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .category-header {
        background: #f0f0f0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .checklist-category {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .wcag-reference {
        background: #f5f5f5 !important;
        border-left: 3px solid #3498db !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        color: #555 !important;
        page-break-inside: avoid;
    }
}

.checklist-content {
    padding: 0 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.checklist-title-section {
    background: linear-gradient(135deg, #fb6c00 0%, #ff8930 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin: 30px 0;
}

.checklist-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.checklist-title-section p {
    font-size: 18px;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.checklist-category {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.checklist-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(251, 108, 0, 0.2);
}

.category-header {
    background: linear-gradient(90deg, #fb6c00 0%, #ff8930 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 100px;
}

.category-progress-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.category-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.category-progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.category-toggle,
.category-select-all {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.category-toggle:hover,
.category-select-all:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.category-toggle:focus,
.category-select-all:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.category-icon {
    background-color: white;
    color: #fb6c00;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.category-items {
    padding: 24px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
}

.checklist-item:last-child {
    margin-bottom: 0;
}

.checklist-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background-color: rgba(251, 108, 0, 0.02);
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}

.checklist-item-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.item-note-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.item-note-btn:hover {
    background: #f0f0f0;
    color: #fb6c00;
}

.item-note-btn.has-note {
    color: #fb6c00;
}

.item-note-container {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.2s ease;
}

.item-note {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.item-note:focus {
    outline: none;
    border-color: #fb6c00;
    box-shadow: 0 0 0 3px rgba(251, 108, 0, 0.1);
}

.item-note-save {
    background: #fb6c00;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.item-note-save:hover {
    background: #ff8930;
    transform: translateY(-1px);
}

.checklist-item-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"] {
    margin-top: 5px;
    transform: scale(1.2);
    flex-shrink: 0;
}

.checklist-item label {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* WCAG参考说明样式 - 确保显示在下方 */
.wcag-reference {
    margin: 8px 0 0 0;
    padding: 8px 12px;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.5;
    border-left: 3px solid #3498db;
    background: #f8f9fa;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    clear: both;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .checklist-grid {
        grid-template-columns: 1fr;
    }
    
    .checklist-title {
        font-size: 2rem;
    }
    
    .checklist-title-section {
        padding: 30px 0;
    }
    
    .checklist-controls {
        padding: 20px;
    }
    
    .checklist-actions {
        flex-direction: column;
    }
    
    .btn-checklist-action {
        width: 100%;
        justify-content: center;
    }
    
    .progress-info {
        font-size: 14px;
    }
    
    .checklist-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-btn {
        flex: 1;
    }
    
    .toolbar-right {
        justify-content: center;
    }
    
    .category-header {
        flex-wrap: wrap;
    }
    
    .category-progress {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .checklist-item label {
        font-size: 16px;
    }
    
    .checklist-toolbar {
        padding: 15px;
    }
    
    .search-container {
        min-width: 100%;
    }
}

/* 动画增强 */
.checklist-category {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checklist-item input[type="checkbox"]:checked + label {
    color: #27ae60;
    font-weight: 500;
}

.checklist-item input[type="checkbox"]:checked + label::before {
    content: "✓ ";
    color: #27ae60;
    font-weight: bold;
}

/* 打印时隐藏工具栏和统计面板 */
@media print {
    .checklist-toolbar,
    .stats-panel {
        display: none !important;
    }
}

