/* style.css */
:root {
    --primary-color: #2d3748;
    --secondary-color: #4a5568;
    --accent-color: #4299e1;
    --root-color: #38a169;
    --docs-color: #d69e2e;
    --light-color: #f7fafc;
    --dark-color: #1a202c;
    --success-color: #48bb78;
    --warning-color: #ed8936;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0.5rem;
}

.btn:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
}

.btn.active {
    background-color: var(--primary-color);
}

.btn.secondary {
    background-color: var(--secondary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
}

/* 选择按钮区域 */
.selection-buttons {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* 演示区域 */
.demo-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.file-structure, .settings-preview {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.structure-display {
    background-color: #edf2f7;
    padding: 1.5rem;
    border-radius: 4px;
    font-family: monospace;
    line-height: 1.8;
    min-height: 300px;
}

.file-item {
    padding: 0.2rem 0;
    transition: all 0.3s;
}

.file-item.folder {
    color: var(--primary-color);
    font-weight: bold;
}

.file-item.file {
    color: var(--secondary-color);
}

.file-item.highlight {
    background-color: #e6fffa;
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--root-color);
    font-weight: bold;
}

/* 设置预览 */
.settings-card {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.setting-option {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.setting-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.setting-option input {
    margin-right: 0.5rem;
}

.branch-selection {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.branch-selection label {
    margin-right: 0.5rem;
}

.branch-selection select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #cbd5e0;
}

/* URL预览 */
.url-preview {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.url-display {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    border-radius: 4px;
    font-family: monospace;
    margin: 1.5rem 0;
    font-size: 1.2rem;
}

#url-prefix {
    color: #a0aec0;
}

#url-suffix {
    color: white;
    font-weight: bold;
}

/* 使用场景 */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.case-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.case-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.case-card[data-type="root"] h3 {
    border-color: var(--root-color);
    color: var(--root-color);
}

.case-card[data-type="docs"] h3 {
    border-color: var(--docs-color);
    color: var(--docs-color);
}

.case-card ul {
    list-style-type: none;
}

.case-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.case-card li:last-child {
    border-bottom: none;
}

/* 部署步骤 */
.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.step {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.step:hover {
    transform: translateY(-3px);
}

.step-number {
    background-color: var(--accent-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin-bottom: 0.5rem;
}

/* 页脚 */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--dark-color);
}

#modal-content {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .demo-area, .cases-grid, .steps-container {
        grid-template-columns: 1fr;
    }
    
    .selection-buttons {
        flex-direction: column;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}
