/* 漏洞学习与实践页面样式 - 暗黑主题 */

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #e0e6ed;
    background-color: #0f1419;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #1a1f2e 0%, #16213e 100%);
    color: #e0e6ed;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #2a3441;
}

/* .breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
} */

.page-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #e0e6ed;
}

.page-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #a0aab5;
}

/* 主要内容区域 */
.learn-practice-page {
    min-height: 100vh;
    background-color: #0f1419;
}

.main-content {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    margin: 0 auto;
    padding: 2rem;
     flex-grow: 1;
    padding-top: calc(var(--header-height) + 24px);
}

/* 主要内容区域 */


/* 左侧理论学习区域 */
.theory-section {
    background: #161b22;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    height: fit-content;
    border: 1px solid #2a3441;
}

.theory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a3441;
}

.theory-header h2 {
    color: #e0e6ed;
    font-size: 1.3rem;
}

.learning-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #a0aab5;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4aa, #00b894);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 选项卡导航 */
.theory-tabs {
    display: flex;
    border-bottom: 2px solid #2a3441;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #a0aab5;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: #00ff88;
    border-bottom-color: #00ff88;
}

/* 学习内容区域 */
.theory-content {
    margin-bottom: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-block h3 {
    color: #e0e6ed;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.content-block h4 {
    color: #00ff88;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1rem;
}

.content-block p {
    color: #a0aab5;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-block ul,
.content-block ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-block li {
    color: #a0aab5;
    margin-bottom: 0.5rem;
}

/* 风险等级样式 */
.risk-level {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.risk-level.high {
    background: #2d1b1b;
    border-left: 4px solid #ff6b6b;
    border: 1px solid #3d2828;
}

.risk-badge {
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 代码块样式 */
.code-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.code-block code {
    background: none;
    padding: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #00ff88;
}

/* 攻击步骤样式 */
.attack-steps {
    counter-reset: step-counter;
}

.attack-steps li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.attack-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: #00d4aa;
    color: #0f1419;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 学习笔记区域 */
.notes-section {
    border-top: 1px solid #2a3441;
    padding-top: 1.5rem;
}

.notes-section h3 {
    color: #e0e6ed;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.notes-input {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #2a3441;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
    background: #0d1117;
    color: #e0e6ed;
}

.notes-input:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

/* 右侧实践操作区域 */
.practice-section {
    background: #161b22;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    height: fit-content;
    border: 1px solid #2a3441;
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a3441;
}

.practice-header h2 {
    color: #e0e6ed;
    font-size: 1.3rem;
}

.environment-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #a0aab5;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.timer {
    color: #ff6b6b;
    font-weight: 500;
}

/* 环境控制面板 */
.environment-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success {
    background: #00d4aa;
    color: #0f1419;
}

.btn-success:hover {
    background: #00b894;
}

.btn-warning {
    background: #fdcb6e;
    color: #0f1419;
}

.btn-warning:hover {
    background: #e17055;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #e55656;
}

.btn-primary {
     background: linear-gradient(135deg, var(--accent-green-hover), #00aa55);
    color: white;
}

.btn-primary:hover {
       background: #04911e;
}

.connection-info {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #0d1117;
    border-radius: 6px;
    border: 1px solid #2a3441;
    color: #a0aab5;
}

.connection-info a {
    color: #00ff88;
    text-decoration: none;
}

.connection-info a:hover {
    text-decoration: underline;
}

/* 实验指导 */
.experiment-guide {
    margin-bottom: 1.5rem;
}

.experiment-guide h3 {
    color: #e0e6ed;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #2a3441;
    transition: all 0.3s ease;
    background: #0d1117;
}

.step.completed {
    background: #1b2d1b;
    border-color: #00ff88;
}

.step.active {
    background: #2d2a1b;
    border-color: #fdcb6e;
}

.step-number {
    width: 2rem;
    height: 2rem;
    background: #a0aab5;
    color: #0f1419;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step.completed .step-number {
    background: #00ff88;
    color: #0f1419;
}

.step.active .step-number {
    background: #fdcb6e;
    color: #0f1419;
}


/* 底部交互区域 */
.interaction-footer {
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid #2a3441;
    background-color: #0f1419;
}

.interaction-footer>section {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    border: 1px solid #2a3441;
}

.interaction-footer h3 {
    color: #e0e6ed;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #2a3441;
}

/* Flag提交区域 */
.flag-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.flag-input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #2a3441;
    border-radius: 6px;
    font-size: 1rem;
    background: #0d1117;
    color: #e0e6ed;
}

.flag-input:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.flag-hint p {
    font-size: 0.9rem;
    color: #a0aab5;
}

/* 实验报告区域 */
.report-form .form-group {
    margin-bottom: 1.5rem;
}

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

.report-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #2a3441;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    background: #0d1117;
    color: #e0e6ed;
}

/* 讨论区域 */
.discussion-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.discussion-content .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.username {
    font-weight: bold;
    color: #e0e6ed;
}

.post-time {
    font-size: 0.8rem;
    color: #a0aab5;
}

.discussion-content p {
    color: #a0aab5;
}

.discussion-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

.btn-like,
.btn-reply {
    background: none;
    border: 1px solid #2a3441;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    color: #a0aab5;
}

.btn-like:hover,
.btn-reply:hover {
    background: #2a3441;
    border-color: #00d4aa;
    color: #00d4aa;
}

.new-discussion {
    border-top: 1px solid #2a3441;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.discussion-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #2a3441;
    border-radius: 6px;
    resize: vertical;
    margin-bottom: 1rem;
    background: #0d1117;
    color: #e0e6ed;
}

/* 相关资源推荐 */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.1);
    border-color: #00d4aa;
}

