/* ===== 学生端样式 student-style.css ===== */

/* 页面加载过渡效果样式 */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    visibility: visible;
    opacity: 1;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 4rem;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out;
}

/* 旋转加载动画 */
.loader-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* 加载文本样式 */
.loader-text h3 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.loader-text p {
    color: #666;
    margin: 0.5rem 0 1rem 0;
    font-size: 1rem;
}

/* 进度条样式 */
.loader-progress {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

/* 动画定义 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 登录和注册模态框样式 */
.modal-content {
    border: none;
    border-radius: 1rem;
}

/* 自定义修改信息模态框样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    justify-content: center;
    align-items: center;
}

.custom-modal.show {
    display: flex;
}

.custom-modal .modal-dialog {
    margin: 1.75rem;
    position: relative;
    width: auto;
    pointer-events: none;
}

.custom-modal .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    outline: 0;
}

.custom-modal .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.status-trial {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
}

.status-paid {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.custom-modal .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
}

.custom-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.custom-modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1400px) {
    .custom-modal-content {
        max-width: 480px;
        max-height: 92vh;
    }
}

@media (max-width: 1200px) {
    .custom-modal-content {
        max-width: 95vw;
        max-height: 93vh;
    }
}

@media (max-width: 992px) {
    .custom-modal-content {
        max-width: 96vw;
        max-height: 94vh;
    }
}

@media (max-width: 768px) {
    .custom-modal-content {
        max-width: 97vw;
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .custom-modal-header {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .custom-modal-body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .custom-modal-footer {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

@media (max-width: 576px) {
    .custom-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .custom-modal-header {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .custom-modal-body {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .custom-modal-footer {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        flex-direction: column;
    }
    
    .custom-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .custom-modal-footer .custom-btn:last-child {
        margin-bottom: 0;
    }
    
    .custom-modal-title {
        font-size: 1.1rem;
    }
    
    .custom-modal-close {
        font-size: 1.25rem;
        padding: 0.25rem;
    }
    
    .custom-form-label {
        font-size: 0.9rem;
    }
    
    .custom-form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #343a40;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    z-index: 1051;
    position: relative;
    outline: none;
}

.custom-modal-close:hover {
    color: #343a40;
}

.custom-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.custom-form-group {
    margin-bottom: 1rem;
}

.custom-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.custom-form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.custom-btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

.custom-btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.custom-btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.custom-btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.custom-btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.custom-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* 模态框动画 */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-modal .modal-content {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

.modal-body .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-body .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.modal-body .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.modal-body .text-primary {
    color: #667eea !important;
    transition: color 0.3s ease;
}

.modal-body .text-primary:hover {
    color: #764ba2 !important;
    text-decoration: underline;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 1rem 1rem;
}

.modal-footer .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.modal-footer .btn-primary:disabled {
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.modal-footer .btn-secondary {
    background: #f0f0f0;
    color: #666;
    border: none;
}

.modal-footer .btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

/* 输入组按钮样式 */
.input-group .btn {
    border-radius: 0 0.5rem 0.5rem 0;
    border: 2px solid #e0e0e0;
    border-left: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group .btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.input-group .btn:disabled {
    background: #f0f0f0;
    color: #999;
    border-color: #e0e0e0;
}

/* 错误提示样式 */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.875rem;
    font-weight: 500;
}

/* 自定义导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

/* 滚动时导航栏样式变化 */
.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    color: #fff;
    transform: translateY(-3px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar-brand i {
    font-size: 1.6rem;
    color: #fff;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 0.375rem;
}

.nav-link:hover {
    color: #fff;
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scaleX(0);
    transform-origin: center;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* 下拉菜单样式 */
.dropdown-menu {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 0.75rem !important;
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
    z-index: 1060;
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    margin: 0.125rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.5rem;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-item i {
    width: 1.25rem;
}

/* 登录和注册模态框样式 */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: modalSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1.5rem;
    border-bottom: none;
    border-radius: 1rem 1rem 0 0;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    opacity: 1;
    transition: all 0.3s ease;
}

.modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-body .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.95);
}

.modal-body .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fff;
    transform: translateY(-1px);
}

.modal-body .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.modal-body .text-danger.small {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 1rem 1rem;
    background-color: rgba(255, 255, 255, 0.95);
}

/* 按钮样式 */
.modal-footer .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.modal-footer .btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.modal-footer .btn-secondary:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modal-footer .btn-primary:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    transform: none;
    box-shadow: none;
}

/* 验证码按钮样式 */
.input-group .btn {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0 0.5rem 0.5rem 0;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group .btn:hover:not(:disabled) {
    background-color: #667eea;
    color: #fff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.input-group .btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.input-group .btn-secondary {
    background-color: #f8f9fa;
    border-color: #e0e0e0;
}

/* 登录/注册切换链接 */
.auth-switch-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.auth-switch-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-switch-link a:hover {
    color: #764ba2;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* 加载动画 */
.spinner-border {
    width: 1.25rem;
    height: 1.25rem;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.3) transparent rgba(255, 255, 255, 0.3) transparent;
}

/* 表单组样式 */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* 移动端导航栏按钮 */
.navbar-toggler {
    border: none;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 固定导航栏后的内容边距 */
.container.mt-5 {
    margin-top: 90px !important;
    margin-bottom: 50px !important;
}

/* 响应式导航栏调整 */
@media (max-width: 992px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-brand i {
        font-size: 1.4rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.125rem 0;
    }
    
    .nav-link:hover {
        transform: none;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .dropdown-menu {
        margin-top: 0.25rem !important;
        background: #343a40;
    }
    
    .dropdown-item:hover {
        transform: none;
    }
}

/* 题目列表容器样式 */
.problem-list-container {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 100px; /* 为分页器预留空间 */
}

/* 分页器粘性定位样式 */
.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* 三列布局样式 */
.editor-three-column-layout {
    display: flex;
    height: calc(100vh - 100px);
    gap: 10px;
    position: relative;
}

/* 侧边竖排按钮容器 */
.side-tabs-container {
    width: 60px;
    height: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 10px 0;
    transition: width 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.side-tabs-container.hidden {
    width: 0;
    overflow: hidden;
    padding: 0;
}

/* 紧凑模式 */
.side-tabs-container.compact {
    position: fixed;
    margin-left: -48px;
    z-index: 1060;
}

/* 竖排按钮样式 */
.vertical-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* 单个按钮样式 */
.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 60px;
    background-color: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.tab-item:hover {
    background-color: #e9ecef;
    color: #495057;
}

.tab-item.active {
    background-color: #0d6efd;
    color: white;
}

/* 按钮图标样式 */
.tab-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 按钮标签样式 */
.tab-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* 分隔线样式 */
.tab-divider {
    height: 1px;
    width: 80%;
    background-color: #e9ecef;
    margin: 5px 0;
}

/* 切换按钮样式 */
.toggle-tab {
    margin-top: auto;
}

/* 主内容区域样式 */
.editor-fullscreen {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 编辑器容器样式 */
.editor-container {
    display: flex;
    flex-direction: row !important;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Tab内容区域默认样式 */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
    margin-top: 1.5rem;
}

/* 确保历史提交Tab中的内容区域不会影响其他Tab */
.tab-content:not(.leftPanelTab-history) {
    display: block;
    height: auto;
}

/* 历史提交区域样式 */
.tab-content.leftPanelTab-history {
    display: block;
    height: auto;
    overflow: hidden;
    padding-right: 1rem;
}

.tab-content.leftPanelTab-history .history-submissions {
    overflow-y: auto;
    /* max-height: calc(100vh - 300px); */
}

/* 运行结果标签页中的输出容器样式 */
.tab-content.leftPanelTab-output {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.tab-content.leftPanelTab-output .output-container {
    margin-top: 1.5rem !important;
}

/* 题目面板样式 */
.problem-panel {
    flex: 0 0 35%;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.3s ease;
    overflow: hidden;
    height: 100%;
    max-height: 100vh;
}

.problem-panel .d-flex.gap-2.mb-3 {
    flex-shrink: 0;
    margin: 1rem !important;
    padding-right: 1rem;
}

.problem-panel .tab-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
    margin-top: 1.5rem;
    min-height: 0;
}

.problem-panel.hidden {
    width: 0;
    overflow: hidden;
}

/* 拖拽分隔条样式 */
.resize-handle {
    width: 12px;
    background-color: #f8f9fa;
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s;
    flex-shrink: 0;
    z-index: 10;
}

.resize-handle:hover {
    background-color: #0d6efd;
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background-color: #dee2e6;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.resize-handle:hover::before {
    background-color: #fff;
}

/* 代码面板样式 */
.code-panel {
    flex: 1;
    background-color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
    position: relative;
    height: 100%;
}

/* 问题头部样式 */
.problem-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* 问题内容样式 */
.problem-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 输入输出示例样式 */
.input-output {
    margin-bottom: 15px;
}

.input-output .input, .input-output .output {
    margin-bottom: 10px;
}

.input-output .label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.input-output pre {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* 代码编辑器容器样式 */
#monaco-container {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* 编辑器加载遮罩层 */
.editor-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.editor-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.editor-loading-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
}

.editor-loading-spinner {
    margin-bottom: 1.5rem;
}

.editor-loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
    border-color: #e9ecef;
    border-top-color: #007bff;
}

.editor-loading-text {
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 1.5rem;
}

.editor-loading-progress {
    margin: 1.5rem 0;
}

.editor-loading-progress .progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.editor-loading-progress .progress-bar {
    background-color: #007bff;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.progress-text span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.editor-loading-hint {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

/* 暗色主题下的编辑器加载遮罩层 */
body.dark-theme .editor-loading-overlay,
.editor-loading-overlay.dark-theme {
    background: #1e1e1e;
}

body.dark-theme .editor-loading-text,
.editor-loading-overlay.dark-theme .editor-loading-text {
    color: #e0e0e0;
}

body.dark-theme .editor-loading-spinner .spinner-border,
.editor-loading-overlay.dark-theme .editor-loading-spinner .spinner-border {
    border-color: #3c3c3c;
    border-top-color: #4fc1ff;
}

body.dark-theme .editor-loading-progress .progress,
.editor-loading-overlay.dark-theme .editor-loading-progress .progress {
    background-color: #3c3c3c;
}

body.dark-theme .editor-loading-progress .progress-bar,
.editor-loading-overlay.dark-theme .editor-loading-progress .progress-bar {
    background-color: #4fc1ff;
}

body.dark-theme .progress-text,
.editor-loading-overlay.dark-theme .progress-text {
    color: #a0a0a0;
}

body.dark-theme .editor-loading-hint,
.editor-loading-overlay.dark-theme .editor-loading-hint {
    color: #a0a0a0;
    background-color: #2d2d2d;
}

/* 志愿者面板样式 */
.volunteer-panel {
    width: 90px;
    background: linear-gradient(180deg, #1e1e1e 0%, #252526 100%);
    border-left: 1px solid #3e3e42;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0 8px 8px 0;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3);
}

.volunteer-header {
    padding: 16px 8px 12px;
    background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
    color: white;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-radius: 0 8px 0 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.volunteer-header i {
    font-size: 1.4rem;
    opacity: 0.9;
}

.volunteer-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.volunteer-list::-webkit-scrollbar {
    width: 6px;
}

.volunteer-list::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.volunteer-list::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 3px;
}

.volunteer-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.volunteer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    background-color: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.volunteer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.1) 0%, rgba(0, 90, 158, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
}

.volunteer-item:hover::before {
    opacity: 1;
}

.volunteer-item > * {
    position: relative;
    z-index: 1;
}

.volunteer-item:hover {
    border-color: #007acc;
    background-color: #3e3e42;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

.volunteer-item:active {
    transform: scale(0.95);
}

.volunteer-item.active {
    border-color: #007acc;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.2) 0%, rgba(0, 90, 158, 0.2) 100%);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3), 0 4px 12px rgba(0, 122, 204, 0.4);
    animation: active-glow 2s infinite;
}

@keyframes active-glow {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3), 0 4px 12px rgba(0, 122, 204, 0.4);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.5), 0 4px 16px rgba(0, 122, 204, 0.6);
    }
}

.volunteer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.4);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.volunteer-item:hover .volunteer-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 122, 204, 0.6);
}

.volunteer-item.active .volunteer-avatar {
    animation: avatar-pulse 2s infinite;
}

@keyframes avatar-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.volunteer-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #2d2d30;
}

