/**
 * styles/auth.css
 * Estilos de autenticación con estética medieval RPG
 * Inspirado en Argentum Online - Sin diseño genérico
 */

/* ============================================ */
/* FUENTE MEDIEVAL                              */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ============================================ */
/* PANTALLA DE AUTENTICACIÓN                    */
/* ============================================ */

#screen-auth {
    position: relative;
    background:
        linear-gradient(180deg,
            rgba(10, 8, 6, 0.97) 0%,
            rgba(18, 15, 12, 0.95) 50%,
            rgba(8, 6, 4, 0.98) 100%),
        radial-gradient(ellipse at center bottom,
            rgba(139, 90, 43, 0.15) 0%,
            transparent 60%);
    background-color: #0a0806;
}

#btn-install-pwa.pwa-install-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: none;
    padding: 8px 10px;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #e7d2a3;
    background: rgba(20, 16, 12, 0.85);
    border: 1px solid rgba(180, 140, 80, 0.6);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

#btn-install-pwa.pwa-install-btn:hover {
    background: rgba(35, 28, 20, 0.9);
}

#btn-install-pwa.pwa-install-btn:active {
    transform: translateY(1px);
}

/* Efecto de viñeta sutil */
#screen-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* ============================================ */
/* TARJETA DE AUTENTICACIÓN                     */
/* ============================================ */

.auth-card {
    position: relative;
    z-index: 1;
    width: 340px;
    padding: 26px 28px;

    /* Fondo tipo pergamino oscuro */
    background:
        linear-gradient(145deg,
            rgba(35, 28, 20, 0.95) 0%,
            rgba(25, 20, 15, 0.98) 50%,
            rgba(20, 16, 12, 0.97) 100%);

    /* Borde dorado-bronce desgastado */
    border: 2px solid;
    border-image: linear-gradient(180deg,
            rgba(180, 140, 80, 0.6) 0%,
            rgba(120, 90, 50, 0.8) 30%,
            rgba(80, 60, 35, 0.7) 70%,
            rgba(60, 45, 25, 0.5) 100%) 1;

    /* Sombra profunda */
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(0, 0, 0, 0.4),
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(180, 140, 80, 0.1);
}

/* Ornamento superior - espadas cruzadas */
.auth-card::before {
    content: "— ⚔ —";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: rgba(160, 130, 80, 0.6);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 4px;
    font-family: serif;
}

/* Línea decorativa inferior */
.auth-card::after {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(180, 140, 80, 0.3) 20%,
            rgba(180, 140, 80, 0.5) 50%,
            rgba(180, 140, 80, 0.3) 80%,
            transparent 100%);
}

/* ============================================ */
/* TÍTULO PRINCIPAL                             */
/* ============================================ */

.auth-card h1 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.7rem;
    letter-spacing: 0.15em;
    text-align: center;
    margin: 0 0 8px 0;

    /* Gradiente dorado */
    background: linear-gradient(180deg,
            #d4a855 0%,
            #c9993a 40%,
            #a67c28 70%,
            #8b6520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Sombra del texto */
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
}

/* ============================================ */
/* TABS DE NAVEGACIÓN                           */
/* ============================================ */

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px 0 24px 0;
    border-bottom: 1px solid rgba(100, 80, 50, 0.4);
}

