/* =========================================
   VARIABLES
   ========================================= */
:root {
    --primary: #000000;
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --text-main: #000000;
    --text-muted: #757575;
    --border-dash: #e0e0e0;
    --radius: 4px;
}

/* =========================================
   BASE
   ========================================= */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, sans-serif;
    background-color: var(--bg-body);
    margin: 0; padding: 0;
    color: var(--text-main);
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px 40px 15px;
}

/* =========================================
   CABEZA (HEADER) Y PIE (FOOTER) - RECUPERADOS
   ========================================= */
.main-header {
    text-align: center;
    padding: 50px 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 30px;
}

.main-header h1 {
    font-size: 1.3rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.main-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 10px 0 0;
}

.main-footer {
    text-align: center;
    padding: 50px 15px;
    margin-top: 40px;
    border-top: 2px dashed var(--border-dash);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* =========================================
   TARJETAS (CARDS)
   ========================================= */
.card {
    background: var(--bg-card);
    padding: 25px;
    margin-bottom: 25px; /* Separación entre tarjetas */
    border: 2px dashed var(--border-dash);
    border-radius: var(--radius);
}

/* =========================================
   BOTONES NEGROS (CON MARGEN)
   ========================================= */
.btn {
    width: 100%;
    padding: 16px;
    margin-bottom: 15px; /* Separación vertical entre botones */
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    background: #000000;
    color: #ffffff;
    display: block;
    transition: transform 0.1s;
}

.btn:last-child { margin-bottom: 0; }
.btn:active { transform: scale(0.98); }

.btn-add { background: #444; font-size: 0.75rem; padding: 10px; margin-top: 10px; }

/* =========================================
   FORMULARIOS Y SELECTORES (RECUPERADOS)
   ========================================= */
label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

input[type="text"], 
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px; /* Espacio tras cada campo */
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 16px;
    background: #fff;
}

/* Casillas (Checkboxes) - Recuperadas */
.cap-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fafafa;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #000; /* Color negro para el check */
}

/* Selector de archivos (Estilo limpio) */
input[type="file"]::file-selector-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 2px;
    margin-right: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Rejilla de versiones */
.v-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}
.v-grid input { margin-bottom: 0; text-align: center; }

/* =========================================
   RESULTADO Y EXTRAS
   ========================================= */
pre {
    background: #000;
    color: #fff;
    padding: 20px;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 20px;
}

summary {
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.entry-box {
    border: 1px solid #eee;
    background: #fdfdfd;
    padding: 15px;
    margin-top: 15px;
    border-radius: var(--radius);
}

/* =========================================
   ANIMACIONES Y EFECTOS DINÁMICOS
   ========================================= */

/* 1. Animación de entrada suave para tarjetas */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: slideUp 0.4s ease-out;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}

/* 2. Efecto Zoom al pasar el ratón o tocar la tarjeta */
.card:hover {
    transform: scale(1.02); /* Zoom sutil */
    border-color: #000;
}

/* 3. Animación para el contenido desplegable (details) */
details[open] summary ~ * {
    animation: expand 0.3s ease-out;
}

@keyframes expand {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 4. Efecto de "Botón Presionado" */
.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.95); /* Zoom inverso al presionar */
    filter: brightness(1.2);
}

/* 5. Efecto Zoom en Inputs al enfocarlos */
input:focus, select:focus {
    transform: scale(1.01);
    border-color: #000;
    transition: all 0.2s ease;
}

/* 6. Animación para los bloques de traducción (entry-box) */
.entry-box {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 7. Feedback visual en el resumen del desplegable */
summary {
    transition: color 0.2s ease;
}

summary:hover {
    color: #555;
}

/* Icono de rotación suave para el marcador del desplegable */
details summary::-webkit-details-marker {
    transition: transform 0.3s ease;
}

details[open] summary::-webkit-details-marker {
    transform: rotate(90deg);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Espacio entre el icono y el texto */
}

.btn-icon img {
    width: 20px;  /* Tamaño del icono */
    height: 20px;
}