.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(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

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

.simulator-box {
    background: var(--accent-yellow);
    padding: 25px;
    border-radius: 20px;
    margin-top: 15px;
    text-align: center;
    border: 2px dashed var(--primary-green);
}
.labels-grid {
    display: flex;
    justify-content: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-green);
}
.sign { background: #52b788; }
.expo { background: #40916c; }
.mant { background: #2d6a4f; }

#notation-container p {
    margin: 8px 0;
    font-family: 'Consolas', monospace;
    font-size: 1.2rem;
}

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

@media (max-width: 768px) {
    .binary-grid, .labels-grid { flex-wrap: wrap; }
    .w-mant { min-width: 100%; }
}

.binary-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    width: 100%;
    overflow-x: auto; 
}

.binary-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-family: 'Courier New', Courier, monospace;
    padding-bottom: 10px;
}

.bit-box {
    height: 70px; 
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
    font-weight: 900;
    font-size: 1.8rem; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    padding: 0 10px;
}

.bit-box:hover {
    transform: scale(1.05);
}

.w-sign { 
    min-width: 60px; 
}

.w-expo { 
    min-width: 180px; 
    letter-spacing: 2px;
}

.w-mant { 
    min-width: 550px; 
    letter-spacing: 2px;
    text-align: center;
    padding: 0 20px !important;
}

.sign { 
    background: #52b788; 
    border: 3px solid #2d6a4f;
}

.expo { 
    background: #40916c; 
    border: 3px solid #1b4332;
}

.mant { 
    background: #2d6a4f; 
    border: 3px solid #081c15;
}

.labels-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-green);
}

.label-box {
    text-align: center;
}

.binary-container::-webkit-scrollbar {
    height: 10px;
}
.binary-container::-webkit-scrollbar-thumb {
    background: var(--light-green);
    border-radius: 10px;
}