.auth-tabs button {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: rgba(180, 160, 130, 0.5);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tabs button:hover {
    color: rgba(200, 170, 120, 0.8);
}

.auth-tabs button.active {
    color: #c9a84a;
    border-bottom-color: #a68330;
}

/* ============================================ */
/* FORMULARIOS                                  */
/* ============================================ */

#auth-login,
#auth-register {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Clase helper para ocultar elementos - se usa en JS para toggle */
.auth-hidden {
    display: none !important;
}

/* ============================================ */
/* INPUTS                                       */
/* ============================================ */

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    padding: 12px 14px;
    background: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(80, 65, 45, 0.6);
    color: #d4c8b0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Opciones de Autenticación (Recordarme) */
.auth-options {
    display: flex;
    align-items: center;
    margin-top: -8px;
    margin-bottom: 4px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: rgba(180, 160, 130, 0.8);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(80, 65, 45, 0.6);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(30, 24, 16, 0.9);
    border-color: rgba(120, 90, 60, 0.8);
}

.checkbox-container input:checked~.checkmark {
    background-color: #6d5432;
    border-color: #a08050;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #efe0c0;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-card input:focus {
    outline: none;
    border-color: rgba(180, 140, 80, 0.7);
    box-shadow:
        0 0 0 1px rgba(180, 140, 80, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Fix para el fondo blanco del autocompletado */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus,
.auth-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1510 inset !important;
    -webkit-text-fill-color: #d4c8b0 !important;
    font-family: 'Cormorant Garamond', serif !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================ */
/* BOTONES PRINCIPALES                          */
/* ============================================ */

.auth-card button:not(.auth-tabs button) {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 14px 20px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease;

    /* Fondo bronce oscuro */
    background: linear-gradient(180deg,
            rgba(90, 70, 45, 0.9) 0%,
            rgba(60, 48, 30, 0.95) 50%,
            rgba(45, 35, 22, 0.9) 100%);

    /* Borde dorado sutil */
    border: 1px solid rgba(140, 110, 60, 0.5);

    /* Color del texto */
    color: #c9b896;

    /* Sombras */
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(200, 160, 100, 0.15);
}

.auth-card button:not(.auth-tabs button):hover {
    background: linear-gradient(180deg,
            rgba(110, 85, 55, 0.95) 0%,
            rgba(75, 60, 38, 0.95) 50%,
            rgba(55, 42, 26, 0.9) 100%);
    border-color: rgba(180, 140, 80, 0.6);
    color: #ddd0b5;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(200, 160, 100, 0.2);
}

.auth-card button:not(.auth-tabs button):active {
    transform: translateY(1px);
    box-shadow:
        0 1px 4px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================ */
/* MENSAJES DE ERROR                            */
/* ============================================ */

.auth-card .error,
#auth-error {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: #c45c4a;
    text-align: center;
    padding: 8px;
    min-height: 1.2em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================ */
/* TARJETA DE CREACIÓN DE PERSONAJE             */
/* ============================================ */

.char-card {
    position: relative;
    z-index: 1;
    width: 380px;
    padding: 28px 24px;

    background:
        linear-gradient(145deg,
            rgba(35, 28, 20, 0.95) 0%,
            rgba(25, 20, 15, 0.98) 50%,
            rgba(20, 16, 12, 0.97) 100%);

    border: 2px solid;
    border-image: linear-gradient(180deg,
            rgba(180, 140, 80, 0.6) 0%,
            rgba(120, 90, 50, 0.8) 30%,
            rgba(80, 60, 35, 0.7) 70%,
            rgba(60, 45, 25, 0.5) 100%) 1;

    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(0, 0, 0, 0.4),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.char-card h2 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    text-align: center;
    margin: 0 0 20px 0;
    color: #c9a84a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.char-card label {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(180, 160, 130, 0.8);
    margin-bottom: 4px;
    display: block;
    margin-top: 12px;
}

.char-card label:first-of-type {
    margin-top: 0;
}

.char-card input[type="text"],
.char-card select {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    width: 100%;
    padding: 10px 12px;
    background: rgba(15, 12, 8, 0.9);
    border: 1px solid rgba(80, 65, 45, 0.6);
    color: #d4c8b0;
    box-sizing: border-box;
}

.char-card select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a08060' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.char-card select option {
    background: #1a1510;
    color: #d4c8b0;
}

.char-card input:focus,
.char-card select:focus {
    outline: none;
    border-color: rgba(180, 140, 80, 0.7);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.char-card button {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    width: 100%;
    padding: 14px 20px;
    margin-top: 20px;
    cursor: pointer;

    background: linear-gradient(180deg,
            rgba(90, 70, 45, 0.9) 0%,
            rgba(60, 48, 30, 0.95) 50%,
            rgba(45, 35, 22, 0.9) 100%);

    border: 1px solid rgba(140, 110, 60, 0.5);
    color: #c9b896;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(200, 160, 100, 0.15);

    transition: all 0.2s ease;
}

.char-card button:hover {
    background: linear-gradient(180deg,
            rgba(110, 85, 55, 0.95) 0%,
            rgba(75, 60, 38, 0.95) 50%,
            rgba(55, 42, 26, 0.9) 100%);
    border-color: rgba(180, 140, 80, 0.6);
    color: #ddd0b5;
}

.char-card .error,
#char-error {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: #c45c4a;
    text-align: center;
    padding: 8px 0;
    min-height: 1.2em;
}

/* ============================================ */
/* PANTALLA DE PERSONAJE                        */
/* ============================================ */

#screen-character {
    position: relative;
    background:
        linear-gradient(180deg,
            rgba(10, 8, 6, 0.97) 0%,
            rgba(18, 15, 12, 0.95) 50%,
            rgba(8, 6, 4, 0.98) 100%);
    background-color: #0a0806;
}

#screen-character::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* ============================================ */
/* ANIMACIONES SUTILES                          */
/* ============================================ */

@keyframes subtle-glow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }
}

