/* 合并后的生命周期幻灯片样式 */
.lifecycle-timeline {
    margin: 20px 0;
    background: linear-gradient(135deg, #F8FAFC, #FFFFFF);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lifecycle-timeline h3 {
    color: #1565C0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
}

.timeline-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.timeline-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
}

.stage-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.stage-label {
    font-weight: bold;
    color: #1565C0;
    font-size: 0.9em;
}

.timeline-arrow {
    color: #90A4AE;
    font-size: 1.5em;
    font-weight: bold;
}

.lifecycle-details {
    margin: 30px 0;
}

.stage-details {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #2196F3;
}

.detail-section h4 {
    color: #1565C0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.detail-content {
    display: grid;
    gap: 15px;
}

.detail-item strong {
    color: #1976D2;
    display: block;
    margin-bottom: 8px;
}

.detail-item ul {
    margin: 0;
    padding-left: 20px;
}

.detail-item li {
    margin-bottom: 5px;
    color: #424242;
}

.highlight {
    background: linear-gradient(120deg, #FFE082, #FFC107);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #E65100;
}

.trigger-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.condition {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1565C0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.memory-allocation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.memory-location {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.initialization-note {
    background: #FFF8E1;
    border: 1px solid #FFD54F;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    color: #F57F17;
}

.runtime-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.feature-group {
    background: #F8F9FA;
    border-radius: 8px;
    padding: 15px;
}

.feature-group strong {
    color: #1976D2;
    display: block;
    margin-bottom: 10px;
}

.unload-conditions {
    margin-bottom: 15px;
}

.unload-reality {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.reality-note {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    color: #2E7D32;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.memory-evolution {
    margin: 30px 0;
    background: linear-gradient(135deg, #FAFAFA, #FFFFFF);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.memory-evolution h3 {
    color: #1565C0;
    margin-bottom: 20px;
    text-align: center;
}

.evolution-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.evolution-stage {
    text-align: center;
}

.version-label {
    font-weight: bold;
    color: #424242;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.memory-area {
    border-radius: 12px;
    padding: 15px;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.memory-area.permgen {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border: 2px solid #F44336;
}

.memory-area.metaspace {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    border: 2px solid #4CAF50;
}

.area-name {
    display: block;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.memory-area.permgen .area-name {
    color: #C62828;
}

.memory-area.metaspace .area-name {
    color: #2E7D32;
}

.area-desc {
    display: block;
    font-size: 0.85em;
    color: #666;
}

.evolution-arrow {
    font-size: 2em;
    color: #90A4AE;
    font-weight: bold;
}

.evolution-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.benefit {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    color: #2E7D32;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .timeline-arrow {
        transform: rotate(90deg);
    }
    
    .runtime-features {
        grid-template-columns: 1fr;
    }
    
    .evolution-timeline {
        flex-direction: column;
        gap: 20px;
    }
    
    .evolution-arrow {
        transform: rotate(90deg);
    }
}

/* 幻灯片 4: 静态 vs 非静态对比 */
.comparison-container {
    margin: 20px 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 100%;
}
.comparison-table {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(200px, 2fr) minmax(200px, 2fr);
    gap: 0;
    width: 100%;
}
.table-header {
    display: contents;
}
.header-cell {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
}
.static-header {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}
.instance-header {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
}
.table-row {
    display: contents;
}
.table-row:nth-child(even) .feature-cell,
.table-row:nth-child(even) .static-cell,
.table-row:nth-child(even) .instance-cell {
    background: #F8F9FA;
}
.feature-cell {
    background: #E3F2FD;
    padding: 15px;
    font-weight: bold;
    color: #1565C0;
    border-right: 1px solid #E0E0E0;
}
.static-cell {
    background: #FFF3E0;
    padding: 15px;
    border-right: 1px solid #E0E0E0;
    color: #E65100;
}
.instance-cell {
    background: #E8F5E8;
    padding: 15px;
    color: #2E7D32;
}
.code-comparison, .usage-example {
    margin: 30px 0;
    border-radius: 8px;
    padding: 20px;
}
.code-comparison {
    background: #F5F5F5;
    border-left: 4px solid var(--primary-color);
}
.usage-example {
    background: #F0F8FF;
    border-left: 4px solid var(--accent-color);
}
.code-comparison h3,
.usage-example h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* 幻灯片 5: 静态变量动画演示 */
.static-variable-animation {
    background: linear-gradient(135deg, #FFFFFF, #F8FAFC);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.static-variable-animation .animation-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}
.static-variable-animation .class-template {
    background: linear-gradient(135deg, #E1F5FE, #B3E5FC);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    text-align: center;
}
.static-variable-animation .class-title {
    color: var(--accent-color);
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
}
.static-variable-animation .static-variable {
    background: #FFE0B2;
    border: 2px solid #FF9800;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    position: relative;
}
.static-variable-animation .var-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    color: #E65100;
    font-weight: bold;
}
.static-variable-animation .static-counter {
    font-size: 2em;
    font-weight: bold;
    color: #FF5722;
    margin-top: 5px;
    transition: all 0.5s ease;
}
.static-variable-animation .static-counter.highlight {
    transform: scale(1.3);
    color: #D32F2F;
    text-shadow: 0 0 10px rgba(211, 47, 47, 0.5);
}
.static-variable-animation .instance-variables {
    margin-top: 15px;
    text-align: left;
}
.static-variable-animation .var-item {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    color: var(--text-color);
    margin: 5px 0;
    padding: 5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
}
.static-variable-animation .objects-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.static-variable-animation .object-instance {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: 15px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}
.static-variable-animation .object-instance.active {
    opacity: 1;
    transform: translateX(0);
}
.static-variable-animation .object-title {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
}
.static-variable-animation .object-values {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    margin-bottom: 10px;
}
.static-variable-animation .static-reference {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #FF9800;
    border-radius: 6px;
    padding: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
}
.static-variable-animation .reference-arrow {
    color: #FF5722;
    font-weight: bold;
}
.static-variable-animation .shared-value {
    color: #D32F2F;
    font-weight: bold;
    font-size: 1.2em;
    transition: all 0.3s ease;
}
.static-variable-animation .shared-value.highlight {
    transform: scale(1.2);
    color: #B71C1C;
    text-shadow: 0 0 8px rgba(183, 28, 28, 0.6);
}
.static-variable-animation .animation-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}
.static-variable-animation .control-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}
.static-variable-animation .control-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(208, 101, 25, 0.3);
}
.static-variable-animation .explanation-text {
    background: #F5F5F5;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
}
.static-variable-animation .explanation-text ul {
    margin: 10px 0;
    padding-left: 20px;
}
.static-variable-animation .explanation-text li {
    margin: 8px 0;
    font-size: 1em;
}

/* 幻灯片 7: 合并后的生命周期 */
.lifecycle-demo, .lifecycle-analysis, .lifecycle-phases, .memory-comparison, .lifecycle-summary {
    margin: 20px 0;
}
.timeline-container {
    position: relative;
    margin: 30px 0;
    padding-left: 30px;
}
.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #2196F3, #FF9800);
}
.timeline-item {
    position: relative;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.timeline-item:hover {
    transform: translateX(10px);
}
.timeline-marker {
    position: absolute;
    left: -45px;
    top: 20px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}
.timeline-content { padding: 20px; }
.timeline-content h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.2em;
}
.timeline-content p {
    margin: 0 0 15px 0;
    color: #666;
}
.timeline-details {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}
.timeline-details strong {
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
}
.timeline-details ul, .timeline-details ol {
    margin: 0;
    padding-left: 20px;
}
.timeline-details li {
    margin: 5px 0;
    font-size: 0.9em;
}
.lifecycle-example, .execution-output, .class-loading-triggers, .loading-comparison {
    margin: 30px 0;
    border-radius: 12px;
    padding: 25px;
}
.lifecycle-example {
    background: #F5F5F5;
    border-left: 4px solid var(--primary-color);
}
.execution-output {
    background: #F0F8FF;
    border-left: 4px solid #2196F3;
}
.output-box {
    background: #1E1E1E;
    color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    margin: 15px 0;
}
.output-line {
    margin: 8px 0;
    padding: 5px;
    border-radius: 4px;
}
.static-line {
    background: rgba(255, 152, 0, 0.2);
    border-left: 3px solid #FF9800;
}
.instance-line {
    background: rgba(76, 175, 80, 0.2);
    border-left: 3px solid #4CAF50;
}
.analysis-notes {
    margin-top: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
}
.static-highlight, .instance-highlight {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}
.static-highlight {
    background: #FFE0B2;
    color: #E65100;
}
.instance-highlight {
    background: #C8E6C9;
    color: #2E7D32;
}
.class-loading-triggers {
    background: #FFFDE7;
    border-left: 4px solid #FFC107;
}
.trigger-examples, .comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.trigger-item, .loading-comparison, .comparison-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.trigger-item h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
}
.comparison-item {
    padding: 15px;
    border: 2px solid transparent;
}
.active-ref {
    background: #FFF3E0;
    border-color: #FF9800;
}
.passive-ref {
    background: #E8F5E8;
    border-color: #4CAF50;
}
.comparison-item h5 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}
.comparison-item ul {
    margin: 0;
    padding-left: 20px;
}
.comparison-item li {
    margin: 5px 0;
    font-size: 0.9em;
}
.phase-timeline {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}
.phase-item {
    display: flex;
    align-items: flex-start;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #E0E0E0;
}
.phase-item.loading {
    border-left-color: #2196F3;
    background: linear-gradient(135deg, #E3F2FD 0%, #FFFFFF 100%);
}
.phase-item.active {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFFFFF 100%);
}
.phase-item.unloading {
    border-left-color: #9C27B0;
    background: linear-gradient(135deg, #F3E5F5 0%, #FFFFFF 100%);
}
.phase-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 20px;
    flex-shrink: 0;
}
.phase-content { flex: 1; }
.phase-content h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.3em;
}
.phase-details p {
    margin: 15px 0 8px 0;
    font-weight: bold;
    color: #333;
}
.phase-details ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}
.phase-details li {
    margin: 5px 0;
    font-size: 0.9em;
    line-height: 1.4;
}
.memory-comparison {
    margin: 40px 0;
    background: #FAFAFA;
    border-radius: 12px;
    padding: 25px;
}
.memory-diagram {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.memory-area {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.static-area {
    border-top: 4px solid #FF9800;
}
.heap-area {
    border-top: 4px solid #4CAF50;
}
.memory-area h4 {
    margin: 0 0 15px 0;
    text-align: center;
    color: var(--primary-color);
}
.memory-content {
    margin-bottom: 15px;
}
.memory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: #F5F5F5;
    border-radius: 6px;
    font-size: 0.9em;
}
.item-label {
    font-weight: bold;
    color: #333;
}
.item-lifecycle {
    color: #666;
    font-size: 0.8em;
}
.memory-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.feature {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
}
.lifecycle-summary {
    background: #F8F9FA;
    border-radius: 12px;
    padding: 25px;
}
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.summary-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.summary-item h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.1em;
}
.summary-item p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
    color: #555;
}

