/*页头样式*/
    /* 基础样式 */
    :root {
        --sidebar-width: 280px;
        --primary-color: #007bff;
        --secondary-color: #6c757d;
        --dark-color: #343a40;
        --light-bg: #f8f9fa;
    }
    
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        margin: 0;
        padding: 0;
        background: var(--light-bg);
    }
    
    /* 顶部标题栏 */
    .top-header {
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 10px 0;
        position: sticky;
        top: 0;
        z-index: 900;
    }
    
    .site-title {
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--primary-color);
        text-align: center;
        margin: 0;
        padding: 10px 0;
    }
    
    /* 侧边导航栏（覆盖式） */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-width);
        background: var(--dark-color);
        color: white;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        box-shadow: 4px 0 15px rgba(0,0,0,0.3);
        max-width: 85%; /* 限制最大宽度 */
    }
    
    .sidebar.expanded {
        transform: translateX(0);
    }
    
    .sidebar-header {
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }
    
    .sidebar-nav {
        padding: 10px 0;
    }
    
    .sidebar-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .sidebar-nav a {
        display: flex;
        align-items: center;
        color: white;
        text-decoration: none;
        padding: 10px 20px;
        transition: all 0.3s;
    }
    
    .sidebar-nav a:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .sidebar-nav i {
        width: 25px;
        font-size: 1.1rem;
    }
    
    .admin-login {
        background: var(--primary-color);
    }
    
    .logout-btn {
        background: #dc3545;
    }
    
    /* 菜单触发器（无背景） */
    .menu-trigger {
        position: fixed;
        left: 15px;
        top: 15px;
        z-index: 1001;
        background: none;
        color: var(--dark-color);
        border: none;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
        font-size: 1.4rem;
    }
    
    .menu-trigger:hover {
        color: var(--primary-color);
    }
    
    /* 主内容区 */
    .front-main {
        padding: 15px;
    }

/* 紧凑按钮样式 */
    .compact-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
        border-radius: 4px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    
    /* 管理员状态提示 */
    .admin-status {
        text-align: center;
        margin-bottom: 15px;
        padding: 0 15px; /* 添加内边距 */
    }
    
    .admin-info {
        display: inline-block;
       /* background: #f8f9fa;*/
        padding: 8px 15px;
        border-radius: 20px;
        font-size: 0.9rem;
    }
    
    /* 响应式设计 */
    @media (max-width: 768px) {
        .sidebar {
            width: 75%;
            max-width: 265px;
        }
        
        .menu-trigger {
            left: 10px;
            top: 12px;
            font-size: 1.2rem;
        }
        
        .site-title {
            font-size: 1.4rem;
            padding: 8px 0;
        }
        
        .sidebar-header {
            padding: 10px;
        }
        
        .sidebar-nav a {
            padding: 8px 15px;
            font-size: 0.9rem;
        }
        
        .search-input {
            padding: 0.7rem;
            font-size: 0.95rem;
        }
        
        .admin-status {
            font-size: 0.85rem;
        }
    }
    
    @media (max-width: 480px) {
        .sidebar {
            width: 50%;/*导航宽度调整*/
            max-width: 240px;
        }
        
        .site-title {
            font-size: 1.3rem;
        }
        
        .admin-info {
            padding: 6px 12px;
        }
    }
    
/* 统一题目卡片样式 */
.question-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: #fff;
}

.question-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.5;
}

.answer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.answer-item {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.answer-item:last-child {
    border-bottom: none;
}

.correct-answer {
    color: #dc3545;
    font-weight: 500;
}

.correct-mark {
    margin-left: 8px;
    font-weight: bold;
}

.option-letter {
    display: inline-block;
    width: 24px;
    font-weight: bold;
}

.category-label {
    background: #e0f7fa;
    color: #00838f;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 10px;
}

.action-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.detail-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.detail-link:hover {
    text-decoration: underline;
}

.pagination-admin {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-admin .page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    color: #007bff;
    border-radius: 4px;
}

.pagination-admin .page-link.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/*详情页按钮*/
.back-btn {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #0069d9;
    color: white;
}

/* 搜索框样式 */
    
    .search-container {
        max-width: 800px;
        margin: 0 auto 20px;
        padding: 0 15px; /* 添加内边距防止溢出 */
    }
    
    .search-box {
        position: relative;
    }
    
    .search-input {
        padding: 0.8rem;
        border: 2px solid #007bff;
        border-radius: 8px;
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box; /* 防止溢出 */
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    
    .suggestions-list {
        position: absolute;
        width: 100%;
        max-height: 250px;
        overflow-y: auto;
        background: white;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        display: none;
        top: 100%;
        margin-top: 5px;
    }
    
    .suggestion-item {
        padding: 0.7rem 1rem;
        cursor: pointer;
        transition: background 0.2s;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.95rem;
    }

/* 公告弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.announcement-text {
    margin: 15px 0;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}