.auth-card::before {
    animation: subtle-glow 4s ease-in-out infinite;
}

/* ============================================ */
/* HINT DE REGISTRO                             */
/* ============================================ */

.register-hint {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(160, 145, 120, 0.6);
    text-align: center;
    margin: -4px 0 4px 0;
}

/* ============================================ */
/* SECCIONES DE CREACIÓN DE PERSONAJE           */
/* ============================================ */

.char-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(100, 80, 50, 0.2);
}

.char-section:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}

.char-section h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #b8a47a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.char-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.char-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.char-field.full-width {
    flex: 1 1 100%;
}

.char-field label {
    margin-bottom: 2px;
}

/* ============================================ */
/* SISTEMA DE ATRIBUTOS                         */
/* ============================================ */

.char-attributes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.attr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    background: rgba(20, 16, 12, 0.6);
    border: 1px solid rgba(80, 65, 45, 0.4);
    border-radius: 4px;
}

.attr-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    color: rgba(180, 160, 130, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.attr-value {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #d4b06a;
    text-shadow: 0 0 8px rgba(200, 160, 80, 0.3);
}

.attr-hint {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    font-style: italic;
    color: rgba(160, 145, 120, 0.5);
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
    grid-column: 1 / -1;
}

.class-image-wrap {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2px;
}

.class-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 190px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(80, 65, 45, 0.35);
    background: rgba(10, 8, 6, 0.35);
}

@media (max-width: 520px) {
    .attr-column {
        grid-template-columns: 1fr;
    }

    .class-image-wrap {
        grid-column: 1;
        grid-row: auto;
        margin-top: 10px;
    }

    .class-image-wrap img {
        max-height: 160px;
    }
}

/* ============================================ */
/* SELECTOR DE ROSTRO                           */
/* ============================================ */

.head-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-head-nav {
    font-size: 1.2rem !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 32, 22, 0.9) !important;
    border: 1px solid rgba(100, 80, 50, 0.5) !important;
    color: #b8a47a !important;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-head-nav:hover {
    background: rgba(60, 48, 32, 0.95) !important;
    color: #d4c8b0 !important;
    border-color: rgba(140, 110, 60, 0.6) !important;
}

.head-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: rgba(15, 12, 9, 0.8);
    border: 1px solid rgba(80, 65, 45, 0.4);
    border-radius: 6px;
}

#head-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(60, 50, 35, 0.4);
}

#head-number,
.head-num {
    display: none !important;
}

/* ============================================ */
/* BOTÓN CREAR PERSONAJE                        */
/* ============================================ */

