.chain-demo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}
.chain-demo:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}
.chain-demo > * {
    position: relative;
    z-index: 1;
}
.chain-link {
    display: inline-block;
    padding: 12px 20px;
    margin: 5px;
    background: white;
    color: #333;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}
.chain-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}
.chain-link.active {
    background: #4CAF50;
    color: white;
}
.chain-arrow {
    color: white;
    font-size: 24px;
    margin: 0 5px;
    vertical-align: middle;
}
.code-comparison {
    display: flex;
    gap: 20px;
    margin: 25px 0;
}
.code-comparison > div {
    flex: 1;
}
@media (max-width: 768px) {
    .code-comparison {
        flex-direction: column;
    }
}
.bad-practice {
    background: linear-gradient(45deg, transparent 95%, #ff6b6b 95%);
    border-left: 4px solid #ff6b6b;
    padding: 15px;
    border-radius: 0 5px 5px 0;
}
.good-practice {
    background: linear-gradient(45deg, transparent 95%, #51cf66 95%);
    border-left: 4px solid #51cf66;
    padding: 15px;
    border-radius: 0 5px 5px 0;
}
.chain-visualization {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    min-height: 200px;
    position: relative;
}
.method-chain {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.method-box {
    padding: 12px 18px;
    background: #3498db;
    color: white;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}
.method-box:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}
.method-box::after {
    content: '→';
    position: absolute;
    right: -15px;
    color: #666;
}
.method-box:last-child::after {
    display: none;
}
.chain-breakpoint {
    background: #e74c3c;
}
.return-value {
    display: inline-block;
    padding: 8px 12px;
    background: #2ecc71;
    color: white;
    border-radius: 4px;
    margin-left: 10px;
    font-size: 12px;
    font-family: monospace;
}
.chain-level {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding-left: 20px;
}
.chain-level::before {
    content: '↳';
    margin-right: 10px;
    color: #666;
}
.example-box {
    background: #e8f4f8;
    border: 1px solid #b3e0f2;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.chain-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}
.chain-table th,
.chain-table td {
    border: 1px solid #dee2e6;
    padding: 15px;
    text-align: left;
}
.chain-table th {
    background-color: #2c3e50;
    color: white;
    font-weight: bold;
}
.chain-table tr:nth-child(even) {
    background-color: #f8f9fa;
}
.chain-table .chainable {
    background-color: rgba(46, 204, 113, 0.1);
}
.chain-table .non-chainable {
    background-color: rgba(231, 76, 60, 0.1);
}
.chain-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}
.flow-step {
    width: 80%;
    padding: 15px;
    margin: 10px 0;
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.flow-step::before {
    content: 'STEP';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #3498db;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
}
.flow-connector {
    width: 2px;
    height: 20px;
    background: #3498db;
}
.debug-panel {
    background: #2c3e50;
    color: #ecf0f1;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    font-family: 'Courier New', monospace;
}
.debug-output {
    height: 150px;
    overflow-y: auto;
    background: #34495e;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}
.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #4a6278;
    font-size: 13px;
}
.performance-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}
.performance-meter {
    flex: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin: 0 20px;
}
.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 1s;
}
.interactive-demo {
    background: #f1f8ff;
    border: 2px dashed #0366d6;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    min-height: 300px;
}
.demo-element {
    width: 100px;
    height: 100px;
    background: #3498db;
    margin: 20px auto;
    border-radius: 8px;
    transition: all 0.5s;
}
.plugin-chain {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
