/* ==========================================================================
   VARIABLES GLOBALES (Tematización Escalable)
   ========================================================================== */
:root {
    /* Fondo oscuro y profundo de la base de control */
    --vf-bg-main: radial-gradient(circle at top, #141029 0%, #0d0a1a 60%, #05040a 100%);
    /* Tipografía tech monospace */
    --vf-font-family: 'SF Mono', 'Roboto Mono', 'Menlo', Monaco, Consolas, 'Courier New', monospace;

    /* Configuración de Tarjeta Holográfica (Cristal + Resplandor) */
    --vf-card-bg: rgba(30, 20, 60, 0.3);
    --vf-card-border: rgba(0, 255, 242, 0.4);
    --vf-card-blur: 12px;

    /* Colores Principales del Holograma */
    --vf-color-primary: #00fff2; /* Cian Neón (Holograma base) */
    --vf-color-primary-light: #80fffa;
    --vf-color-danger: #ff0055; /* Rosa/Rojo Neón (Errores) */
    --vf-color-text-main: #ccfdfb;
    --vf-color-text-muted: #8899ac;

    /* Gradiente Sólido Morado Digital Neón (Sin transparencia) */
    --vf-btn-purple-bg: linear-gradient(135deg, #7b2cbf 0%, #9d4edd 50%, #b026ff 100%);
    --vf-btn-purple-bg-hover: linear-gradient(135deg, #9d4edd 0%, #c77dff 50%, #e0aaff 100%);
    --vf-btn-purple-border: #d16eff;
    --vf-btn-purple-text: #ffffff;

    /* Radios */
    --vf-radius-card: 16px;
    --vf-radius-input: 4px;
    --vf-radius-button: 6px;

    /* EFECTOS ESPECIALES HOLOGRÁFICOS */
    --glow-primary: 0 0 15px rgba(0, 255, 242, 0.6);
    --glow-purple: 0 4px 20px rgba(176, 38, 255, 0.6);
    --glow-purple-intense: 0 6px 30px rgba(209, 110, 255, 0.9);
    --glow-danger: 0 0 15px rgba(255, 0, 85, 0.6);
    --hologram-scanline: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 255, 242, 0.03) 3px,
        rgba(0, 255, 242, 0.03) 4px
    );
}

/* ==========================================================================
   Base reset para el entorno de la app
   ========================================================================== */
.vf-body-wrapper {
    /* Fallback para navegadores sin soporte dvh */
    min-height: 100vh;
    height: 100vh;

    /* Viewport Dinámico para móviles modernos */
    min-height: 100dvh;
    height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    background: var(--vf-bg-main);
    font-family: var(--vf-font-family);
    color: var(--vf-color-text-main);
    overflow: hidden;
    box-sizing: border-box;
    background-image: var(--hologram-scanline), var(--vf-bg-main);
    position: relative;
}

.vf-body-wrapper::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: #6a0dad;
    filter: blur(150px);
    opacity: 0.25;
    border-radius: 50%;
    z-index: 0;
}

.vf-body-wrapper * {
    box-sizing: border-box;
    text-shadow: 0 0 5px rgba(0, 255, 242, 0.3);
}

/* ==========================================================================
   COMPONENTE BEM: verification-card
   ========================================================================== */

/* Bloque Principal */
.verification-card {
    position: relative;
    width: 100%;
    max-width: 470px;
    background: var(--vf-card-bg);
    border: 1px solid var(--vf-card-border);
    border-radius: var(--vf-radius-card);
    padding: 2.5rem;
    box-shadow: 0 0 30px rgba(0, 255, 242, 0.15), inset 0 0 15px rgba(0, 255, 242, 0.05);
    backdrop-filter: blur(var(--vf-card-blur));
    -webkit-backdrop-filter: blur(var(--vf-card-blur));
    z-index: 2;
    overflow: hidden;
}

.verification-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--hologram-scanline);
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
}

/* Elementos de Estructura */
.verification-card__header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.verification-card__icon-box {
    margin: 0 auto 1.5rem auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
}

.verification-card__app-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.25rem;
    text-transform: uppercase;
    color: var(--vf-color-primary);
    text-shadow: var(--glow-primary);
    animation: vf-hologram-flicker-text 4s infinite;
}

.verification-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--vf-color-primary);
    text-shadow: var(--glow-primary);
}

.verification-card__subtitle {
    color: var(--vf-color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    font-family: system-ui, sans-serif;
}

.verification-card__email {
    color: var(--vf-color-primary-light);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(128, 255, 250, 0.5);
}

/* Formulario e Inputs Cohesivos */
.verification-card__form-group {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.verification-card__input {
    width: 100%;
    max-width: 55px;
    height: 65px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 242, 0.3);
    border-radius: var(--vf-radius-input);
    color: var(--vf-color-primary);
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--vf-font-family);
    padding: 0;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 5px rgba(0, 255, 242, 0.1);
}

