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

.chapter-title {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.json-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.json-section h2 {
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 0;
}

.json-section h3 {
    color: #34495e;
    margin-top: 25px;
}

.code-block {
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-comment {
    color: #75715e;
}

.code-keyword {
    color: #66d9ef;
}

.code-string {
    color: #e6db74;
}

.code-number {
    color: #ae81ff;
}

.code-boolean {
    color: #f92672;
}

.code-function {
    color: #a6e22e;
}

.code-class {
    color: #a6e22e;
}

.code-import {
    color: #f92672;
}

.example-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.interactive-demo {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.demo-area {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.demo-panel {
    flex: 1;
    min-width: 300px;
}

.demo-panel textarea {
    width: 100%;
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
}

.demo-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

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

.demo-result {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-wrap;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.tip-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #3498db;
}

.java-method {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    font-family: 'Consolas', 'Monaco', monospace;
}

.method-signature {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.method-description {
    color: #7f8c8d;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.comparison-table th, .comparison-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.comparison-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.library-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.library-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.library-badge {
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.dependency-box {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Consolas', 'Monaco', monospace;
}

@media (max-width: 768px) {
    .demo-area {
        flex-direction: column;
    }

    .demo-panel {
        min-width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .demo-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .library-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .library-badge {
        margin-top: 10px;
    }
}
