:root {
    --bg-dark: #1e1e24;       
    --bg-sidebar: #111116;    
    --accent-color: #007acc;  
    --text-main: #e0e0e6;
    --text-muted: #a0a0a5;
    --card-bg: #25252b;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.4;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid #2d2d35;
    flex-shrink: 0;
}

.brand-title {
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2d2d35;
}

.brand-title h1 {
    font-size: 18px;
    margin: 0;
    color: #ffffff;
    font-weight: 600;
}

.brand-title .subtitle {
    font-size: 21px;           
    color: var(--accent-color);
    display: block;
    margin-top: 5px;
    font-family: 'Segoe UI', sans-serif;
}

.highlight-brand {
    font-weight: 800;          
    color: #ffffff;            
    letter-spacing: 0.5px;     
    font-size: 21px;           
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-btn {
    background: #1a1a22;
    border: 1px solid #2d2d35;
    border-bottom: 3px solid #0d0d13;
    color: var(--text-muted);
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.1s;
}

.menu-btn:hover {
    color: white;
    background: #22222a;
}

.menu-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-bottom-width: 0px;
    transform: translateY(3px);
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.5);
}

/* Panel de Contenido */
.content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto; 
    background-color: var(--bg-dark);
}

.tab-content {
    display: none;
    max-width: 1200px;
    width: 100%;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

h2 {
    color: #ffffff;
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #2d2d35;
    padding-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 20px;
}

/* Layout simétrico */
.grid-layout {
    display: flex;
    gap: 30px;
    width: 100%;
}

.grid-layout.match-height > div {
    flex: 1; 
    display: flex;
    flex-direction: column;
}

.info-column {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.media-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tarjetas */
.intro-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #3d3d45;
}

.intro-card p {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0 0 10px 0;
}

.intro-card p:last-child {
    margin-bottom: 0;
}

.old-blog {
    background: #111116;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ff79c6;
    font-family: monospace;
}

.ide-download-box {
    background: #16161c;
    border: 1px solid #2d2d35;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ide-download-box p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Multimedia General */
.media-box h3, .simulator-box h3, .media-box-parallel h3 {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
}

.screenshot-container, .video-container {
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #3d3d45;
    overflow: hidden;
    aspect-ratio: 16 / 9; 
}

.video-container-parallel {
    width: 100%;
    height: 480px; 
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #3d3d45;
    overflow: hidden;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    background-color: #111116; 
}

.promo-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #111116;
}

/* Botones Switch Mecánicos 3D */
.download-btn, .paypal-btn, .winworld-btn {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.download-btn { 
    background-color: #28a745; 
    color: white; 
    border-bottom: 4px solid #1e7e34;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.download-btn:hover { background-color: #2dbc4e; }
.download-btn:active {
    border-bottom-width: 0px;
    transform: translateY(4px);
    box-shadow: 0 0px 2px rgba(0,0,0,0.5);
}

.winworld-btn {
    background-color: #4a5568;
    color: #ffffff;
    border-bottom: 4px solid #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}
.winworld-btn:hover { background-color: #5a67d8; border-bottom-color: #4c51bf; }
.winworld-btn:active {
    border-bottom-width: 0px;
    transform: translateY(4px);
    box-shadow: 0 0px 2px rgba(0, 0, 0, 0.4);
}

.paypal-btn { 
    background-color: #ffc107; 
    color: #111; 
    width: 100%;
    border-bottom: 4px solid #d39e00; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.paypal-btn:hover { background-color: #ffca2c; }
.paypal-btn:active {
    border-bottom-width: 0px;
    transform: translateY(4px);
    box-shadow: 0 0px 2px rgba(0,0,0,0.5);
}

.bottom-download {
    margin-top: 25px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bottom-download p { margin: 0; font-weight: bold; font-size: 14px; }

/* Folio Descargas */
.actions-container {
    display: flex;
    gap: 20px;
    width: 100%;
}

.action-card {
    flex: 1;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #3d3d45;
}

.gift-note {
    font-size: 13px !important;
    color: #ffb86c !important; 
    background: #16161c;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #ffb86c;
    margin-bottom: 15px !important;
}

.paypal-email-backup {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    font-family: monospace;
}

.paypal-email-backup code {
    background: #111116;
    padding: 2px 4px;
    border-radius: 4px;
    color: #e0e0e6;
}

/* ==========================================================================
   CANVAS DEL CIRCUITO INTERACTIVO (PERFECTO COORDENADAS %)
   ========================================================================== */
.simulator-canvas {
    position: relative; 
    width: 100%;
    height: 480px; 
    background-color: #ffffff; 
    border-radius: 8px;
    border: 1px solid #3d3d45;
    overflow: hidden;
}

/* Esquema de fondo */
#Schematics {
    position: absolute;
    top: 22%;
    left: 2%;
    width: 52%;
    height: auto;
    z-index: 1;
}

/* Flechas LDR compactadas sobre el haz luminoso */
#Light_1 { position: absolute; top: 23%; left: 19%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }
#Light_2 { position: absolute; top: 23%; left: 23%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }

#Light_3 { position: absolute; top: 28%; left: 19%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }
#Light_4 { position: absolute; top: 28%; left: 23%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }

#Light_5 { position: absolute; top: 33%; left: 19%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }
#Light_6 { position: absolute; top: 33%; left: 23%; width: 4.5%; height: auto; visibility: hidden; z-index: 2; }

/* Ventilador CAD desplazado a la derecha */
#CAD_Fan {
    position: absolute;
    top: 20%;
    left: 60%;
    width: 40%;
    height: auto;
    transform-origin: center center;
    background-color: #ffffff; 
    z-index: 1;
}

/* ¡REAJUSTE FINAL MILIMÉTRICO! Rodado al 45% a la izquierda y ampliado a 7.5% de cobertura */
#Engine_ON {
    position: absolute;
    top: 47%;        
    left: 45%;     
    width: 7.5%;     
    height: auto;
    visibility: hidden;
    z-index: 2; 
}

/* Panel de Control Superior */
.control-panel-top {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 4;
}

#Current_Label {
    font-family: monospace;
    font-size: 15px;
    color: #0f766e; 
    font-weight: bold;
    margin: 0;
    margin-left: auto;
}

/* Botones mecánicos */
.circuit-btn {
    width: 110px;
    height: 36px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    color: white;
    transition: all 0.05s ease;
}

#Button_Decrease {
    background-color: #6e7681;
    border-bottom: 4px solid #484f58;
}
#Button_Decrease:active {
    border-bottom-width: 0px;
    transform: translateY(4px);
}

#Button_Increase {
    background-color: #007acc;
    border-bottom: 4px solid #005994;
}
#Button_Increase:active {
    border-bottom-width: 0px;
    transform: translateY(4px);
}

@keyframes Rotating {
    100% { transform: rotate(360deg); }
}

/* Adaptación para móviles */
@media (max-width: 768px) {
    body { overflow: auto; height: auto; }
    .app-container { flex-direction: column; height: auto; width: 100vw; }

