/* Estilos generales con temática oscura y oriental */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* outline: 2px solid magenta; */
}

body {
    background-color: #0b0c10;
    /* Fondo con textura oscura y viñeta mística */
    background-image: 
        radial-gradient(circle, rgba(20, 22, 30, 0.8) 0%, rgba(5, 6, 8, 0.95) 100%),
        repeating-linear-gradient(45deg, rgba(197, 160, 89, 0.02) 0, rgba(197, 160, 89, 0.02) 1px, transparent 0, transparent 50px);
    height: 100vh;
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Contenedor principal tipo pergamino/interfaz de juego */
.register-container {
    position: relative;
    width: 420px;
    background: linear-gradient(135deg, #12141d 0%, #1a1d28 100%);
    border: 2px solid #8c6d36; /* Bordes dorados oscuros */
    border-radius: 6px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 
                0 0 20px rgba(140, 109, 54, 0.2);
    animation: fadeIn 0.8s ease-in-out;
}

/* Detalles decorativos en las esquinas estilo oriental */
.register-container::before, .register-container::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid #c5a059;
}
.register-container::before { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.register-container::after { top: 6px; right: 6px; border-left: none; border-bottom: none; }

/* Título místico */
h2 {
    text-align: center;
    color: #d4af37; /* Dorado brillante */
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 22px;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 12px;
}

/* Grupos de campos */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

label {
    display: block;
    color: #a0a6b8;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* Inputs oscuros y pulcros */
input {
    width: 100%;
    padding: 12px 14px;
    background-color: #07080a;
    border: 1px solid #3a4055;
    border-radius: 4px;
    color: #f1f1f1;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #c5a059;
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.4);
    background-color: #0b0d12;
}

/* Botón de envío épico */
button {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(to bottom, #8c6d36 0%, #5a431c 100%);
    border: 1px solid #c5a059;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}

button:hover {
    background: linear-gradient(to bottom, #a37f41, #6c5023);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.6);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

/* Animación sutil de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Overlay de Fondo General --- */
body.hidden::before {
    display: none;
}

body::before {
    /* display: none; */
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(circle, rgba(15, 23, 42, 0.85) 0%, rgba(3, 7, 18, 0.95) 100%);
    background-size: cover;
    background-position: center;
    z-index: 1;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Animación de Entrada --- */
@keyframes mboxPopup {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- Contenedor Principal (.mbox) --- */
.mbox {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: auto; */
    /* max-height: 85vh; */
    height: 45vh;
    min-height: 400px;
    width: 90%;
    max-width: 460px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    animation: mboxPopup 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* .mbox dev */
    display: none;
}

/* --- Borde Exterior Trabajado (.mbox-container-outside) --- */
.mbox-container-outside {
    height: 100%;
    width: 100%;
    border-radius: 12px;
    padding: 3px; /* Espacio para simular un borde doble o refinado */
    background: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #aa7c11 100%);
    box-sizing: border-box;
}

/* --- Contenedor Interior (.mbox-container-inside) --- */
.mbox-container-inside {
    height: 100%;
    width: 100%;
    border-radius: 10px;
    background-color: #fcfbf7; /* Color crema suave */
    overflow: hidden;
    box-sizing: border-box;
}

/* --- Estructura Interna (.mbox-container) --- */
.mbox-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 24px;
    box-sizing: border-box;
    outline: 2px solid magenta;
}

/* --- Título (.mbox-title) --- */
.mbox-title {
    color: #2c2416;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    /* margin: 0 0 12px 0; */
    letter-spacing: -0.5px;
}

.mbox-title::selection {
    background: rgba(1, 1, 1, 0);
}

/* --- Icono de Éxito --- */
.mbox-icon {
    /* display: flex; */
    /* display: block; */
    /* align-items: center; */
    /* justify-content: center; */
    margin-left: -2%;
    /* margin-bottom: 16px; */
    color: #10b981; /* Verde esmeralda moderno */
    animation: bounceIcon 0.6s ease-in-out 0.2s;
}

svg.hidden {
    display: none;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* --- Cuerpo de Texto (.mbox-body) --- */
.mbox-body {
    display: flex;
    flex-direction: column;
    height: auto;
    justify-content: center;
    text-align: center;
    margin-bottom: 24px;
}

.mbox-body p {
    color: #555044;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.mbox-body p.reason {
    color: darkred;
    font-weight: bold;
    margin-top: 16px;
}

/* --- Botón de Acción (.mbox-btn) --- */
.mbox-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.mbox-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 8px -1px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.mbox-btn:active {
    transform: translateY(0);
}

/* Estilos del SVG interno */
.mbox-close-icon {
    /* display: inline-block; */
    position: absolute;
    top: 16px;
    right: 16px;
    width: fit-content;
    transition: transform 0.07s ease;
}

/* --- Efecto Hover (Al pasar el cursor) --- */
.mbox-close-icon:hover {
    /* background-color: rgba(156, 163, 175, 0.15); */
    color: #1f2937;
    transform: scale(1.08);
    cursor: pointer;
}

/* --- Efecto OnClick / Active (Al presionar) --- */
.mbox-close-icon:active {
    transform: scale(0.98); /* Efecto de compresión al hacer clic */
    /* background-color: rgba(156, 163, 175, 0.3); */
}

/* Accesibilidad: Indicador visual si se navega con teclado (Tab) */
.close-modal-btn:focus-visible {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}
