/* 安管人员题库页面样式 */

.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.tool-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: white;
    color: #667eea;
}

.tool-content {
    padding: 60px 0;
}

.question-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.question-number {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

.options {
    margin-left: 20px;
}

.option {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.option:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option.wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.option.selected {
    background: #cce5ff;
    border-color: #007bff;
    color: #004085;
}

.answer-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    display: none;
    min-height: 180px; /* 固定最小高度：按钮(40px) + 正确答案(30px) + 反馈区域(70px) + 间距(40px) */
}

.answer-section.show {
    display: block;
}

/* 正确答案样式 - 一行显示 */
.correct-answer {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1em;
    display: inline-block;
    margin-left: 8px;
}

.show-answer-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.show-answer-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.explanation {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 5px;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 8px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.stat-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 8px rgba(245, 87, 108, 0.2);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 8px rgba(79, 172, 254, 0.2);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 8px rgba(67, 233, 123, 0.2);
}

.stat-card:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 8px rgba(250, 112, 154, 0.2);
}

.stat-card h3 {
    font-size: 1.6em;
    margin-bottom: 4px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stat-card p {
    font-size: 0.75em;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 筛选按钮 */
.filter-btn {
    padding: 10px 25px;
    margin: 0 5px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

/* 模式选择按钮 */
.mode-btn {
    padding: 12px 30px;
    margin: 0 8px;
    border: 2px solid #43e97b;
    background: white;
    color: #43e97b;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(67, 233, 123, 0.2);
}

.mode-btn:hover {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 233, 123, 0.3);
}

.mode-btn.active {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 12px rgba(67, 233, 123, 0.4);
}

/* 题型标签 */
.question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.type-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.type-single {
    background: #e3f2fd;
    color: #1976d2;
}

.type-multiple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-judge {
    background: #e8f5e9;
    color: #388e3c;
}

.correct-answer {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1em;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px 5px;
        border-radius: 8px;
    }
    
    .stat-card h3 {
        font-size: 1.3em;
        margin-bottom: 3px;
    }
    
    .stat-card p {
        font-size: 0.65em;
    }
    
    .mode-btn {
        padding: 10px 20px;
        margin: 0 5px;
        font-size: 0.9em;
    }
    
    .filter-btn {
        padding: 8px 18px;
        margin: 0 3px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .stats-container {
        gap: 6px;
    }
    
    .stat-card {
        padding: 10px 4px;
    }
    
    .stat-card h3 {
        font-size: 1.1em;
    }
    
    .stat-card p {
        font-size: 0.6em;
    }
    
    .mode-btn {
        padding: 8px 15px;
        margin: 0 4px;
        font-size: 0.85em;
    }
    
    .filter-btn {
        padding: 7px 15px;
        margin: 0 2px;
        font-size: 0.8em;
    }
}

/* 淡入淡出动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 浮动导航层 */
.float-nav {
    position: fixed;
    left: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.float-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.float-nav-btn:active {
    transform: scale(0.95);
}

/* 设置按钮特殊样式 */
.float-nav-settings {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.float-nav-settings:hover {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 浮动导航隐藏状态 */
.float-nav.hidden .float-nav-btn:not(.float-nav-settings) {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: all 0.3s ease;
}

.float-nav.hidden .float-nav-settings {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 跳转对话框 */
.jump-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.jump-dialog-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 350px;
    max-width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.jump-dialog-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.jump-dialog-content input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.jump-dialog-content input:focus {
    outline: none;
    border-color: #667eea;
}

.jump-dialog-buttons {
    display: flex;
    gap: 10px;
}

.jump-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jump-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.jump-btn.cancel {
    background: #6c757d;
}

.jump-btn.cancel:hover {
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* 未答题对话框特殊样式 */
.unanswered-dialog-content {
    max-width: 600px;
    max-height: 80vh;
}

.unanswered-list {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 20px;
}

.unanswered-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    padding: 10px;
}

.unanswered-item {
    padding: 12px 8px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    color: #c0392b;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 154, 158, 0.3);
    font-size: 0.95em;
}

.unanswered-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.5);
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

/* 移动端适配 - 浮动导航 */
@media (max-width: 768px) {
    .float-nav {
        left: 15px;
        bottom: 15px;
    }
    
    .float-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
    }
    
    .jump-dialog-content {
        min-width: 300px;
        padding: 25px;
    }
}

/* 题目高亮动画 */
@keyframes highlight {
    0% {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: scale(1);
    }
    20% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8);
        transform: scale(1.02);
        border: 3px solid #667eea;
    }
    100% {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: scale(1);
        border: none;
    }
}

/* 搜索框 */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: none;
    background: #f0f0f0;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.search-stats {
    margin-top: 10px;
    padding: 8px 15px;
    background: #e3f2fd;
    border-radius: 20px;
    display: inline-block;
    color: #1976d2;
    font-size: 0.9em;
    font-weight: 500;
}

/* 控制面板 */
.control-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* 答题统计容器 */
.answer-stats-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* 答题统计卡片样式 */
.answer-correct {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3) !important;
}