.resource-card h4 a {
    color: #00d4aa;
    text-decoration: none;
    font-size: 1.1rem;
}

.resource-card p {
    font-size: 0.9rem;
    color: #a0aab5;
    margin: 0.5rem 0;
}

.resource-card .difficulty {
    color: #fdcb6e;
}

.resource-card .type {
    font-size: 0.8rem;
    background: #2a3441;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    color: #a0aab5;
    display: inline-block;
}

.step-content h4 {
    color: #e0e6ed;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.step-content p {
    color: #a0aab5;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.step-status {
    font-size: 0.8rem;
    font-weight: 500;
    color: #00d4aa;
}

/* 靶场操作界面 */
.lab-interface {
    border: 1px solid #2a3441;
    border-radius: 8px;
    overflow: hidden;
    background: #0d1117;
}

.lab-tabs {
    display: flex;
    background: #1a1f2e;
    border-bottom: 1px solid #2a3441;
}

.lab-tabs .tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #a0aab5;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.lab-tabs .tab-btn:hover,
.lab-tabs .tab-btn.active {
    color: #00d4aa;
    background: #0d1117;
    border-bottom-color: #00d4aa;
}

.lab-content {
    min-height: 400px;
    background: #0d1117;
}

.tab-pane {
    display: none;
    padding: 1rem;
}

.tab-pane.active {
    display: block;
}

.lab-frame {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 4px;
    background: #0d1117;
}

/* 攻击载荷输入 */
.payload-input {
    margin-bottom: 1.5rem;
}

.payload-input label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e6ed;
}

.payload-input textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid #2a3441;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-bottom: 1rem;
    background: #0d1117;
    color: #00d4aa;
}

.payload-input textarea:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

/* 载荷历史 */
.payload-history h4 {
    color: #e0e6ed;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.history-list {
    list-style: none;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #1a1f2e;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    border: 1px solid #2a3441;
    color: #a0aab5;
}

.result.success {
    color: #00d4aa;
    font-weight: 500;
}

.result.error {
    color: #ff6b6b;
    font-weight: 500;
}

/* 响应结果 */
.response-viewer h4 {
    color: #e0e6ed;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.response-content {
    background: #0d1117;
    border: 1px solid #2a3441;
    border-radius: 6px;
    padding: 1rem;
}

.response-content pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #00d4aa;
}