.verification-card__input:focus {
    background: rgba(0, 0, 0, 0.6);
    border-color: var(--vf-color-primary);
    box-shadow: var(--glow-primary), inset 0 0 10px rgba(0, 255, 242, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.verification-card__input--error {
    border-color: var(--vf-color-danger) !important;
    color: var(--vf-color-danger) !important;
    background: rgba(255, 0, 85, 0.05) !important;
    box-shadow: var(--glow-danger), inset 0 0 10px rgba(255, 0, 85, 0.2) !important;
    text-shadow: var(--glow-danger) !important;
    animation: vf-shake 0.3s ease-in-out;
}

.verification-card__input--error:focus {
    transform: translateY(-2px) scale(1.05);
}

.verification-card__input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    border-color: rgba(0, 255, 242, 0.1);
}

/* ==========================================================================
   BOTÓN PRINCIPAL
   ========================================================================== */
.verification-card__btn {
    width: 100%;
    padding: 1rem;
    background: var(--vf-btn-purple-bg);
    border: 1px solid var(--vf-btn-purple-border);
    border-radius: var(--vf-radius-button);
    color: var(--vf-btn-purple-text);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--vf-font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--glow-purple);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.verification-card__btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.verification-card__btn:hover:not(:disabled) {
    background: var(--vf-btn-purple-bg-hover);
    border-color: #ffffff;
    box-shadow: var(--glow-purple-intense);
    transform: translateY(-2px);
    color: #ffffff;
}

.verification-card__btn:hover:not(:disabled)::before {
    left: 100%;
}

.verification-card__btn:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.verification-card__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #3c1661;
    border-color: #5a189a;
    box-shadow: none;
}

/* Botón Logout (Rojo Neón Sólido) */
.verification-card__btn--logout {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #d00000 0%, #ff0055 100%);
    border: 1px solid #ff4d88;
    border-radius: var(--vf-radius-button);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--vf-font-family);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.verification-card__btn--logout:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff0055 0%, #ff3377 100%);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.9);
    transform: translateY(-2px);
}

.verification-card__btn--logout:active:not(:disabled) {
    transform: scale(0.98);
}

.verification-card__btn--logout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #59001b;
    border-color: #800026;
    box-shadow: none;
}

/* Pie de tarjeta / Reenvío */
.verification-card__footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 255, 242, 0.1);
    padding-top: 1.5rem;
}

.verification-card__timer {
    color: var(--vf-color-text-muted);
    margin-bottom: 0.5rem;
    font-family: var(--vf-font-family);
}

.verification-card__link {
    color: #c77dff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.25s ease;
}

.verification-card__link:hover {
    color: #e0aaff;
    text-shadow: 0 0 8px rgba(176, 38, 255, 0.8);
}

/* Spinner Nativo CSS */
.vf-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: vf-spin 0.75s linear infinite;
}

/* ==========================================================================
   EXTENSIONES PARA EL LOGIN & REGISTRO (Giro 3D)
   ========================================================================== */

.flip-container {
  width: 100%;
  max-width: 470px;
  perspective: 1200px; 
  z-index: 2;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-container.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  top: 0; left: 0; width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-back {
  transform: rotateY(180deg);
  position: relative;
}

.verification-card__form-vertical {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.vf-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.vf-label {
  font-size: 0.8rem;
  color: var(--vf-color-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 0 3px rgba(0, 255, 242, 0.5);
}

.verification-card__input-text {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 255, 242, 0.2);
  border-radius: var(--vf-radius-input);
  color: var(--vf-color-text-main);
  font-size: 0.95rem;
  font-family: system-ui, sans-serif;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 5px rgba(0, 255, 242, 0.05);
}

.verification-card__input-text:focus {
  background: rgba(0, 0, 0, 0.5);
  border-color: var(--vf-color-primary);
  box-shadow: var(--glow-primary), inset 0 0 10px rgba(0, 255, 242, 0.1);
}

.verification-card__input-text::placeholder {
  color: rgba(0, 255, 242, 0.3);
  font-family: var(--vf-font-family);
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes vf-spin {
    to { transform: rotate(360deg); }
}

@keyframes vf-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@keyframes vf-hologram-flicker-text {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; text-shadow: var(--glow-primary); }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.8; text-shadow: 0 0 5px rgba(0, 255, 242, 0.3); }
}

/* ==========================================================================
   RESPONSIVE DESIGN / MEDIA QUERIES (Soporte Móvil Dinámico)
   ========================================================================== */
@media (max-width: 576px) {
    .vf-body-wrapper {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 1.5rem 1rem;
        overflow-y: auto;
    }

    .verification-card {
        /* Mantiene el diseño holográfico de tarjeta idéntico a PC */
        border-radius: var(--vf-radius-card);
        border: 1px solid var(--vf-card-border);
        padding: 2rem 1.25rem;
        max-width: 100%;
        width: 100%;
    }

    .verification-card__title {
        font-size: 1.15rem;
    }

    .verification-card__form-group {
        gap: 0.4rem;
    }

    .verification-card__input {
        max-width: 48px;
        height: 55px;
        font-size: 1.5rem;
    }

    .verification-card__form-vertical {
        gap: 1rem;
    }

    .verification-card__input-text {
        padding: 0.8rem 1rem;
    }
}