.volunteer-info {
    text-align: center;
    width: 100%;
}

.volunteer-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #cccccc;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.volunteer-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 59, 48, 0.9);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.volunteer-delete:hover {
    background-color: rgba(255, 59, 48, 1);
    transform: scale(1.1);
}

.volunteer-delete i {
    font-size: 0.7rem;
    color: white;
}

.volunteer-item:hover .volunteer-delete {
    opacity: 1;
}

.volunteer-empty-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    text-align: center;
    color: #858585;
    gap: 8px;
}

.volunteer-empty-hint i {
    font-size: 1.8rem;
    opacity: 0.5;
    color: #007acc;
}

.volunteer-empty-hint p {
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0;
    color: #cccccc;
    letter-spacing: 0.3px;
}

.volunteer-empty-hint .hint-text {
    font-size: 0.6rem;
    color: #858585;
    line-height: 1.4;
    opacity: 0.8;
    letter-spacing: 0.2px;
}

/* 志愿者代码展示区域样式 */
.volunteer-code-display {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e1e1e 0%, #252526 100%);
    border: 1px solid #3e3e42;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1), slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
    }
    to {
        transform: translateY(0);
    }
}

.volunteer-code-header {
    padding: 14px 18px;
    background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.volunteer-code-header .d-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volunteer-code-header i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.volunteer-code-header .btn-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.volunteer-code-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.volunteer-code-header .btn-close:active {
    transform: rotate(90deg) scale(0.95);
}

.volunteer-code-header .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.volunteer-code-header .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.volunteer-code-header .btn-outline-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.volunteer-code-header .btn-outline-secondary i {
    font-size: 1rem;
    opacity: 0.9;
}

.volunteer-code-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #1e1e1e;
    position: relative;
}

.volunteer-code-content::-webkit-scrollbar {
    width: 10px;
}

.volunteer-code-content::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.volunteer-code-content::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
    border: 2px solid #1e1e1e;
}

.volunteer-code-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.volunteer-code-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #858585;
    gap: 16px;
    padding: 40px;
}