.btn-create {
    font-size: 1rem !important;
    padding: 16px 24px !important;
    margin-top: 16px !important;
    background: linear-gradient(180deg,
            rgba(100, 75, 40, 0.95) 0%,
            rgba(70, 55, 32, 0.95) 50%,
            rgba(55, 42, 26, 0.9) 100%) !important;
    border: 1px solid rgba(160, 120, 60, 0.6) !important;
    color: #ddc890 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-create:hover {
    background: linear-gradient(180deg,
            rgba(120, 90, 50, 0.95) 0%,
            rgba(85, 68, 40, 0.95) 50%,
            rgba(65, 50, 30, 0.9) 100%) !important;
    border-color: rgba(200, 150, 70, 0.7) !important;
    color: #ffe8a0 !important;
    box-shadow: 0 0 15px rgba(200, 150, 70, 0.2) !important;
}

/* ============================================ */
/* PANTALLA DE CARGA                            */
/* ============================================ */

/* Nota: display se controla en main.css, aquí solo estilos visuales */
#screen-loading {
    justify-content: center;
    align-items: center;
    position: relative;
    background:
        linear-gradient(180deg,
            rgba(8, 6, 4, 0.99) 0%,
            rgba(15, 12, 9, 0.98) 40%,
            rgba(10, 8, 5, 0.99) 100%),
        radial-gradient(ellipse at center,
            rgba(100, 70, 30, 0.08) 0%,
            transparent 70%);
    background-color: #080604;
}

/* Viñeta oscura */
#screen-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

/* Contenedor principal */
.loading-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 40px;
}

/* Logo/Título */
.loading-logo {
    text-align: center;
}

.loading-logo h1 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 0.2em;
    margin: 0;

    /* Gradiente dorado brillante */
    background: linear-gradient(180deg,
            #e8c860 0%,
            #d4a855 25%,
            #c9993a 50%,
            #a67c28 75%,
            #8b6520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8));
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {

    0%,
    100% {
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 15px rgba(200, 160, 80, 0.2));
    }

    50% {
        filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 25px rgba(200, 160, 80, 0.35));
    }
}

.loading-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.3em;
    color: rgba(180, 160, 120, 0.5);
    margin: 8px 0 0 0;
}

/* Barra de progreso */
.loading-bar-container {
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-bar {
    width: 100%;
    height: 6px;
    background: rgba(30, 25, 18, 0.9);
    border: 1px solid rgba(80, 65, 45, 0.5);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(100, 80, 50, 0.1);
    overflow: hidden;
    position: relative;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
            rgba(140, 110, 60, 0.8) 0%,
            rgba(180, 145, 80, 0.9) 50%,
            rgba(140, 110, 60, 0.8) 100%);
    box-shadow:
        0 0 8px rgba(180, 145, 80, 0.4),
        inset 0 1px 0 rgba(255, 220, 150, 0.3);
    transition: width 0.3s ease;
    position: relative;
}

/* Efecto de brillo en la barra */
.loading-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 100%);
}

.loading-text {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: rgba(180, 160, 130, 0.7);
    margin: 0;
    text-transform: uppercase;
}

/* Tips de carga */
.loading-tips {
    text-align: center;
    min-height: 40px;
}

.loading-tips p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: rgba(150, 135, 110, 0.6);
    margin: 0;
    animation: tip-fade 4s ease-in-out infinite;
}

@keyframes tip-fade {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* ============================================ */
/* ANIMACIÓN DE CARGA DE PUNTOS                  */
/* ============================================ */

@keyframes loading-dots {
    0% {
        content: '.';
    }

    33% {
        content: '..';
    }

    66% {
        content: '...';
    }

    100% {
        content: '.';
    }
}

.loading-text::after {
    content: '';
    animation: loading-dots 1.5s steps(1, end) infinite;
}

/* ============================================ */
/* LAYOUT COMPACTO DE CREACIÓN DE PERSONAJE     */
/* ============================================ */

.char-card.compact {
    max-width: 700px;
    width: 95%;
    padding: 24px 32px;
}

.char-card.compact h2 {
    margin-bottom: 16px;
    font-size: 1.3rem;
}

.char-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.char-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.char-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.char-group label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(180, 160, 130, 0.7);
    letter-spacing: 0.08em;
}

