/* Variables globales */
:root {
    --input-focus: #264653;
    --font-color: #323232;
    --font-color-sub: #666;
    --bg-color: #fff;
    --bg-color-alt: #f5f5f5;
    --main-color: #323232;
    --box-shadow: 4px 4px var(--main-color);
    --border: 2px solid var(--main-color);
    --border-radius: 5px;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-color-alt);
    color: var(--font-color);
    display: flex;
    flex-direction: column;
}

/* Barra de navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: var(--bg-color);
    border-bottom: var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--input-focus);
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--font-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.nav-link:hover {
    color: var(--input-focus);
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--input-focus);
    bottom: -3px;
    left: 0;
}

/* Container for main content */
.content-container {
    display: flex;
    gap: 20px;
    padding: 15px;
    flex: 1;
    overflow: hidden;
    max-width: 100%;
}

/* Left panel */
.left-panel {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 5px;
    max-height: calc(100vh - 90px);
}

/* Form box styling */
.form-box {
    background-color: lightgrey;
    border-radius: var(--border-radius);
    border: var(--border);
    box-shadow: var(--box-shadow);
    padding: 20px;
}

.title {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    color: var(--main-color);
}

.title-small {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    color: var(--main-color);
}

.form-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: var(--main-color);
    font-size: 14px;
}

/* Input and textarea styling */
.inbox-input {
    width: 100%;
    height: 80px;
    resize: none;
    border-radius: var(--border-radius);
    border: var(--border);
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color);
    padding: 8px;
    outline: none;
    font-family: monospace;
}

.inbox-input:focus {
    border-color: var(--input-focus);
}

.inbox-input::placeholder {
    color: var(--font-color-sub);
    opacity: 0.8;
}

/* Settings container */
.settings-container {
    display: flex;
    gap: 10px;
}

.settings-container .form-group {
    flex: 1;
}

/* Dropdown styling */
.styled-dropdown {
    width: 100%;
    height: 35px;
    border-radius: var(--border-radius);
    border: var(--border);
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    font-size: 13px;
    font-weight: 600;
    color: var(--font-color);
    padding: 5px 8px;
    outline: none;
    cursor: pointer;
}

.styled-dropdown:focus {
    border-color: var(--input-focus);
}

/* Submit button */
.submit-btn {
    width: 150px;
    height: 35px;
    border-radius: var(--border-radius);
    border: var(--border);
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    font-size: 15px;
    font-weight: 600;
    color: var(--font-color);
    cursor: pointer;
    transition: all 0.2s;
    margin: 5px auto 0;
}

.submit-btn:hover {
    background-color: var(--input-focus);
    color: white;
}

.submit-btn:active {
    box-shadow: 0px 0px var(--main-color);
    transform: translate(3px, 3px);
}

/* Instructions box */
.instructions-box {
    background-color: lightgrey;
    border-radius: var(--border-radius);
    border: var(--border);
    box-shadow: var(--box-shadow);
    padding: 15px;
    flex-shrink: 0;

    /* Add this to set a specific height */
    height: 290px; /* Change this value to make it taller or shorter */
    overflow-y: auto; /* Adds scrolling if content is too large */
}

.instructions-list {
    padding-left: 20px;
    margin-bottom: 9px;
}

.instructions-list li {
    margin-bottom: 2px;
    line-height: 1.2;
    font-size: 13px;
}

.warning {
    margin-top: 10px;
    padding: 5px;
    background-color: #ffeeba;
    border-radius: var(--border-radius);
    border: var(--border);
    font-weight: 600;
    color: #856404;
    text-align: center;
    font-size: 14px;
}

/* Right panel */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 65%;
}

/* Code display area */
.code-display {
    height: 100%;
    border-radius: var(--border-radius);
    border: var(--border);
    box-shadow: var(--box-shadow);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: relative;
}

.code-header {
    background-color: lightgrey;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--border);
    position: relative;
    z-index: 20; /* Mayor z-index para asegurarnos que está por encima del loader */
}