.volunteer-code-placeholder i {
    font-size: 4rem;
    opacity: 0.3;
    background: linear-gradient(135deg, #007acc 0%, #005a9e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.volunteer-code-placeholder p {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.6;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.volunteer-code-content pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #d4d4d4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.volunteer-code-content code {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.volunteer-code-content ::selection {
    background: #007acc;
    color: #ffffff;
}

.volunteer-code-content ::-moz-selection {
    background: #007acc;
    color: #ffffff;
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-selector label {
    font-weight: 500;
    color: #495057;
}

.language-selector select {
    padding: 5px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .editor-three-column-layout {
        flex-direction: column;
        height: auto;
    }
    
    .side-tabs-container {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 10px;
        border-radius: 8px 8px 0 0;
    }
    
    .side-tabs-container.hidden {
        width: 0;
        height: 0;
        padding: 0;
    }
    
    .vertical-tabs {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }
    
    .tab-item {
        height: 50px;
        width: 80px;
    }
    
    .tab-divider {
        width: 1px;
        height: 80%;
        margin: 0 10px;
    }
    
    .toggle-tab {
        margin-top: 0;
    }
    
    .editor-container {
        flex-direction: column;
    }
    
    .problem-panel {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .resize-handle {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
    
    /* 排行榜和主内容区域响应式设计 */
    .col-md-3, .col-md-9 {
        width: 100%;
    }
    
    .sticky-top {
        position: static !important;
        top: auto !important;
    }
    
    .row.g-4 {
        gap: 1rem !important;
    }
    
    /* 问题卡片响应式设计 */
    .col-md-6.col-lg-4 {
        width: 100%;
    }
    
    .problem-card {
        min-height: auto;
    }
    
    /* 搜索筛选区域响应式设计 */
    .col-md-4, .col-md-2 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .d-flex.justify-content-md-end {
        justify-content: flex-start !important;
    }
}

/* 标签导航样式 */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-tabs .nav-link:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
        color: #0d6efd;
        background-color: transparent;
        border-color: transparent;
        font-weight: 700;
    }

/* 逆向100例代码编辑器样式 */
.editor-content {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    min-height: 400px;
    flex: 1;
    height: 100%;
}

/* 逆向100例容器布局 */
.reverse100-container {
    margin-top: 20px;
}

/* 逆向100例表格容器 */
.reverse100-table-container {
    background-color: #fff;
    border-radius: 8px;
    /* padding: 20px; */
    /* border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); */
}

.reverse100-table-container .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.reverse100-table-container .table-header h4 {
    font-weight: 600;
    color: #212529;
    font-size: 1.25rem;
}

.reverse100-table-container .table-responsive {
    border-radius: 6px;
    overflow: hidden;
}

.reverse100-table-container .reverse100-table {
    margin-bottom: 0;
    background-color: #fff;
}

.reverse100-table-container .reverse100-table thead {
    background-color: #f1f3f5;
}

.reverse100-table-container .reverse100-table thead th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 14px 12px;
    font-size: 0.875rem;
    white-space: nowrap;
}

.reverse100-table-container .reverse100-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    font-size: 0.875rem;
    border-bottom: 1px solid #e9ecef;
}

.reverse100-table-container .reverse100-table tbody tr {
    transition: all 0.2s ease;
}

.reverse100-table-container .reverse100-table tbody tr:hover {
    background-color: #e7f1ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reverse100-table-container .reverse100-table tbody tr.table-active {
    background-color: #cfe2ff;
    border-left: 4px solid #0d6efd;
}

.reverse100-table-container .case-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.reverse100-table-container .case-description {
    color: #495057;
    line-height: 1.6;
    max-width: 400px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reverse100-table-container .case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.reverse100-table-container .case-tags .tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reverse100-table-container .case-tags .tag:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: translateY(-1px);
}

.reverse100-table-container .case-actions {
    display: flex;
    gap: 8px;
}

.reverse100-table-container .case-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.reverse100-table-container .case-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 试看标识样式 */
.reverse100-table-container .case-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reverse100-table-container .watch-preview-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    transition: all 0.2s ease;
}

.reverse100-table-container .watch-preview-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.4);
}

/* 逆向100例内联布局样式 */
.reverse100-editor-container {
    display: flex;
    height: calc(100vh - 300px);
    gap: 0;
    position: relative;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* 左侧案例信息面板 */
.case-info-panel {
    flex: 0 0 35%;
    background-color: #fff;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: flex-basis 0.3s ease;
    overflow: hidden;
    height: 100%;
    max-height: 100vh;
    padding: 1.5rem;
}

.case-info-panel .description-container {
    margin-bottom: 2rem;
}

.case-info-panel .description-container h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
}

.case-info-panel .description-container p {
    line-height: 1.6;
    color: #495057;
    margin-bottom: 0;
}

.case-info-panel .tags-container {
    margin-bottom: 1.5rem;
}

.case-info-panel .tags-container h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

.case-info-panel .tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.case-info-panel .tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.case-info-panel .tag:hover {
    background-color: #0d6efd;
    color: #fff;
    transform: translateY(-1px);
}

/* 拖拽分隔条样式 */
.reverse100-editor-container .resize-handle {
    width: 8px;
    background-color: #f8f9fa;
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s;
}

.reverse100-editor-container .resize-handle:hover {
    background-color: #0d6efd;
}

/* 右侧代码编辑器面板 */
.reverse100-editor-container .code-panel {
    flex: 1;
    background-color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
    position: relative;
}

.reverse100-editor-container .code-panel .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-shrink: 0;
}

.reverse100-editor-container .code-panel h5 {
    font-weight: 700;
    color: #212529;
    margin-bottom: 0;
}

.reverse100-editor-container .code-panel .panel-toggle-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.reverse100-editor-container .code-panel .panel-toggle-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
}

.reverse100-editor-container .code-panel .editor-content {
    flex: 1;
    min-height: 300px;
    height: 100%;
    margin-bottom: 0;
}

.reverse100-editor-container .code-panel .editor-buttons {
    flex-shrink: 0;
}

.reverse100-editor-container .code-panel .editor-buttons .btn {
    transition: all 0.3s ease;
}

.reverse100-editor-container .code-panel .editor-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .reverse100-editor-container {
        flex-direction: column;
        height: auto;
        min-height: 600px;
    }
    
    .case-info-panel {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .reverse100-editor-container .resize-handle {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
    
    .reverse100-editor-container .code-panel {
        min-height: 400px;
    }
}

/* 内容占位符样式 */
.content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    padding: 2rem;
    text-align: center;
}

