.step-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
    min-height: 450px;
}

.step-content.active {
    display: block;
}

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

.theory-card {
    background: var(--light-green);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(45, 106, 79, 0.2);
}

.trechoCodigo {
    background-color: #1e1e1e;
    color: #dcdcdc;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 25px;
    max-width: 600px;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.flex-simulacao {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 20px;
}

.memoria-container {
    flex: 1 1 250px;
    max-width: 300px;
    font-family: monospace;
    border: 2px solid var(--primary-green);
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.simulation-container {
    flex: 2 1 600px;
    position: relative;
    max-width: 1000px;
    background: white;
    border-radius: 20px;
}

.processador-img {
    width: 100%;
    height: auto;
    display: block;
}

.data-label {
    position: absolute;
    background-color: var(--warning-orange);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: clamp(0.8rem, 1.5vw, 1.4rem);
    box-shadow: 2px 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    z-index: 10;
}

.data-label.visible { opacity: 1; transform: scale(1); }

.rdm-table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    color: var(--text-dark);
    font-size: 0.85rem;
}

.rdm-table td {
    border: 1px solid #ddd;
    padding: 3px 10px;
    text-align: center;
}

#raio-clock {
    position: absolute;
    top: 75.5%; left: 14%;
    font-size: 4rem;
    color: #f1c40f;
    opacity: 0;
    z-index: 30;
    pointer-events: none;
}

.pulse-raio { animation: pulseRaio 0.5s ease-out; }

@keyframes pulseRaio {
    0% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 1; transform: scale(1.4); }
    100% { opacity: 0; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}