.code-header span {
    font-weight: 600;
}

.copy-btn {
    padding: 5px 10px;
    border-radius: var(--border-radius);
    border: var(--border);
    background-color: var(--bg-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 2px 2px var(--main-color);
    font-size: 13px;
}

.copy-btn:hover {
    background-color: var(--input-focus);
    color: white;
}

.copy-btn:active {
    box-shadow: 0px 0px var(--main-color);
    transform: translate(2px, 2px);
}

/* Botón de copiar desactivado */
.copy-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #ccc !important;
    box-shadow: none !important;
    transform: none !important;
}

.copy-btn-disabled:hover {
    background-color: #ccc !important;
    color: var(--font-color) !important;
}

.copy-btn-disabled:active {
    box-shadow: none !important;
    transform: none !important;
}

pre {
    padding: 0;
    margin: 0;
    overflow: auto;
    background-color:  #f5f5f5;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    flex-grow: 1;
    position: relative;
}

code {
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 20px;
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
}

/* Personalización de highlight.js */
.hljs {
    background: #f5f5f5 !important;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 100%;
    color: #333 !important;
}

/* From Uiverse.io by Pradeepsaranbishnoi */ 
.code-loader {
  color: #333;
  font-family: Consolas, Menlo, Monaco, monospace;
  font-weight: bold;
  font-size: 100px;
  opacity: 0.8;
  position: absolute;
  top: 45px; /* Ajustado para posicionarse debajo del header */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: 100%;
  height: calc(100% - 45px); /* Altura ajustada para dejar espacio para el header */
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.code-loader span {
  display: inline-block;
  animation: pulse_414 0.4s alternate infinite ease-in-out;
}

.code-loader span:nth-child(odd) {
  animation-delay: 0.4s;
}

/* Estilo para el enlace de GitHub */
.github-link {
    color: var(--font-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--input-focus);
}

.github-link i {
    font-size: 20px;
}

.version-tag {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 15px;
    color: #999;
    opacity: 0.7;
    font-family: monospace;
    z-index: 30; /* Mayor que el loader y el código para que siempre sea visible */
    background-color: transparent;
    pointer-events: none; /* Para que no interfiera con la selección del código */
    user-select: none; /* Evitar que se seleccione al seleccionar código */
}

@keyframes pulse_414 {
  to {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

/* Footer */
.footer {
    padding: 10px;
    background-color: var(--bg-color);
    text-align: center;
    border-top: var(--border);
    font-weight: 600;
    color: var(--font-color-sub);
    font-size: 13px;
}

.seo-text {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .content-container {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
        max-height: none;
        padding-bottom: 20px;
    }
    
    .left-panel, .right-panel {
        flex: none;
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .left-panel {
        max-height: none;
        overflow-y: visible;
    }
    
    .right-panel {
        height: 400px; /* Altura fija para el panel de código en móvil */
        display: block;
        margin-top: 20px;
    }
    
    .code-display {
        height: 100%;
    }
    
    .settings-container {
        flex-direction: column;
    }
    
    .code-loader {
        top: 42px; /* Ajustar para pantallas más pequeñas si es necesario */
        height: calc(100% - 42px);
    }
    
    /* Ajuste para asegurar que el footer quede al final */
    body {
        min-height: 100vh;
    }
    
    /* Fecha de actualización en la versión */
    .version-tag::after {
        content: " (09-05-2025)";
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .content-container {
        padding: 10px;
    }
    
    .instructions-box {
        height: auto;
        max-height: none;
    }
    
    .right-panel {
        height: 350px; /* Altura ligeramente menor en dispositivos muy pequeños */
    }
    
    /* Ajuste para los botones en móvil */
    .submit-btn, .copy-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 18px;
    }
    
    .instructions-list li {
        font-size: 14px;
    }
    
    .right-panel {
        height: 300px; /* Altura aún menor en dispositivos muy pequeños */
    }
}