.component-structure {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    border-left: 5px solid #0d6efd;
}
.component-diagram {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px 0;
}
.component-part {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    position: relative;
}
.component-part::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #0d6efd;
    border-radius: 50%;
}
.part-title {
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 8px;
}
.lifecycle-timeline {
    position: relative;
    padding: 30px 0;
}
.lifecycle-timeline::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #0d6efd;
}
.lifecycle-phase {
    position: relative;
    margin-left: 60px;
    margin-bottom: 30px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 3px 5px rgba(0,0,0,0.05);
}
.lifecycle-phase::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #0d6efd;
    border-radius: 50%;
    border: 3px solid white;
}
.phase-icon {
    width: 40px;
    height: 40px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}
.code-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}
@media (max-width: 768px) {
    .code-comparison {
        grid-template-columns: 1fr;
    }
}
.comparison-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}
.comparison-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}
.comparison-body {
    padding: 15px;
    background: white;
}
.interactive-example {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid #e9ecef;
}
.example-preview {
    background: white;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}
.example-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}
.communication-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 30px 0;
}
.communication-flow .arrow {
    text-align: center;
    color: #0d6efd;
    font-size: 1.5rem;
}
.component-box {
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #0d6efd;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.component-box.child {
    border-color: #198754;
}
.component-box.parent {
    border-color: #dc3545;
}
.hook-badge {
    display: inline-block;
    padding: 4px 12px;
    margin: 2px 5px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}
.hook-creation { background: #d1ecf1; color: #0c5460; }
.hook-change { background: #fff3cd; color: #856404; }
.hook-destroy { background: #f8d7da; color: #721c24; }