.content-placeholder i {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.content-placeholder p {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}


/* 案例项样式 */
.case-item {
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.case-item:hover {
    background-color: #e9ecef;
    transform: translateX(4px);
}

.case-item.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.case-item h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* 代码编辑器容器样式 */
.code-editor-container {
    margin-top: 20px;
}

.code-editor-container h5 {
    margin-bottom: 10px;
    color: #343a40;
    font-weight: 600;
}

/* 编辑器按钮样式 */
.editor-buttons {
    margin-top: 15px;
}

.editor-buttons .btn {
    margin-right: 10px;
}

/* 内容头部样式 */
.content-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.content-header h3 {
    margin: 0;
    color: #343a40;
    font-weight: 700;
}

/* 案例描述样式 */
.description-container {
    margin-bottom: 20px;
}

.description-container h5 {
    margin-bottom: 10px;
    color: #343a40;
    font-weight: 600;
}

.description-container p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* 技术点标签样式 */
.tags-container {
    margin-bottom: 20px;
}

.tags-container h6 {
    margin-bottom: 10px;
    color: #343a40;
    font-weight: 600;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .reverse100-table-container {
        padding: 15px;
    }
    
    .reverse100-table-container .table-header h4 {
        font-size: 1.1rem;
    }
    
    .reverse100-table-container .reverse100-table thead th {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .reverse100-table-container .reverse100-table tbody td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .reverse100-table-container .case-description {
        max-width: 200px;
        -webkit-line-clamp: 1;
    }
    
    .reverse100-table-container .case-tags {
        gap: 4px;
    }
    
    .reverse100-table-container .case-tags .tag {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .reverse100-table-container .case-actions .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .reverse100-table-container {
        padding: 10px;
    }
    
    .reverse100-table-container .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .reverse100-table-container .table-header h4 {
        font-size: 1rem;
    }
    
    .reverse100-table-container .reverse100-table thead th:nth-child(3),
    .reverse100-table-container .reverse100-table tbody td:nth-child(3) {
        display: none;
    }
    
    .reverse100-table-container .reverse100-table thead th,
    .reverse100-table-container .reverse100-table tbody td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .reverse100-table-container .case-title {
        font-size: 0.85rem;
    }
    
    .reverse100-table-container .case-actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .reverse100-table-container .case-actions .btn {
        width: 100%;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .editor-buttons .btn {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

.btn-primary:hover:not(:disabled) {
    background-color: #2563eb !important;
}


.btn-primary:active:not(:disabled) {
    background-color: #1d4ed8 !important;
}

/* 清除结果按钮样式 */
.btn-outline-secondary {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.6rem 1.25rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    background-color: #fff !important;
    color: #6b7280 !important;
}

.btn-outline-secondary:hover:not(:disabled) {
    border-color: #9ca3af !important;
    background-color: #f9fafb !important;
}

/* 代码展示区域优化 */
.ai-response-container pre {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-radius: 6px;
    padding: 1rem !important;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.75rem 0;
}

.ai-response-container code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #f3f4f6;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    color: #dc2626;
}

.ai-response-container pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* 标题和内容样式 */
.ai-response-container h6 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.ai-response-container p {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.ai-response-container ul, 
.ai-response-container ol {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.ai-response-container li {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.375rem;
}

/* 加载动画优化 */
.spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.3) transparent rgba(255, 255, 255, 0.3) transparent;
}

/* 错误提示样式优化 */
.alert-danger {
    border-radius: 8px;
    border: 1px solid #fee2e2;
    padding: 0.875rem 1rem;
    background-color: #fef2f2;
    color: #991b1b;
}

/* 成功提示样式优化 */
.alert-success {
    border-radius: 8px;
    border: 1px solid #d1fae5;
    padding: 0.875rem 1rem;
    background-color: #ecfdf5;
    color: #065f46;
}

/* 深色主题下的提示样式 */
body.dark-theme .alert-success {
    background-color: rgba(6, 95, 70, 0.2);
    border-color: rgba(6, 95, 70, 0.5);
    color: #6ee7b7;
}

body.dark-theme .alert-danger {
    background-color: rgba(153, 27, 27, 0.2);
    border-color: rgba(153, 27, 27, 0.5);
    color: #fca5a5;
}

/* 美化AI辅助模块的整体容器 */
.tab-content .mb-4 {
    background-color: #fff;
    border-radius: 12px;
    /* padding: 1.5rem; */
    margin-bottom: 1.5rem !important;
}

/* 标题样式 */
.tab-content .mb-4 h6 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

/* 描述文本样式 */
.tab-content .mb-4 .text-muted {
    /* color: #718096 !important; */
    font-size: 0.9rem;
    line-height: 1.6;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #0d6efd;
    border-radius: 3px 3px 0 0;
}

/* 代码面板按钮组样式 - 现代化美化 */
.code-panel .d-flex.align-items-center.gap-3 {
    gap: 1rem !important;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* 确保所有按钮元素高度一致 */
.code-panel .d-flex.align-items-center.gap-3 > * {
    display: flex;
    align-items: center;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* 确保语言选择器内部元素完美对齐 */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0;
    height: 42px;
    min-height: 42px;
}

.language-selector label {
    margin: 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.language-selector select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin: 0;
    height: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    line-height: 1;
}

/* 左侧面板选项卡按钮样式 - 专业灰色调配色 */
.problem-panel .btn {
    border-radius: 0.25rem;
    font-size: 0.875rem;
    padding: 0.4rem 0.9rem;
    font-weight: 500;
    transition: none !important;
    box-shadow: none !important;
    transform: none !important;
    border: none;
    
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

/* 左侧面板选项卡按钮 - 非活动状态 */
.problem-panel .btn-outline-primary {
    /* background-color: #f5f5f5;
    border: 1px solid #d0d0d0; */
    color: #717171;
    font-weight:normal;
    transition: none !important;
}

.btn-primary:hover{
    background-color: #2563eb !important;
    color: floralwhite;
}

/* 左侧面板选项卡按钮 - 活动状态 */
/* .problem-panel .btn {
    
    border: 1px solid #404040;
    color: #060606;
    transition: none !important;
} */

.problem-panel .btn-outline-primary:hover{
    background-color: #404040;
    border:none;
}

/* 确保所有状态下都没有交互效果 */
.problem-panel .btn:hover,
.problem-panel .btn:focus,
.problem-panel .btn:active,
.problem-panel .btn-outline-primary:hover,
.problem-panel .btn-outline-primary:focus,
.problem-panel .btn-outline-primary:active,
.problem-panel .btn-primary:hover,
.problem-panel .btn-primary:focus,
.problem-panel .btn-primary:active {
    transition: none !important;
    box-shadow: none !important;
    transform: none !important;
    background-color: inherit !important;
    border-color: inherit !important;
    color: inherit !important;
}

/* 调整选项卡容器样式 */
.problem-panel .d-flex.gap-2.mb-3 {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: #ffffff;
}

/* 确保提交按钮和全屏按钮与语言选择器对齐 */
#fullscreen-btn, .code-panel .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.5rem 1rem;
    height: 42px;
    min-height: 42px;
    line-height: 1;
    vertical-align: middle;
}

/* 全屏按钮样式 */
#fullscreen-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#fullscreen-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

#fullscreen-btn:active {
    background-color: #e9ecef;
    transform: translateY(0);
}

/* 语言选择器样式 */
.language-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.language-selector label {
    margin: 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.language-selector select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background-color: #fff;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.language-selector select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* 提交答案按钮样式 */
.code-panel .btn-primary {
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 题目卡片答题按钮样式 */
.problem-card .card-footer .btn-primary {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.2);
    min-width: 55px;
    text-align: center;
}

.problem-card .card-footer .btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a53be 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.problem-card .card-footer .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

/* 表格模式答题按钮样式 */
#nav-problems .table .btn-primary {
    font-size: 0.55rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.2);
}

#nav-problems .table .btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a53be 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.3);
}

/* 逆向100例布局样式 */

/* 逆向100例容器 */
.reverse100-container {
    /* display: flex; */
    /* height: calc(100vh - 150px); */
    overflow: hidden;
    border-radius: 0.5rem;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

/* 左侧案例列表 */
.reverse100-sidebar {
    width: 25%;
    min-width: 200px;
    border-right: 1px solid #e9ecef;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.case-item {
    padding: 1.25rem 1rem;
    margin-bottom: 0;
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.case-item:hover {
    background-color: #f8f9fa;
    box-shadow: none;
    transform: none;
}

.case-item.active {
    background-color: #e3f2fd;
    color: #0d6efd;
    border-left: 4px solid #0d6efd;
}

.case-item.active:hover {
    background-color: #d1ecf1;
}

.case-item h6 {
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.case-item h6::before {
    content: '▶';
    font-size: 0.75rem;
    color: #6c757d;
    transition: all 0.2s ease;
}

.case-item.active h6::before {
    color: #0d6efd;
    transform: translateX(4px);
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 右侧实战容器 */
.reverse100-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.content-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
}

.content-header h3 {
    font-weight: 600;
    color: #343a40;
}

/* 操作按钮区域 */
.action-buttons {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

.action-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* 案例描述 */
.description-container {
    margin-bottom: 2.5rem;
}

.description-container h5 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}

.description-container p {
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
}

/* 技术点标签 */
.tags-container {
    margin-bottom: 2rem;
}

.tags-container h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #495057;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    background-color: #e9ecef;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: #dee2e6;
    transform: translateY(-1px);
}

/* 内容占位符 */
.content-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.content-placeholder i {
    font-size: 8rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.content-placeholder p {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 0;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .reverse100-sidebar {
        width: 30%;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .reverse100-container {
        flex-direction: column;
        height: auto;
        min-height: 800px;
    }
    
    .reverse100-sidebar {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .reverse100-content {
        height: 600px;
    }
    
    .content-body {
        padding: 1.5rem;
    }
    
    .video-container {
        padding-bottom: 56.25%;
    }
    
    .video-container iframe {
        min-height: 350px;
    }
    
    .video-placeholder {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .sidebar-list {
        padding: 0.75rem;
    }
    
    .case-item {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .content-body {
        padding: 1.25rem;
    }
    
    .action-buttons {
        padding: 1.25rem;
    }
    
    .action-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
        margin-right: 0 !important;
    }
    
    .action-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .content-placeholder i {
        font-size: 6rem;
    }
    
    .content-placeholder p {
        font-size: 1.125rem;
        padding: 0 1rem;
    }
}

/* 滚动条样式 */
.sidebar-list::-webkit-scrollbar,
.content-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-list::-webkit-scrollbar-track,
.content-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar-list::-webkit-scrollbar-thumb,
.content-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-list::-webkit-scrollbar-thumb:hover,
.content-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 平滑过渡效果 */
.case-item {
    transition-property: all;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

.video-player {
    transition: all 0.3s ease;
}

.tag {
    transition: all 0.2s ease;
}

/* 已移除未使用的视频推荐样式 */

.code-panel .btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a53be 100%);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

/* 运行按钮状态样式 */
#run-code-btn {
    transition: all 0.3s ease;
}

#run-code-btn:disabled {
    cursor: wait;
    opacity: 1;
}

/* 代码运行结果反馈样式 */
.output-container {
    transition: all 0.3s ease;
}

.output-container.success {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.1);
}

.output-container.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.1);
}

.code-output-container.success {
    border-color: #28a745;
}

.code-output-container.success .output-header {
    background: linear-gradient(to bottom, #1a2f1a, #0f1f0f);
    border-bottom-color: #28a745;
}

.code-output-container.success .output-header h6 i {
    color: #4caf50;
}

.code-output-container.error {
    border-color: #dc3545;
}

.code-output-container.error .output-header {
    background: linear-gradient(to bottom, #2f1a1a, #1f0f0f);
    border-bottom-color: #dc3545;
}

.code-output-container.error .output-header h6 i {
    color: #f44336;
}

/* 代码编辑器下方的运行结果区域 */
#monaco-container {
    flex: 1;
    min-height: 200px;
    overflow: hidden;
}

/* 拖拽分隔条 */
.output-resize-handle {
    height: 6px;
    background: #3d3d3d;
    cursor: ns-resize;
    transition: background 0.2s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.output-resize-handle:hover {
    background: #007acc;
}

.output-resize-handle:active {
    background: #007acc;
}

.output-resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 2px;
    background: #666;
    border-radius: 1px;
}

.output-resize-handle:hover::before {
    background: #fff;
}

/* 代码编辑器下方的运行结果区域 */
.code-output-container {
    background: #0c0c0c;
    border: 1px solid #333;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.code-output-container .output-header {
    background: linear-gradient(to bottom, #1f1f1f, #171717);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-output-container .output-header h6 {
    color: #e0e0e0;
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.code-output-container .output-header h6 i {
    color: #4fc3f7;
}

.code-output-container .output-content {
    background: #0c0c0c;
    padding: 0.75rem 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #cccccc;
}

/* 运行状态信息样式 */
.code-output-container .running-status {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.code-output-container .running-message {
    font-weight: 500;
    color: #667eea;
    font-size: 0.9rem;
}

.code-output-container .running-progress-text {
    font-weight: 600;
    color: #667eea;
    font-size: 0.85rem;
    min-width: 50px;
    text-align: right;
}

.code-output-container .running-stage {
    font-size: 0.8rem;
    line-height: 1.4;
}

.code-output-container .running-stage i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.code-output-container .running-status .progress {
    background: rgba(102, 126, 234, 0.2);
    border-radius: 3px;
}

.code-output-container .running-status .progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.code-output-container .output-content::-webkit-scrollbar {
    width: 12px;
}

.code-output-container .output-content::-webkit-scrollbar-track {
    background: #0c0c0c;
    border-left: 1px solid #333;
}

.code-output-container .output-content::-webkit-scrollbar-thumb {
    background: #333;
    border: 2px solid #0c0c0c;
    border-radius: 6px;
}

.code-output-container .output-content::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.code-output-container .output-content:empty::before {
    content: 'C:\\Users\\User>';
    color: #0a0;
    font-style: normal;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.code-output-container .output-content pre {
    color: #cccccc;
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

.code-output-container .output-content .text-danger {
    color: #ff4444;
    font-weight: 500;
    text-shadow: 0 0 2px rgba(255, 68, 68, 0.3);
}

.code-output-container .output-content .text-danger strong {
    color: #ff6666;
}

.code-output-container .output-content .text-muted {
    color: #b0b0b0;
    font-style: normal;
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
}

.code-output-container .output-content .prompt {
    color: #00ff00;
    font-weight: bold;
}

.code-output-container .output-content .path {
    color: #ffff00;
}

.code-output-container .output-content .timestamp {
    color: #888;
}

.code-output-container .output-content .command {
    color: #ffffff;
}

.code-output-container .output-content .warning {
    color: #ffff00;
    text-shadow: 0 0 2px rgba(255, 255, 0, 0.3);
}

.code-output-container .output-content .info {
    color: #00bfff;
    text-shadow: 0 0 2px rgba(0, 191, 255, 0.3);
}

.code-output-container .output-content .system {
    color: #ff00ff;
    text-shadow: 0 0 2px rgba(255, 0, 255, 0.3);
}

/* 运行结果区域底部拖拽手柄 */
.output-bottom-resize-handle {
    height: 10px;
    background: transparent;
    cursor: ns-resize;
    position: relative;
    transition: background-color 0.2s;
    border-bottom: 2px solid #333;
    width: 100%;
}

.output-bottom-resize-handle:hover {
    background: rgba(13, 110, 253, 0.1);
    border-bottom-color: #0d6efd;
}

.output-bottom-resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 3px;
    background: #666;
    border-radius: 2px;
    opacity: 0.5;
    transition: opacity 0.2s, background 0.2s;
}

.output-bottom-resize-handle:hover::before {
    background: #0d6efd;
    opacity: 1;
}

/* 运行结果面板切换按钮 */
.output-toggle-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: auto;
    transition: color 0.2s, background-color 0.2s;
    border-radius: 4px;
}

.output-toggle-btn:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.output-toggle-btn i {
    font-size: 0.8rem;
}

/* 运行结果面板收起状态 */
.code-output-container.collapsed {
    height: auto !important;
    min-height: auto !important;
}

.code-output-container.collapsed .output-content {
    display: none;
}

.code-output-container.collapsed .output-bottom-resize-handle {
    display: none;
}

/* 全屏模式下的浮动切换按钮 */
.fullscreen-output-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(13, 110, 253, 0.8);
    border: 2px solid #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fullscreen-output-toggle:hover {
    background: rgba(13, 110, 253, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.fullscreen-output-toggle:active {
    transform: scale(0.95);
}

.fullscreen-output-toggle i {
    color: white;
    font-size: 1.5rem;
}

.code-panel .btn-primary:active {
    background: linear-gradient(135deg, #0a53be 0%, #084298 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

/* 渐变背景样式 */
.bg-primary-gradient {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), rgba(102, 16, 242, 0.05));
}

/* 统计信息栏样式 */
.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: rgba(13, 202, 240, 0.2);
    color: #0f5132;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 500;
}

.alert-info .text-success {
    color: #198754;
    font-weight: 700;
}

.alert-info .text-primary {
    color: #0d6efd;
    font-weight: 700;
}

/* 1. 题目卡片样式 - 学生端特有 */
.problem-card {
    border: 1px solid #f5f5f5;
    border-radius: 0.8rem;
    transition: all 0.25s ease;
    height: 100%;
    /* min-height: 200px; */
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    background: #ffffff;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.problem-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #e5e7eb;
}

.problem-card:hover::before {
    transform: scaleX(1);
}

.problem-card .card-header {
    padding: 1rem;
    background-color: #fefefe;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.problem-card .card-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    color: #374151;
    transition: color 0.2s ease;
    flex: 1;
    letter-spacing: -0.005em;
}

.problem-card:hover .card-title {
    color: #3b82f6;
}

.problem-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.problem-card .card-text {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.problem-card:hover .card-text {
    color: #4b5563;
}

.problem-card .card-footer {
    padding: 0.875rem 1rem;
    background-color: #fefefe;
    border-top: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* 难度等级样式 */
.badge.easy {
    background-color: #198754;
    color: white;
}

.badge.medium {
    background-color: #ffc107;
    color: #212529;
}

.badge.hard {
    background-color: #dc3545;
    color: white;
}

/* 状态指示器 */
.status-indicator {
    display: flex;
    align-items: center;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .problem-card {
        min-height: 160px;
    }
    
    .problem-card .card-title {
        font-size: 0.9rem;
    }
}

/* 8. 表格模式样式 */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.08);
    transition: all 0.3s ease;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.table thead.table-light {
    background: linear-gradient(90deg, #f8f9fa, #eef1f5);
    border-bottom: 2px solid #dee2e6;
}

.table thead th {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody td {
    color: #6c757d;
    font-size: 0.9rem;
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody td h6 {
    color: #212529;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.table tbody td p {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 表格中的按钮样式 */
.table .btn-sm {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.table .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* 表格中的徽章样式 */
.table .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
}

/* 表格序号列 */
.table tbody td:first-child {
    font-weight: 600;
    color: #0d6efd;
}

/* 博主推荐视频模块样式 */
.card.shadow-sm.mt-4 {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card.shadow-sm.mt-4 .card-header {
    background: #f8f9fa;
    color: #495057;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.card.shadow-sm.mt-4 .card-header h6 {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card.shadow-sm.mt-4 .card-header i {
    font-size: 1.1rem;
    color: #007bff;
}

.card.shadow-sm.mt-4 .card-body {
    padding: 1rem;
}

.card.shadow-sm.mt-4 .list-unstyled {
    margin: 0;
    padding: 0;
}

.card.shadow-sm.mt-4 .list-unstyled li {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.card.shadow-sm.mt-4 .list-unstyled li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.card.shadow-sm.mt-4 .list-unstyled li a {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.card.shadow-sm.mt-4 .list-unstyled li a i {
    color: #007bff;
    font-size: 1rem;
}

/* 表格响应式设计 */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .table thead {
        display: none;
    }
    
    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }
    
    .table tr {
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
        border-radius: 0.5rem;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .table td {
        padding: 0.75rem 1rem;
        text-align: right;
        position: relative;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .table td:last-child {
        border-bottom: none;
    }
    
    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 0.75rem;
        font-weight: 600;
        color: #495057;
        text-align: left;
    }
}

/* B站视频模块样式 */
.bilibili-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: -0.5rem;
}

.video-card {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #0d6efd;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #f8f9fa;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.video-info {
    padding: 0.75rem;
}

.video-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.video-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.video-card:hover .video-title a {
    color: #0d6efd;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6c757d;
}

.video-views, .video-likes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-views i, .video-likes i {
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .video-card {
        flex: 1 1 calc(33.333% - 1rem);
        max-width: calc(33.333% - 1rem);
    }
}

@media (max-width: 992px) {
    .video-card {
        flex: 1 1 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 576px) {
    .video-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ===== 编辑器样式 ===== */
.editor-container {
    display: flex;
    flex-direction: row !important;
    height: calc(100vh - 100px);
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 合并到上面的problem-panel样式 */

.problem-panel h6 {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.problem-panel h6 i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

.problem-panel .input-output {
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
}

.problem-panel .input, .problem-panel .output {
    padding: 0.75rem;
}

.problem-panel .input {
    background-color: #fff;
}

.problem-panel .output {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.problem-panel .label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.problem-panel pre {
    margin: 0;
    font-size: 0.875rem;
    background-color: transparent;
    border: none;
}

.resize-handle {
    width: 8px;
    background-color: #dee2e6;
    cursor: col-resize;
    transition: background-color 0.2s ease;
    position: relative;
}

.resize-handle:hover {
    background-color: #0d6efd;
}

.resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 30px;
    background-color: #adb5bd;
    opacity: 0.8;
}

.resize-handle:hover::after {
    background-color: #fff;
    opacity: 1;
}

/* 合并到上面的code-panel样式 */

.code-panel h6 {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.code-panel h6 i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

#monaco-container {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
    min-height: 400px;
}

/* 语言选择器样式 */
.language-selector {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector label {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.language-selector select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #212529;
    background-color: #fff;
}

/* 编辑器响应式设计 */
@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
        height: auto;
        min-height: 600px;
    }
    
    .problem-panel {
        flex: 0 0 auto;
        max-width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .resize-handle {
        display: none;
    }
    
    .code-panel {
        flex: 1;
        min-width: auto;
    }
}

/* AI学习建议模块样式 */
.motivation-container {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.motivation-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.motivation-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.motivation-header:hover {
    background-color: #eef1f5;
}

.motivation-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.motivation-content {
    padding: 1rem;
    background-color: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
}

.motivation-markdown {
    color: #6c757d;
    line-height: 1.6;
}

.motivation-markdown h1,
.motivation-markdown h2,
.motivation-markdown h3 {
    color: #212529;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.motivation-markdown p {
    margin-bottom: 1rem;
}

.motivation-markdown ul,
.motivation-markdown ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.motivation-markdown li {
    margin-bottom: 0.5rem;
}

.motivation-markdown code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
}

.motivation-markdown pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.motivation-markdown pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* 排行榜样式 */
.card.mb-4.shadow-sm {
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.card.mb-4.shadow-sm:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-direction: column;
}

.card.shadow-sm .card-header h6 {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.card.shadow-sm .card-header small {
    white-space: nowrap;
    align-self: center;
}

.card.mb-4.shadow-sm .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card.mb-4.shadow-sm .card-header h6 {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.card.mb-4.shadow-sm .card-header small {
    white-space: nowrap;
    align-self: center;
}

.card.mb-4.shadow-sm .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.card.mb-4.shadow-sm .card-body {
    padding: 1rem;
}

.card.mb-4.shadow-sm .d-flex.align-items-center.p-2.mb-2.rounded {
    transition: all 0.2s ease;
}

.card.mb-4.shadow-sm .d-flex.align-items-center.p-2.mb-2.rounded:hover {
    transform: translateX(4px);
}

.card.mb-4.shadow-sm .rank-number {
    width: 40px;
    text-align: center;
}

.card.mb-4.shadow-sm .font-weight-bold {
    font-weight: 600;
    color: #212529;
}

.card.mb-4.shadow-sm .badge.bg-primary {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* 分页控件样式 */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    padding-left: 0;
    list-style: none;
    border-radius: 0.375rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* width: 40px; */
    height: 40px;
    padding: 0.5rem;
    margin-left: -1px;
    line-height: 1;
    color: #0d6efd;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
}

.pagination .page-link i {
    font-size: 0.9rem;
}

.pagination .page-link:hover:not(.active) {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transform: translateY(-1px);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    opacity: 0.6;
}

/* 分页控件响应式设计 */
@media (max-width: 576px) {
    .pagination .page-link {
        width: 35px;
        height: 35px;
        padding: 0.375rem;
        font-size: 0.85rem;
    }
    
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        width: auto;
        padding: 0.375rem 0.5rem;
    }
    
    /* 在移动端隐藏部分页码，只显示当前页前后各一页 */
    .pagination .page-item:not(:first-child):not(:last-child):not(.active):not(:nth-child(2)):not(:nth-last-child(2)) {
        display: none;
    }
}

/* 分页控件特殊样式 */
.pagination .page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* 历史提交记录样式 */
.history-submissions {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 10px;
}

/* 历史提交记录卡片样式 */
.submission-item {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.submission-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* 代码展示区域样式 */
.code-display {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    background-color: #fefefe;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.8rem;
    font-size: 0.9rem;
    white-space: pre;
    font-family: 'Courier New', Courier, monospace;
}

/* 代码内容容器 */
.code-content {
    transition: all 0.3s ease;
    position: relative;
}

/* 折叠状态的代码容器 */
.code-content.collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

/* 折叠状态的代码容器添加渐变遮罩 */
.code-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, #f8f9fa);
}

/* 评论内容容器 */
.comment-content {
    transition: max-height 0.3s ease;
    overflow: hidden;
    max-height: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.8rem;
}

/* 折叠状态的评论容器 */
.comment-content.collapsed {
    max-height: 150px;
    overflow-y: auto;
    background-color: transparent;
    border: 1px solid transparent;
}

/* 折叠/展开按钮样式 */
.code-toggle {
    cursor: pointer;
    color: #0d6efd;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.code-toggle:hover {
    color: #0551c6;
    text-decoration: underline;
}

/* 状态标签样式 */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* 确保不同背景色的badge文字颜色清晰 */
.badge.bg-warning, .badge.bg-secondary, .badge.bg-info, .badge.bg-primary {
    color: floralwhite;
}

/* 复制按钮样式 */
.btn-outline-secondary {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 显示模式切换按钮组样式 */
.btn-group .btn {
    border-radius: 0.375rem !important;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.btn-group .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.btn-group .btn:not(.active):hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* 2. 编辑器布局 - 学生端特有 */
/* 已在第256行定义了基础布局，这里添加额外样式 */
.editor-container {
    background: white;
}

.editor-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* 问题面板和代码面板 - 学生端特有 */
.problem-panel, .code-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.problem-panel {
    flex: 0 0 40%;
    max-width: 70%;
    transition: all 0.3s ease;
}

.problem-panel.hidden {
    flex-basis: 0;
    max-width: 0;
    overflow: hidden;
}

.code-panel {
    flex: 1;
    min-width: 30%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    padding-bottom: 0;
}

.resize-handle {
    width: 8px;
    background-color: #dee2e6;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.2s;
}

.resize-handle:hover {
    background-color: #adb5bd;
}

/* 排行榜样式 */
.card.mb-4.shadow-sm {
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.card.mb-4.shadow-sm:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card.mb-4.shadow-sm .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.card.mb-4.shadow-sm .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.card.mb-4.shadow-sm .card-body {
    padding: 1rem;
}

.card.mb-4.shadow-sm .d-flex.align-items-center.p-2.mb-2.rounded {
    transition: all 0.2s ease;
}

.card.mb-4.shadow-sm .d-flex.align-items-center.p-2.mb-2.rounded:hover {
    transform: translateX(4px);
}

.card.mb-4.shadow-sm .rank-number {
    width: 40px;
    text-align: center;
}

.card.mb-4.shadow-sm .font-weight-bold {
    font-weight: 600;
    color: #212529;
}

.card.mb-4.shadow-sm .badge.bg-primary {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* 3. 提问卡片 - 学生端特有 */
.question-card {
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    height: 100%;
}

.question-card:hover {
    border-color: #8B93FF;
    box-shadow: 0 2px 8px rgba(139, 147, 255, 0.15);
}

.question-card .card-header {
    padding: 1rem;
    background: transparent;
    border-bottom: 1px solid #f3f4f6;
}

.question-card .card-body {
    padding: 1rem;
}

.question-card .card-footer {
    padding: 0.75rem 1rem;
    background: #fafbfc;
    border-top: 1px solid #f3f4f6;
}

/* 4. 编辑答案布局 - 学生端特有 */
.edit-answer-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
}

/* 编辑模式下的垂直选项卡 */
.edit-answer-layout .side-tabs-container {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    z-index: 1000;
    display: flex;
}

/* 编辑模式下的紧凑模式 */
.edit-answer-layout .side-tabs-container.compact {
    position: fixed !important;
    margin-left: -48px !important;
    z-index: 1060 !important;
}

/* 编辑模式下模态框中的调整 */
.modal.show .edit-answer-layout .side-tabs-container {
    left: 50% !important;
    margin-left: calc(-50vw + 24px) !important;
}

/* 编辑模式下问题面板和选项卡的联动 */
.edit-answer-layout .problem-panel:not(.hidden) ~ .side-tabs-container {
    left: calc(40% - 48px) !important;
}

.edit-answer-layout .problem-panel.hidden ~ .side-tabs-container {
    left: -48px !important;
}

/* 通用垂直选项卡样式 */
.vertical-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white;
    border-radius: 8px;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    padding: 8px 4px;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    background: #f8f9fa;
    min-height: 50px;
    border-radius: 4px;
}

.tab-item:hover {
    background: #e9ecef;
    border-left-color: #adb5bd;
}

.tab-item.active {
    background: #0d6efd;
    color: white;
    border-left-color: #0a58ca;
}

.tab-item i {
    font-size: 20px;
    margin-bottom: 6px;
}

.tab-item span {
    font-size: 12px;
    font-weight: 600;
}

/* 5. 普通编辑器布局 - 学生端特有 */
.normal-editor-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}

.normal-editor-layout .side-tabs-container {
    /* 重置所有可能影响普通模式的样式 */
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
}

/* 确保普通模式的布局正确 */
.normal-editor-layout .problem-panel,
.normal-editor-layout .code-panel {
    position: relative;
}

/* 普通模式下的分隔条样式 */
.normal-editor-layout .resize-handle {
    width: 8px;
    background-color: #dee2e6;
    cursor: col-resize;
    position: relative;
}

/* 6. 三列布局样式 - 学生端特有 */
.editor-three-column-layout {
    display: flex;
    height: calc(100vh - 100px);
    width: 100%;
    position: relative;
}

/* 左侧选项卡列 */
.editor-three-column-layout .side-tabs-container {
    flex: 0 0 auto;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 9%;
    z-index: 1000;
    background-color: transparent;
    transition: all 0.3s ease;
}

.editor-three-column-layout .side-tabs-container.hidden {
    width: 0;
    overflow: hidden;
    border-right: none;
}

/* 主编辑器列 */
.editor-three-column-layout .editor-fullscreen {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* 调整编辑器容器的位置 */
.editor-three-column-layout .editor-container {
    width: 100%;
    height: 100%;
    border-left: none;
    border: 1px solid #dee2e6;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 编辑模式下的布局调整 */
.editor-three-column-layout .edit-answer-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}

/* 普通模式下的布局调整 */
.editor-three-column-layout .normal-editor-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
}

/* 编辑器容器内的代码面板样式 */
.editor-three-column-layout .code-panel {
    flex: 1;
    background-color: #fff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
    position: relative;
    height: 100%;
}

.editor-three-column-layout .code-panel .d-flex.justify-content-between.align-items-center.mb-3 {
    flex-shrink: 0;
}

.editor-three-column-layout .code-panel .editor-content {
    flex: 1;
    min-height: 300px;
    height: 100%;
    margin-bottom: 0;
}

/* 垂直选项卡样式 */
.editor-three-column-layout .vertical-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 8px 4px;
}

.editor-three-column-layout .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    background: #f8f9fa;
    min-height: 50px;
    border-radius: 4px;
}

.editor-three-column-layout .tab-item:hover {
    background: #e9ecef;
    border-left-color: #adb5bd;
}

.editor-three-column-layout .tab-item.active {
    background: #0d6efd;
    color: white;
    border-left-color: #0a58ca;
}

.editor-three-column-layout .tab-item i {
    font-size: 20px;
    margin-bottom: 6px;
}

.editor-three-column-layout .tab-item span {
    font-size: 12px;
    font-weight: 600;
}

/* 7. 学生端响应式设计 */
@media (max-width: 768px) {
    .editor-body {
        flex-direction: column;
    }

    .problem-panel {
        flex-basis: 40%;
        max-width: 100%;
    }

    .resize-handle {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
}

/* 分类卡片样式 */
.category-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    align-items: center;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.category-card:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-card.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-control-item {
    flex: 0 1 auto;
    min-width: 140px;
}

.filter-control-item input.form-control {
    border-radius: 6px;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.filter-control-item input.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.filter-control-item .input-group-text {
    border-radius: 6px 0 0 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-right: none;
    padding: 8px 12px;
}

.filter-control-item .input-group .form-control {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.filter-control-item .input-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    border-radius: 6px;
}

.filter-control-item .input-group:focus-within .input-group-text,
.filter-control-item .input-group:focus-within .form-control {
    border-color: #0d6efd;
}

.filter-control-item .form-select {
    border-radius: 6px;
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-control-item .form-select:hover {
    border-color: #adb5bd;
}

.filter-control-item .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.filter-control-item .btn-group {
    display: flex;
    gap: 2px;
}

.filter-control-item .btn-group .btn {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-control-item .btn-group .btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

@media (max-width: 768px) {
    .filter-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-control-item {
        min-width: 100%;
    }
    
    .filter-control-item .btn-group {
        width: 100%;
    }
    
    .filter-control-item .btn-group .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .category-card {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .category-card .category-icon {
        font-size: 16px;
    }
    
    .category-card .category-name {
        font-size: 13px;
    }
}

.category-card.category-all {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.category-card.category-all:hover {
    background: #5a6268;
    border-color: #5a6268;
}

.category-card.category-all.active {
    background: #0d6efd;
    border-color: #0d6efd;
}

.category-icon {
    font-size: 16px;
}

.category-name {
    white-space: nowrap;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .category-card {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .category-cards-container {
        gap: 6px;
    }
    
    .category-card {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .category-icon {
        font-size: 14px;
    }
}

/* 文本截断 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 实战案例卡片样式 ===== */
.case-card {
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: #0d6efd;
}

.case-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.case-card .card-title {
    font-weight: 600;
    font-size: 1.15rem;
    transition: color 0.3s ease;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8rem;
}

.case-card:hover .card-title {
    color: #0d6efd;
}

.case-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    min-height: 4.8rem;
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.case-card .mb-3 {
    margin-bottom: 1rem !important;
    flex-shrink: 0;
}

.case-card .text-sm {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    margin-bottom: 0.5rem;
}

.case-tags {
    gap: 0.5rem;
    display: flex;
    flex-wrap: wrap;
}

.case-tags .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
}

.case-tags .badge:hover {
    transform: scale(1.05);
    background: #e9ecef;
    border-color: #0d6efd;
    color: #0d6efd;
}

.case-thumbnail-container {
    margin-top: auto;
    padding-top: 1rem;
}

.case-thumbnail-container .btn {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.case-thumbnail-container .btn:hover {
    background: #0d6efd;
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* VIP卡片加载状态 */
.vip-problem-grid {
    max-height: 500px;
    overflow-y: auto;
}

.vip-problem-grid::-webkit-scrollbar {
    width: 8px;
}

.vip-problem-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.vip-problem-grid::-webkit-scrollbar-thumb {
    background: #ffc107;
    border-radius: 4px;
}

.vip-problem-grid::-webkit-scrollbar-thumb:hover {
    background: #ff9800;
}

/* 分享状态指示器 */
.share-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    cursor: help;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-indicator:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
}

.share-indicator i {
    display: block;
    line-height: 1;
}

/* 分享对话框响应式优化 */
.custom-modal-content[style*="max-width: 900px"] {
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1400px) {
    .custom-modal-content[style*="max-width: 900px"] {
        max-width: 850px;
        max-height: 91vh;
    }
}

@media (max-width: 1200px) {
    .custom-modal-content[style*="max-width: 900px"] {
        max-width: 95vw;
        max-height: 92vh;
    }
}

@media (max-width: 992px) {
    .custom-modal-content[style*="max-width: 900px"] {
        max-width: 98vw;
        max-height: 94vh;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .row {
        flex-direction: column;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .col-md-4,
    .custom-modal-content[style*="max-width: 900px"] .col-md-8 {
        width: 100%;
        padding: 0.5rem 0;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .border-end {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .custom-modal-content[style*="max-width: 900px"] {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-header,
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-body,
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-header {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-body {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-footer {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        flex-direction: column;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-title {
        font-size: 1.1rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .custom-modal-close {
        font-size: 1.25rem;
        padding: 0.25rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] textarea {
        min-height: 120px;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .custom-modal-content[style*="max-width: 900px"] .form-text {
        font-size: 0.75rem;
    }
}

/* Modal-XL响应式优化 */
@media (max-width: 1400px) {
    .modal-xl .custom-modal-content {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .modal-xl .custom-modal-content {
        max-width: 900px;
    }
}

@media (max-width: 992px) {
    .modal-xl .custom-modal-content {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .modal-xl .custom-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-xl .custom-modal-header,
    .modal-xl .custom-modal-body,
    .modal-xl .custom-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .modal-xl .custom-modal-footer {
        flex-direction: column;
    }
    
    .modal-xl .custom-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-xl .custom-modal-footer .custom-btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .modal-xl .custom-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}

/* Modal-LG响应式优化 */
@media (max-width: 1200px) {
    .modal-lg .custom-modal-content {
        max-width: 800px;
    }
}

@media (max-width: 992px) {
    .modal-lg .custom-modal-content {
        max-width: 650px;
    }
}

@media (max-width: 768px) {
    .modal-lg .custom-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-lg .custom-modal-header,
    .modal-lg .custom-modal-body,
    .modal-lg .custom-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .modal-lg .custom-modal-footer {
        flex-direction: column;
    }
    
    .modal-lg .custom-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-lg .custom-modal-footer .custom-btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .modal-lg .custom-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}

/* ===== 悬浮AI建议图标样式 ===== */

.ai-suggestion-float-icon {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.ai-suggestion-float-icon:hover .ai-icon-wrapper {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ai-icon {
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
}

.ai-suggestion-float-icon:hover .ai-icon {
    transform: rotate(10deg);
}

.ai-notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s ease-in-out infinite;
}

.ai-tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-suggestion-float-icon:hover .ai-tooltip {
    opacity: 1;
    visibility: visible;
    left: 75px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* AI建议模态框内容样式 */
.ai-suggestion-content {
    max-height: 60vh;
    overflow-y: auto;
}

.ai-suggestion-markdown {
    line-height: 1.8;
    color: #333;
}

.ai-suggestion-markdown h1,
.ai-suggestion-markdown h2,
.ai-suggestion-markdown h3,
.ai-suggestion-markdown h4,
.ai-suggestion-markdown h5,
.ai-suggestion-markdown h6 {
    color: #667eea;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.ai-suggestion-markdown h1 {
    font-size: 2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.ai-suggestion-markdown h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3rem;
}

/* 实战案例卡片样式 */
.case-card {
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef !important;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* 案例标题 */
.case-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.case-card:hover .card-title {
    color: #0d6efd;
}

/* 案例描述 */
.case-card .card-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    min-height: 80px;
}

/* 技术点标题 */
.case-card h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 案例标签 */
.case-tags {
    margin-bottom: 1rem;
}

.case-tags .badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.case-tags .badge:hover {
    transform: scale(1.05);
    border-color: #0d6efd;
}

/* 案例按钮 */
.case-card .btn-outline-primary {
    font-size: 0.85rem;
    padding: 0.4rem 0;
    transition: all 0.3s ease;
}

.case-card .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}



/* 缩略图容器 */
.case-thumbnail-container {
    margin-top: 1rem;
}

/* 案例播放器内联容器样式 */
.case-player-container {
    width: 100%;
}

.case-player-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.case-player-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.case-player-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}

.case-player-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
}

.case-video-container {
    display: flex;
    flex-direction: column;
}

.case-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.case-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.case-video-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-top: 56.25%;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    position: relative;
}

.case-video-placeholder i {
    font-size: 64px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.case-video-placeholder p {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.case-description-container {
    display: flex;
    flex-direction: column;
}

.case-description-container h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.case-description-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.case-description-container h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .case-player-body {
        grid-template-columns: 1fr;
    }
    
    .case-video-container {
        order: 1;
    }
    
    .case-description-container {
        order: 2;
    }
}

@media (max-width: 768px) {
    .case-player-container {
        padding: 16px;
    }
    
    .case-player-header {
        padding: 12px 16px;
    }
    
    .case-player-body {
        padding: 16px;
        gap: 16px;
    }
    
    .case-player-header h4 {
        font-size: 1rem;
    }
}

.ai-suggestion-markdown h3 {
    font-size: 1.25rem;
}

.ai-suggestion-markdown p {
    margin-bottom: 1rem;
}

.ai-suggestion-markdown ul,
.ai-suggestion-markdown ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.ai-suggestion-markdown li {
    margin-bottom: 0.5rem;
}

.ai-suggestion-markdown code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e83e8c;
}

.ai-suggestion-markdown pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.ai-suggestion-markdown pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.ai-suggestion-markdown blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.ai-suggestion-markdown a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ai-suggestion-markdown a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.ai-suggestion-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.ai-suggestion-markdown th,
.ai-suggestion-markdown td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.ai-suggestion-markdown th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.ai-suggestion-markdown tr:nth-child(even) {
    background: #f8f9fa;
}

.ai-suggestion-markdown img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* 移动端响应式适配 */
@media (max-width: 768px) {
    .ai-suggestion-float-icon {
        left: 10px;
    }
    
    .ai-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .ai-icon {
        font-size: 24px;
    }
    
    .ai-notification-dot {
        width: 14px;
        height: 14px;
    }
    
    .ai-tooltip {
        display: none;
    }
    
    .ai-suggestion-content {
        max-height: 70vh;
    }
}

@media (max-width: 576px) {
    .ai-suggestion-float-icon {
        left: 5px;
    }
    
    .ai-icon-wrapper {
        width: 45px;
        height: 45px;
    }
    
    .ai-icon {
        font-size: 20px;
    }
    
    .ai-notification-dot {
        width: 12px;
        height: 12px;
    }
    
    .ai-suggestion-content {
        max-height: 80vh;
    }
    
    .ai-suggestion-markdown h1 {
        font-size: 1.5rem;
    }
    
    .ai-suggestion-markdown h2 {
        font-size: 1.25rem;
    }
    
    .ai-suggestion-markdown h3 {
        font-size: 1.1rem;
    }
}

/* 全局通知组件样式 */
.global-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
    font-size: 14px;
}

.notification-content span {
    flex: 1;
    margin-right: 15px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* 不同类型通知的样式 */
.notification-success {
    background-color: #28a745;
}

.notification-danger {
    background-color: #dc3545;
}

.notification-warning {
    background-color: #ffc107;
    color: #333;
}

.notification-warning .notification-close {
    color: #333;
}

.notification-info {
    background-color: #17a2b8;
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 分类卡片热门样式 */
.category-card.hot {
    border: 1px solid #ff6b35;
}

.hot-badge {
    background-color: #ff6b35;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