.answer-correct h3,
.answer-correct p {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.answer-wrong {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
    box-shadow: 0 4px 12px rgba(235, 51, 73, 0.3) !important;
}

.answer-wrong h3,
.answer-wrong p {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.answer-total {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%) !important;
    box-shadow: 0 4px 12px rgba(33, 147, 176, 0.3) !important;
}

.answer-total h3,
.answer-total p {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* PC端答题统计卡片优化 */
@media (min-width: 769px) {
    .answer-stats-container .stat-card {
        padding: 12px 15px;
        min-width: 100px;
    }
    
    .answer-stats-container .stat-card h3 {
        font-size: 1.8em;
        margin-bottom: 5px;
        line-height: 1;
    }
    
    .answer-stats-container .stat-card p {
        font-size: 0.85em;
        margin: 0;
        line-height: 1.2;
    }
    
    /* PC端按钮高度优化 */
    .reset-stats-btn,
    .view-unanswered-btn {
        padding: 10px 18px;
        align-self: center;
    }
}

/* 重置按钮 */
.reset-stats-btn {
    padding: 12px 20px;
    border: 2px solid #6c757d;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
}

.reset-stats-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 查看未答题按钮 */
.view-unanswered-btn {
    padding: 12px 20px;
    border: 2px solid #2196f3;
    background: white;
    color: #2196f3;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.view-unanswered-btn:hover {
    background: #2196f3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.filter-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #667eea, transparent);
    margin: 20px 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-buttons .filter-btn {
    padding: 8px 20px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .search-container,
    .search-box {
        max-width: 100%;
    }
    
    .search-input {
        font-size: 0.95em;
        padding: 10px 40px 10px 15px;
    }
    
    .clear-search-btn {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
    
    .control-panel {
        padding: 20px 15px;
    }
    
    .filter-buttons .filter-btn {
        padding: 6px 15px;
        font-size: 0.85em;
    }
    
    /* 移动端答题统计优化 */
    .answer-stats-container {
        gap: 8px;
    }
    
    .answer-stats-container .stat-card {
        padding: 12px 10px;
        flex: 1;
        min-width: 75px;
    }
    
    .answer-stats-container .stat-card h3 {
        font-size: 1.5em;
        font-weight: bold;
    }
    
    .answer-stats-container .stat-card p {
        font-size: 0.75em;
        font-weight: 600;
        margin-top: 4px;
    }
    
    .reset-stats-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }
    
    .view-unanswered-btn {
        padding: 10px 15px;
        font-size: 0.85em;
    }
    
    /* 移动端未答题列表优化 */
    .unanswered-dialog-content {
        max-width: 90%;
        min-width: 300px;
    }
    
    .unanswered-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }
    
    .unanswered-item {
        padding: 10px 6px;
        font-size: 0.9em;
    }
}

/* 统计卡片激活状态 - 多选题颜色 */
.stat-card.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.4);
}

.stat-card.active h3 {
    color: white;
}

.stat-card.active p {
    color: rgba(255, 255, 255, 0.9);
}

/* 当前显示卡片固定样式 */
.stat-card.current-display {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* 非激活状态的统一颜色 */
.stat-card:not(.active):not(.current-display) {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.stat-card:not(.active):not(.current-display) h3 {
    color: #666;
}

.stat-card:not(.active):not(.current-display) p {
    color: #999;
}

/* 悬停效果 */
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-card.active:hover {
    transform: scale(1.05) translateY(-5px);
}
