/* ============================================================
   STYLE.CSS - Temática Zombie para el Generador de AutoExec
   Mods de Faze - Left 4 Dead 2
   ============================================================ */

/* ----- FUENTES ----- */
@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Inter:wght@400;600;700;800&display=swap');

/* ----- RESET Y GLOBALES ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: #d1d5db;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: radial-gradient(circle at 20% 30%, #1a0a0a 0%, #0a0a0a 80%);
}

.app {
    max-width: 1400px;
    width: 100%;
    padding: 0 20px 20px;
}

/* ===== HEADER (ZOMBIE THEME) ===== */
.header {
    background: linear-gradient(180deg, #1a0505 0%, #0d0a0a 100%);
    border-bottom: 3px solid #8b0000;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 30px rgba(139, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%238b0000' fill-opacity='0.05'%3E%3Cpath d='M50 10 L60 35 L85 35 L65 50 L75 75 L50 60 L25 75 L35 50 L15 35 L40 35 Z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header h1 {
    font-family: 'Creepster', cursive;
    font-size: 2.6rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: #39ff14;
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.3), 0 0 60px rgba(57, 255, 20, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header h1 .icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(57, 255, 20, 0.5));
}

.header h1 .badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    background: #8b0000;
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    border: 1px solid #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
    text-transform: uppercase;
}

.header .sub {
    font-size: 1rem;
    color: #9ca3af;
    margin-top: 4px;
    letter-spacing: 1px;
    font-weight: 300;
}

/* ===== NAVEGACIÓN ===== */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 14px 0;
    border-bottom: 2px solid rgba(139, 0, 0, 0.4);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #2a1a1a;
    background: rgba(20, 10, 10, 0.8);
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    background: rgba(139, 0, 0, 0.3);
    color: #e5e7eb;
    border-color: #8b0000;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.2);
}

.tab-btn.active {
    background: #8b0000;
    color: #fff;
    border-color: #39ff14;
    box-shadow: 0 0 25px rgba(57, 255, 20, 0.2);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* ===== CUERPO PRINCIPAL (dos columnas) ===== */
.main-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 500px;
}

/* Columna izquierda (dinámica) */
.panel-left {
    flex: 2;
    background: rgba(15, 10, 10, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid #2a1a1a;
    border-radius: 16px;
    padding: 20px;
    min-height: 400px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.panel-left .seccion-contenedor {
    width: 100%;
}

/* Columna derecha (panel de código fijo) */
.panel-right {
    flex: 1;
    min-width: 320px;
    max-width: 480px;
    background: rgba(10, 8, 8, 0.8);
    backdrop-filter: blur(6px);
    border: 1px solid #2a1a1a;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.15);
}

.panel-right .code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a1a1a;
}

.panel-right .code-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #39ff14;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.panel-right .code-panel-header .badge-code {
    font-size: 0.6rem;
    font-weight: 700;
    background: #8b0000;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid #39ff14;
}

.panel-right .code-panel-header .line-count {
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: monospace;
}

.code-area {
    position: relative;
    flex: 1;
    background: #0a0808;
    border: 1px solid #2a1a1a;
    border-radius: 10px;
    overflow: hidden;
    min-height: 250px;
}