.char-group-row {
    display: flex;
    gap: 10px;
}

.char-group-row .char-group {
    flex: 1;
}

/* Panel informativo de clase */
.class-info-panel {
    margin-top: 8px;
    padding: 10px;
    background: rgba(20, 16, 12, 0.6);
    border: 1px solid rgba(80, 65, 45, 0.4);
    border-radius: 4px;
}

.class-info-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c9b896;
    margin-bottom: 4px;
}

.class-info-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    color: rgba(180, 160, 130, 0.8);
    line-height: 1.3;
    margin-bottom: 6px;
}

.class-info-stats {
    display: flex;
    gap: 16px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    color: rgba(160, 145, 120, 0.7);
}

/* Columna de atributos */
.attr-column {
    background: rgba(15, 12, 9, 0.5);
    border: 1px solid rgba(80, 65, 45, 0.3);
    border-radius: 6px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr clamp(96px, 22vw, 170px);
    column-gap: 12px;
    align-items: start;
}

.attr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(80, 65, 45, 0.3);
    grid-column: 1 / -1;
}

.attr-header span {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b8a47a;
}

.char-attributes-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attr-row {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(25, 20, 15, 0.5);
    border-radius: 3px;
}

.attr-label {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(180, 160, 130, 0.6);
    width: 35px;
}

.attr-val {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #d4b06a;
    min-width: 30px;
    text-align: center;
}

.attr-mod {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    margin-left: 6px;
    min-width: 40px;
}

.attr-mod.positive {
    color: #6ab06a;
}

.attr-mod.negative {
    color: #b06a6a;
}

/* Columna de rostro */
.head-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.head-column label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(180, 160, 130, 0.7);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.head-selector-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.head-preview-large {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 12, 9, 0.8);
    border: 1px solid rgba(80, 65, 45, 0.5);
    border-radius: 6px;
}

#head-canvas {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 64px;
    height: 64px;
}

.head-num {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: #a08060;
}

.btn-head-nav {
    width: 40px !important;
    height: 28px !important;
    font-size: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(40, 32, 22, 0.9) !important;
    border: 1px solid rgba(100, 80, 50, 0.5) !important;
    color: #b8a47a !important;
    border-radius: 4px;
    cursor: pointer;
}

.btn-dice {
    width: 32px !important;
    height: 28px !important;
    font-size: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(60, 48, 32, 0.9) !important;
    border: 1px solid rgba(120, 90, 50, 0.5) !important;
    color: #c9a84a !important;
    border-radius: 4px;
    cursor: pointer;
}

.btn-dice:hover,
.btn-head-nav:hover {
    background: rgba(80, 65, 45, 0.95) !important;
}

.char-card.compact .btn-create {
    margin-top: 20px;
}

/* Sección de rostro horizontal */
.head-section {
    margin-top: 12px;
    padding: 12px;
    background: rgba(15, 12, 9, 0.5);
    border: 1px solid rgba(80, 65, 45, 0.3);
    border-radius: 6px;
}

.head-section label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(180, 160, 130, 0.7);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    display: block;
}

.head-selector-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.head-preview-large {
    width: 48px;
    height: 48px;
    background: rgba(15, 12, 9, 0.8);
    border: 2px solid rgba(120, 90, 50, 0.6);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.head-preview-large canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.btn-head-nav {
    width: 32px;
    height: 32px;
    background: rgba(60, 48, 32, 0.9);
    border: 1px solid rgba(120, 90, 50, 0.5);
    color: #c9a84a;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-head-nav:hover {
    background: rgba(80, 65, 45, 0.95);
    border-color: rgba(180, 130, 60, 0.8);
}

.head-num {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: rgba(180, 160, 130, 0.8);
    min-width: 24px;
    text-align: center;
}