.explanation-panel {
    background: var(--accent-yellow);
    padding: 25px;
    border-radius: 20px;
    border-left: 12px solid var(--warning-orange);
    margin-bottom: 30px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    border: 2px solid var(--light-green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

input[type="text"] {
    padding: 15px 25px;
    font-size: 1.5rem;
    border: 3px solid var(--light-green);
    border-radius: 15px;
    width: 280px;
    text-transform: uppercase;
    text-align: center;
    font-weight: 900;
    color: var(--primary-green);
    background: #fdfdfd;
}

.simulation-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 60px 3fr 60px 1.2fr; 
    gap: 0; 
    height: 750px; 
    background: #ffffff; 
    border: 2px solid var(--light-green);
    border-radius: 30px; 
    overflow: hidden; 
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.03);
}

.component-box { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    position: relative; 
    padding: 20px;
}

.component-box:nth-of-type(3) {
    background-color: rgba(216, 243, 220, 0.15);
}

.component-box:nth-of-type(3) .img-fluid {
    width: 100% !important;
    max-height: 95% !important;
    transform: scale(1.1); 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.component-box:nth-of-type(1) .img-fluid,
.component-box:nth-of-type(5) .img-fluid {
    width: 80%; 
    max-height: 65%;
    opacity: 0.85;
}

.arrow-box { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 3.5rem; 
    color: var(--light-green); 
    font-weight: bold;
    text-shadow: 2px 2px 0px white;
}

.component-label { 
    position: absolute; 
    top: 30px; 
    background: var(--primary-green); 
    color: white; 
    padding: 10px 30px; 
    border-radius: 50px; 
    font-weight: 800; 
    font-size: 0.85rem; 
    letter-spacing: 1.5px;
    z-index: 5; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.floating-card { 
    position: absolute; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 900; 
    border-radius: 12px; 
    z-index: 100; 
    font-family: 'Courier New', Courier, monospace; 
    opacity: 0; 
    border: 1.5px solid #ffffff; 
}

.card-letra { 
    width: 55px; 
    height: 55px; 
    background: var(--warning-orange) !important; 
    color: white; 
    font-size: 1.5rem; 
    box-shadow: 0 10px 25px rgba(230, 126, 34, 0.4); 
}

.card-hex { 
    min-width: 60px; 
    height: 35px; 
    background-color: #2b6cb0 !important; 
    color: #ffffff !important; 
    font-size: 1.4rem; 
    box-shadow: 0 10px 25px rgba(43, 108, 176, 0.4); 
}

.card-msg { 
    width: 320px; 
    height: 35px; 
    background: #1a202c !important; 
    color: #f7fafc; 
    font-size: 0.9rem; 
    padding: 0 15px;
    border-radius: 10px;
}

.nav.btn-start, .nav.btn-step, .nav.btn-restart {
    border: none;
    border-radius: 50px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 45px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.btn-start { background-color: var(--primary-green) !important; color: white !important; }
.btn-step { background-color: var(--warning-orange) !important; color: white !important; }
.btn-restart { background-color: var(--light-green) !important; color: var(--primary-green) !important; }

.nav:hover:not(:disabled) { 
    transform: translateY(-4px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
}

.nav:disabled { 
    background-color: #e2e8f0 !important; 
    color: #a0aec0 !important; 
    cursor: not-allowed; 
    transform: none; 
}

@media (max-width: 1024px) {
    .simulation-grid { 
        grid-template-columns: 1fr; 
        height: auto; 
        gap: 50px; 
        padding: 60px 0;
    }
    .arrow-box { transform: rotate(90deg); font-size: 2.5rem; }
    .component-box:nth-of-type(3) .img-fluid { width: 90% !important; }
}