.code-area textarea {
    width: 100%;
    height: 100%;
    min-height: 250px;
    padding: 14px;
    background: transparent;
    border: none;
    color: #39ff14;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.code-area .copy-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(139, 0, 0, 0.7);
    border: 1px solid #39ff14;
    color: #fff;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.code-area .copy-btn:hover {
    background: #8b0000;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

.code-area .copy-msg {
    position: absolute;
    bottom: 55px;
    right: 12px;
    background: #39ff14;
    color: #0a0a0a;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.code-area .copy-msg.visible {
    opacity: 1;
}

.code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* ===== BOTONES ===== */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1 0 auto;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.btn-generate {
    background: #8b0000;
    color: #fff;
    border: 1px solid #39ff14;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

.btn-generate:hover {
    background: #b30000;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    border: 1px solid #2a1a1a;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #8b0000;
}

.btn-export {
    background: #39ff14;
    color: #0a0a0a;
    font-weight: 800;
    border: 1px solid #39ff14;
}

.btn-export:hover {
    background: #2ecc71;
    transform: scale(1.02);
}

/* ===== BARRA DE CONTROLES ===== */
.controls-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    background: rgba(15, 10, 10, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid #2a1a1a;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
}

.controls-bar label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9ca3af;
}

.controls-bar select,
.controls-bar input[type="text"] {
    background: #0a0808;
    border: 1px solid #2a1a1a;
    color: #d1d5db;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

.controls-bar select:focus,
.controls-bar input[type="text"]:focus {
    border-color: #8b0000;
    outline: none;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.2);
}

.controls-bar .btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #2a1a1a;
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #8b0000;
}

.btn-sm.success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.btn-sm.success:hover {
    background: #15803d;
}

.btn-sm.danger {
    border-color: #8b0000;
    color: #8b0000;
}

.btn-sm.danger:hover {
    background: rgba(139, 0, 0, 0.2);
}

.status-msg {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: auto;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 12px;
    font-size: 0.75rem;
    color: #4a4a4a;
}

/* ===== ESTILOS PARA LAS SECCIONES (clases usadas por los HTMLs) ===== */

/* Cabecera de sección (toggle) */
.seccion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.seccion-header .titulo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.seccion-header .toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
    cursor: pointer;
}

.seccion-header .toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #8b0000;
    cursor: pointer;
}

/* Comandos individuales */
.comando {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comando:last-child {
    border-bottom: none;
}

.comando .incluir {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: #9ca3af;
}

.comando .incluir input[type="checkbox"] {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: #8b0000;
    cursor: pointer;
}

.comando .label-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    flex: 1 0 auto;
}

.comando .label-group .label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #d1d5db;
}

.comando .control {
    flex: 2 1 180px;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comando .control input[type="range"] {
    flex: 1;
    height: 4px;
    background: #2a1a1a;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.comando .control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #8b0000;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #39ff14;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.comando .control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #8b0000;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #39ff14;
}

.comando .control .valor-actual {
    min-width: 32px;
    text-align: center;
    font-size: 0.8rem;
    color: #39ff14;
    font-family: monospace;
}

.comando .control select {
    background: #0a0808;
    border: 1px solid #2a1a1a;
    color: #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
}

.comando .control select:focus {
    border-color: #8b0000;
    outline: none;
}

/* Glows */
.glow-swatch {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: 2px solid #2a1a1a;
    transition: border-color 0.2s;
}

.glow-swatch:hover {
    border-color: #39ff14;
}

/* Binds */
.bind-key-input {
    flex: 1;
    min-width: 80px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #0a0808;
    border: 1px solid #2a1a1a;
    color: #39ff14;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    transition: border-color 0.2s;
}

.bind-key-input:focus {
    border-color: #8b0000;
    outline: none;
}

.bind-key-input::placeholder {
    color: #4a4a4a;
    text-transform: none;
    font-weight: 400;
}

/* FOV */
.fov-container {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(15, 10, 10, 0.5);
    border-radius: 12px;
    border: 1px solid #2a1a1a;
}

.fov-container .fov-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: #39ff14;
    font-family: monospace;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }
    .panel-right {
        max-width: 100%;
        min-width: unset;
    }
    .panel-right .code-area textarea {
        min-height: 180px;
    }
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 1.8rem;
    }
    .header .sub {
        font-size: 0.8rem;
    }
    .tab-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    .controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .controls-bar .btn-group {
        justify-content: center;
    }
    .status-msg {
        margin-left: 0;
        text-align: center;
    }
    .panel-left {
        padding: 12px;
    }
}