/* 幻灯片 8: JVM 内存模型 */
/* ... (样式代码与幻灯片7-9类似，为简洁省略) */

/* 幻灯片 9: 交互式内存分配演示 */
.interactive-demo {
    background: linear-gradient(135deg, #F8FAFC, #FFFFFF);
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.demo-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
}

.demo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.demo-btn.primary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.demo-btn.primary:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.demo-btn.secondary {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.demo-btn.secondary:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.demo-btn:not(.primary):not(.secondary) {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.3);
}

.demo-btn:not(.primary):not(.secondary):hover {
    background: linear-gradient(135deg, #757575, #616161);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(158, 158, 158, 0.4);
}

.demo-speed {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.demo-speed label {
    font-weight: 600;
    color: #1565C0;
}

.demo-speed input[type="range"] {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: #E3F2FD;
    outline: none;
    -webkit-appearance: none;
}

.demo-speed input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.memory-animation-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    margin: 30px 0;
}

.code-execution-panel,
.memory-visualization-panel {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #2196F3;
    min-width: 0;
    overflow: hidden;
}

.code-execution-panel h3,
.memory-visualization-panel h3 {
    color: #1565C0;
    margin-bottom: 20px;
    font-size: 1.2em;
    text-align: center;
}

.code-display {
    position: relative;
    background: #F8F9FA;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #E9ECEF;
}

.code-display pre {
    margin: 0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85em;
    line-height: 1.5;
    color: #333;
}

.execution-pointer {
    position: absolute;
    left: 5px;
    width: 3px;
    height: 20px;
    background: linear-gradient(135deg, #FF5722, #D84315);
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

.execution-pointer.active {
    opacity: 1;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.execution-log {
    background: #F1F3F4;
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8em;
    color: #333;
    border: 1px solid #E0E0E0;
}

.memory-areas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.memory-area {
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.metaspace-area {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    border: 2px solid #4CAF50;
}

.heap-area {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border: 2px solid #FF9800;
}

.memory-area h4 {
    color: #d3dbe4;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.05em;
}

.heap-section {
    margin-bottom: 12px;
}

.heap-section h5 {
    color: #E65100;
    margin-bottom: 8px;
    font-size: 0.95em;
    padding-bottom: 4px;
    border-bottom: 2px solid #FFE0B2;
}

.memory-content {
    min-height: 60px;
    padding: 10px;
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px dashed #BDBDBD;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.memory-placeholder {
    color: #9E9E9E;
    font-style: italic;
    text-align: center;
    padding: 12px;
    font-size: 0.9em;
}

.memory-item {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 1px solid #2196F3;
    border-radius: 6px;
    padding: 6px 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8em;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.memory-item.active,
.memory-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.memory-item.static {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-color: #FF9800;
}

.memory-item.instance {
    background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
    border-color: #4CAF50;
}

.animation-timeline {
    margin: 30px 0;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
}

.animation-timeline h3 {
    color: #1565C0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 30px 0;
    padding: 0 20px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, #E0E0E0, #BDBDBD);
    border-radius: 2px;
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E0E0E0;
    border: 3px solid #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8em;
    color: #757575;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-marker.active {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.step-marker.completed {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.step-label {
    margin-top: 10px;
    font-size: 0.8em;
    font-weight: 600;
    color: #757575;
    transition: color 0.3s ease;
}

.timeline-step.active .step-label {
    color: #1565C0;
}

.timeline-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
    z-index: 2;
    transform: translateY(-50%);
}

.memory-stats {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.memory-stats h3 {
    color: #1565C0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px solid #DEE2E6;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9em;
    color: #6C757D;
    margin-bottom: 10px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #1565C0;
    font-family: 'Roboto Mono', monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .memory-animation-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .demo-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .demo-speed {
        margin-left: 0;
        justify-content: center;
    }
    
    .timeline-track {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
    }
    
    .timeline-track::before {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .memory-areas {
        gap: 15px;
    }
}


/* JVM内存模型样式 */
.jvm-memory-model {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.memory-overview h3 {
    color: #1e293b;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.4em;
    font-weight: 600;
}

.jvm-diagram {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.memory-area {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.memory-area:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.area-header {
    padding: 20px;
    text-align: center;
    position: relative;
}

.method-area-section .area-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.metaspace-section .area-header {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.heap-section .area-header {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.area-header h4 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
}

.jvm-version {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

.area-content {
    padding: 25px;
}

.memory-component {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.component-icon {
    font-size: 2em;
    width: 50px;
    text-align: center;
}

.component-info strong {
    display: block;
    color: #1e293b;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.component-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9em;
}

.stored-items {
    display: grid;
    gap: 8px;
}

.stored-items .item {
    background: #f1f5f9;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
    font-size: 0.9em;
    color: #475569;
    transition: all 0.2s ease;
}

.method-area-section .stored-items .item {
    border-left-color: #3b82f6;
}

.metaspace-section .stored-items .item {
    border-left-color: #8b5cf6;
}

.heap-section .stored-items .item {
    border-left-color: #10b981;
}

.stored-items .item:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.improvement-note {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.improvement-note strong {
    color: #166534;
}

.heap-regions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.heap-region {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e2e8f0;
}

.heap-region h5 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 1em;
    text-align: center;
}

.region-parts {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.region-parts .part {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
}

.region-content {
    display: grid;
    gap: 5px;
}

.region-content .item {
    background: #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8em;
    color: #475569;
    text-align: center;
}

/* Static变量存储位置演进 */
.static-storage-evolution {
    margin-top: 40px;
}

.static-storage-evolution h3 {
    color: #1e293b;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
}

.evolution-timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.evolution-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.version-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

.jdk8 .version-badge {
    background: linear-gradient(135deg, #059669, #047857);
}

.storage-info {
    padding: 25px;
}

.storage-info h4 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.2em;
}

.storage-details {
    display: grid;
    gap: 15px;
}

.storage-location {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.storage-split {
    display: grid;
    gap: 10px;
}

.split-item {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9em;
}

.storage-characteristics {
    background: #fefce8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #eab308;
}

.storage-characteristics ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.storage-characteristics li {
    margin: 5px 0;
    color: #713f12;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comparison-table, .trigger-examples, .comparison-grid, .memory-diagram, .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .jvm-diagram {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .evolution-timeline {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .heap-regions {
        grid-template-columns: 1fr;
    }
    
    .jvm-memory-model {
        padding: 20px;
        margin: 15px 0;
    }
    
    .table-header {
        display: none;
    }
    .table-row {
        display: grid;
        grid-template-columns: 1fr 2fr;
        margin-bottom: 10px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .feature-cell {
        grid-column: 1 / -1;
        text-align: center;
        background: var(--primary-color) !important;
        color: white !important;
        font-size: 0.9em;
    }
    .static-cell::before {
        content: "静态成员: ";
        font-weight: bold;
        color: #E65100;
    }
    .instance-cell::before {
        content: "非静态成员: ";
        font-weight: bold;
        color: #2E7D32;
    }
    .phase-item {
        flex-direction: column;
        text-align: center;
    }
    .phase-number {
        margin: 0 0 15px 0;
    }
}

@media (max-width: 480px) {
    .region-parts {
        flex-direction: column;
        align-items: center;
    }
    
    .memory-component {
        flex-direction: column;
        text-align: center;
    }
    
    .component-icon {
        width: auto;
    }
}

@media (min-width: 1200px) {
    .comparison-container {
        max-width: 1000px;
        margin: 20px auto;
    }
    
    .jvm-memory-model {
        max-width: 1200px;
        margin: 20px auto;
    }
}