/* Removed invalid Tailwind/arquetipos imports for static serving */

/* Cleaned up Tailwind directives */

:root {
    --void: #0A0A0A;
    --void-light: #151515;
    --bone: #E6E1D3;
    --gold: #C8AA6E;
    --gold-dim: #8a7346;
    --oxblood: #4A0404;

    --font-title: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;

    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);

    --act2-violet: #9d00ff;
    --act3-blood: #8a0303;
    --act4-light: #e0ffff;
    --act5-silver: #a9a9a9;
}

/* ACT-SPECIFIC THEMES (GLOBAL) */
body.act-1 {
    --gold: #D4AF37;
    --color-gold: #D4AF37;
}

body.act-2 {
    --gold: #8A2BE2;
    --color-gold: #8A2BE2;
}

body.act-3 {
    --gold: #8B0000;
    --color-gold: #8B0000;
}

body.act-4 {
    --gold: #F5F5F5;
    --color-gold: #F5F5F5;
}

body.act-5 {
    --gold: #696969;
    --color-gold: #696969;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--void);
    color: var(--bone);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* EFECTO DE GRANO (NOISE) */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.07;
}

/* NAVBAR */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: 0.4s var(--ease-out);
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9), transparent);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid rgba(200, 170, 110, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--bone);
    text-decoration: none;
    letter-spacing: 3px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--bone);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: 0.3s;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--gold);
    text-shadow: 0 0 8px rgba(200, 170, 110, 0.4);
}

.nav-item-auth {
    background: transparent;
    border: none;
    font-family: var(--font-body);
    color: var(--bone);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-vault {
    border: 1px solid var(--gold);
    padding: 6px 15px;
    color: var(--gold) !important;
    font-family: var(--font-title) !important;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.btn-vault:hover {
    background: var(--gold);
    color: var(--void) !important;
    box-shadow: 0 0 15px rgba(200, 170, 110, 0.4);
}

.nav-separator {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    font-weight: 300;
    margin: 0 10px;
}

/* ========================================
   HERO SECTION (MEJORADA - DARK FANTASY)
   ========================================
*/
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 160px;
    overflow: hidden;
}

/* NUEVO: Overlay de gradiente para legibilidad */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado estratégico: Arriba suave, Abajo sólido para el texto */
    background: linear-gradient(to bottom,
            rgba(10, 10, 10, 0.2) 0%,
            rgba(10, 10, 10, 0.5) 50%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-bg-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-family: monospace;
    font-size: 1.5rem;
    z-index: 0;
}

/* Mantenemos el radial por si acaso, pero el hero-overlay hace el trabajo pesado ahora */
.hero-bg-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10, 10, 10, 0.1) 0%, rgba(10, 10, 10, 0.8) 90%);
}

.hero-content {
    position: relative;
    z-index: 10;
    /* Encima del nuevo overlay */
    padding: 0 2rem;
    max-width: 800px;
}

.season-tag {
    display: inline-block;
    /* Ajustado para el fondo */
    color: var(--gold);
    font-family: monospace;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;

    /* MEJORA LEGIBILIDAD TAG */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    padding: 5px 10px;
    border-radius: 2px;
}

.hero h1 {
    font-family: var(--font-title);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--gold);

    /* MEJORA LEGIBILIDAD TÍTULO (Sombra de Vacío) */
    text-shadow:
        4px 0px 4px rgba(0, 0, 0, 1),
        /* Sombra dura de contorno */
        4px 0px 4px rgba(0, 0, 0, 0.8);
    /* Sombra de atmósfera */
    mix-blend-mode: hard-light;
    /* Fusión cinemática */
}

.hero-desc {
    font-size: 1.1rem;
    color: #ccc;
    /* Aclarado ligeramente */
    line-height: 1.6;
    margin-bottom: 2.5rem;

    /* MEJORA LEGIBILIDAD TEXTO */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    padding: 10px 20px;
    border-radius: 4px;
    display: inline-block;
}

/* BOTONES */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gold);
    color: var(--void);
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border: 1px solid var(--gold);
    transition: 0.3s;
    margin: 0 10px;
}

.btn-primary:hover {
    background: transparent;
    color: var(--gold);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--bone);
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    border: 1px solid rgba(230, 225, 211, 0.3);
    transition: 0.3s;
    margin: 0 10px;
}

.btn-secondary:hover {
    border-color: var(--bone);
    background: rgba(255, 255, 255, 0.05);
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    font-size: 0.7rem;
    letter-spacing: 2px;
    z-index: 10;
    /* Asegurar que flote sobre el overlay */
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: var(--gold);
}

/* ARMORY (PRODUCTOS - SLIDER HOME) */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--gold);
    font-family: monospace;
    letter-spacing: 2px;
}

.section-header h2 {
    font-size: 3rem;
    margin: 0.5rem 0 1.5rem;
    font-family: var(--font-title);
}

.separator-gold {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.product-card {
    background: var(--void-light);
    border: 1px solid #222;
    transition: 0.4s var(--ease-out);
    position: relative;
}

.product-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    /* Alto fijo para uniformidad */
    background: #0f0f0f;
    border-bottom: 1px solid #222;
    overflow: hidden;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-family: monospace;
    text-align: center;
    padding: 20px;
    border: 1px dashed #333;
}

.card-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
}

.badge-new {
    background: var(--gold);
    color: var(--void);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.badge-hot {
    background: var(--oxblood);
    color: var(--bone);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.card-info {
    padding: 1.5rem;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.info-header h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.class-icon {
    font-size: 1.2rem;
}

.class-role {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: monospace;
}

.stats-row {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    color: var(--gold);
    border-top: 1px solid #222;
    padding-top: 10px;
}

.price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-old {
    text-decoration: line-through;
    color: #555;
    font-size: 0.8rem;
}

.price-current {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--bone);
}

.btn-add {
    background: transparent;
    border: 1px solid #444;
    color: var(--bone);
    padding: 8px 15px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-title);
    letter-spacing: 1px;
}

.product-card:hover .btn-add {
    border-color: var(--gold);
    color: var(--gold);
}

/* FOOTER */
.main-footer {
    border-top: 1px solid #222;
    padding: 4rem 2rem 2rem;
    background: #050505;
    color: #666;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--bone);
    margin-bottom: 1.5rem;
    font-family: var(--font-title);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #666;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col a:hover {
    color: var(--gold);
}

.origin-flag {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
    font-family: monospace;
    color: var(--gold);
}

.copyright {
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid #111;
    padding-top: 2rem;
    font-size: 0.8rem;
}

/* ANIMACIONES UTILITARIAS */
.reveal-on-scroll {
    opacity: 1;
    /* TEMPORARY FIX: Was 0 */
    transform: translateY(30px);
    transition: 0.8s var(--ease-out);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- ARCHETYPES SECTION --- */
.text-center {
    text-align: center;
}

.archetypes-container {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.archetype-item {
    text-align: center;
    opacity: 0.6;
    transition: 0.3s;
    cursor: crosshair;
}

.archetype-item:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.arch-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(200, 170, 110, 0.2));
}

.archetype-item h4 {
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.archetype-item p {
    font-size: 0.8rem;
    font-family: monospace;
    color: #666;
}

/* --- THE ARTIFACT (PARALLAX) --- */
.section-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 8rem 2rem;
    background: #050505;
    overflow: hidden;
    text-align: center;
}

.parallax-tube {
    background: url('../images/ACTO 1.webp') fixed center center/cover;
}

.tube-puzzle-showcase {
    margin-top: 3rem;
    border: 1px solid var(--gold-dim);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    display: inline-block;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

/* --- THE MONOLITH --- */
.stone-section {
    padding-bottom: 8rem;
}

.stone-title {
    text-shadow: 0 0 20px rgba(200, 170, 110, 0.3);
}

.monolith-container {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 4rem;
    background: url('../images/monolit.webp') repeat center;
    border: 1px solid #333;
    box-shadow:
        inset 0 0 150px #000,
        0 30px 60px rgba(0, 0, 0, 0.9),
        0 0 0 5px rgba(20, 20, 20, 0.8);
    position: relative;
    border-radius: 4px;
}

.monolith-surface {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem 2rem;
    text-align: center;
}

.engraved-name {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: #C8AA6E;
    letter-spacing: 1px;
    padding: 10px;
    cursor: default;
    transition: all 0.3s ease;
    text-shadow:
        -1px -1px 0px rgba(0, 0, 0, 0.9),
        1px 1px 0px rgba(255, 255, 255, 0.15);
}

.engraved-name:not(.empty-slot):hover {
    color: var(--gold);
    text-shadow:
        0 0 10px var(--gold),
        0 0 30px var(--gold-dim);
    transform: scale(1.05);
    cursor: help;
}

.engraved-name:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #fff;
    background: #000;
    padding: 4px 8px;
    border: 1px solid #444;
    white-space: nowrap;
    pointer-events: none;
}

.empty-slot {
    color: #222;
    font-size: 0.9rem;
    font-family: monospace;
    border: 1px dashed #333;
    text-shadow: none;
}

/* --- UI FLOTANTE --- */
.floating-ui {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.whatsapp-btn,
.scroll-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-btn {
    background: #25D366;
    border: 2px solid #128C7E;
    position: relative;
}

.wa-chip {
    position: absolute;
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
    background: #25D366;
    color: white;
    font-size: 0.75rem;
    font-family: var(--font-body, 'Lato', sans-serif);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #128C7E;
    pointer-events: none;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.wa-chip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #25D366;
}

.whatsapp-btn img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.scroll-top {
    background: var(--void);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.whatsapp-btn:hover,
.scroll-top:hover {
    transform: scale(1.1);
}

/* --- LORE / CHARACTER STYLES --- */
.page-header {
    text-align: center;
    padding: 10rem 2rem 4rem;
    background: #050505;
}

.lore-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
}

.lore-chapter {
    margin-bottom: 6rem;
    position: relative;
}

.chapter-meta {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.act-num {
    font-family: var(--font-title);
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.3;
    line-height: 0.8;
}

.chapter-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ccc;
    text-align: justify;
}

.drop-cap {
    float: left;
    font-size: 3.5rem;
    line-height: 0.8;
    margin-right: 10px;
    color: var(--gold);
    font-family: var(--font-title);
}

.lore-quote {
    border-left: 3px solid var(--gold);
    padding-left: 20px;
    margin: 2rem 0;
    font-style: italic;
    color: var(--bone);
    font-family: var(--font-title);
}

.profile-wrapper {
    padding: 8rem 2rem;
    display: flex;
    justify-content: center;
}

.character-sheet {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
    background: #111;
    border: 1px solid #333;
    padding: 3rem;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.char-portrait-frame {
    border: 2px solid var(--gold-dim);
    padding: 10px;
    margin-bottom: 2rem;
    background: var(--void-light);
}

.char-header {
    border-bottom: 1px solid var(--gold-dim);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.char-name {
    font-size: 3.5rem;
    color: var(--bone);
    line-height: 1;
}

.char-title {
    color: var(--gold);
    font-size: 1.2rem;
    margin-top: 5px;
    letter-spacing: 3px;
}

.stats-hex-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.stat-box {
    border: 1px solid #444;
    padding: 10px 20px;
    text-align: center;
    width: 80px;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #666;
}

.stat-val {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: bold;
    font-family: var(--font-title);
}

/* --- MOBILE MENU & BLUR FIX --- */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--bone);
    z-index: 1001;
    transition: 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--gold);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0);
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease, backdrop-filter 0.4s ease;
        z-index: 1000;
        transform: translateZ(0);
        will-change: right, backdrop-filter;
    }

    .nav-links.active {
        right: 0;
        background: rgba(5, 5, 5, 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: 0.3s;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    body.menu-open {
        overflow: hidden;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-grid,
    .character-sheet,
    .forge-layout,
    .contact-split,
    .lair-layout {
        grid-template-columns: 1fr;
    }

    .monolith-container {
        padding: 2rem;
    }

    .nav-separator {
        display: none;
    }
}

body.menu-open .navbar {
    background: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.menu-open .navbar .logo,
body.menu-open .mobile-menu-btn {
    z-index: 1002;
    position: relative;
}

/* --- SLIDER STYLES --- */
.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.slider-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-track .product-card {
    min-width: 320px;
    max-width: 350px;
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bone);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.slider-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 15px rgba(200, 170, 110, 0.3);
    background: rgba(10, 10, 10, 1);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}

@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }

    .slider-wrapper {
        padding: 0;
    }

    .slider-track {
        padding: 0 1rem 2rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

/* --- HERO & CHAR PARALLAX --- */
.char-hero {
    position: relative;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 160px;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transform: translateZ(-1px) scale(2);
    will-change: transform;
}

.char-hero-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.char-title-large {
    font-size: 5rem;
    line-height: 1;
    margin: 10px 0;
    font-family: var(--font-title);
    color: var(--bone);
}

.char-subtitle {
    color: var(--gold);
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.char-container {
    position: relative;
    z-index: 10;
    background: var(--void);
    padding-bottom: 4rem;
}

.char-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: -50px auto 0;
    padding: 0 2rem;
}

.tcg-card-frame {
    background: #000;
    border: 1px solid var(--gold-dim);
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: rotate(-2deg);
    transition: 0.3s;
}

.tcg-card-frame:hover {
    transform: rotate(0) scale(1.02);
    border-color: var(--gold);
}

.stats-panel {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    padding: 2rem;
    margin-top: 3rem;
}

.tcg-stats-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.stat-orb {
    width: 90px;
    height: 90px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
}

.orb-val {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--bone);
    line-height: 1;
}

.orb-label {
    font-size: 0.6rem;
    color: var(--gold);
    letter-spacing: 1px;
}

.attack {
    border-color: #8B0000;
}

.defense {
    border-color: #4682B4;
}

.ability-box {
    border-left: 2px solid var(--gold);
    background: rgba(200, 170, 110, 0.05);
    padding: 1rem;
    margin-bottom: 2rem;
    font-style: italic;
    color: #ccc;
}

.bar-group {
    margin-bottom: 15px;
}

.bar-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #666;
    font-family: monospace;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold-dim);
}

.char-lore-section {
    max-width: 800px;
    margin: 6rem auto 0;
    padding: 0 2rem;
}

.lore-paper {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #d0d0d0;
}

.char-quote {
    font-family: var(--font-title);
    font-size: 1.5rem;
    text-align: center;
    color: var(--gold);
    margin: 3rem 0;
}

.signature {
    text-align: right;
    margin-top: 2rem;
    font-family: monospace;
    color: #555;
}

.char-footer-action {
    text-align: center;
    margin-top: 6rem;
}

/* --- LORE PAGE --- */
.lore-body {
    background: #050505;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/monolit.webp');
    background-attachment: fixed;
}

.lore-hero {
    min-height: 70vh;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.warning-badge {
    display: inline-block;
    border: 1px solid #ff3333;
    color: #ff3333;
    padding: 5px 15px;
    font-family: monospace;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    background: rgba(255, 51, 51, 0.05);
    animation: blink 2s infinite;
}

.lore-intro {
    font-size: 1.2rem;
    color: #888;
    margin-top: 1rem;
    max-width: 600px;
    line-height: 1.6;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.fate-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
    transform: translateX(-50%);
    z-index: 0;
    opacity: 0.3;
}

.timeline-node {
    position: relative;
    margin-bottom: 6rem;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.node-date {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    border: 1px solid var(--gold-dim);
    padding: 5px 15px;
    color: var(--gold);
    font-family: monospace;
    font-size: 0.8rem;
}

.node-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

.timeline-node.left .node-content {
    flex-direction: row;
}

.timeline-node.right .node-content {
    flex-direction: row-reverse;
    text-align: right;
}

.node-text {
    flex: 1;
    background: rgba(10, 10, 10, 0.8);
    padding: 2rem;
    border: 1px solid #222;
    backdrop-filter: blur(5px);
}

.node-visual {
    flex: 1;
    height: 300px;
    border: 1px solid var(--gold-dim);
    padding: 5px;
}

.node-visual .img-placeholder {
    width: 100%;
    height: 100%;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.node-text h2 {
    color: var(--bone);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.node-text p {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-node.right .lore-quote {
    border-left: none;
    border-right: 3px solid var(--gold);
    padding-left: 0;
    padding-right: 15px;
}

.locked-node {
    opacity: 0.5;
    flex-direction: column;
    align-items: center;
    border: 1px dashed #333;
    padding: 3rem;
    background: repeating-linear-gradient(45deg, #0a0a0a, #0a0a0a 10px, #111 10px, #111 20px);
}

.node-marker {
    font-size: 4rem;
    font-family: var(--font-title);
    color: #333;
    margin-bottom: 1rem;
}

.scramble-text {
    font-family: monospace;
    color: #ff3333;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .fate-line {
        left: 20px;
    }

    .timeline-node.left .node-content,
    .timeline-node.right .node-content {
        flex-direction: column-reverse;
        text-align: left;
        padding-left: 40px;
    }

    .node-date {
        left: 20px;
        transform: none;
    }

    .timeline-node.right .lore-quote {
        border-right: none;
        border-left: 3px solid var(--gold);
        padding: 0 0 0 15px;
    }
}

/* --- VAULT PAGE --- */
.vault-body {
    background-color: #030303;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.vault-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 160px 2rem 2rem;
    background: radial-gradient(circle at center, #111 0%, #000 70%);
}

.vault-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
}

.vault-icon {
    font-size: 3rem;
    color: var(--gold);
    animation: pulse 3s infinite ease-in-out;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(200, 170, 110, 0.4);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.vault-instruction {
    color: #666;
    margin-bottom: 3rem;
    font-family: monospace;
}

.code-format {
    color: var(--bone);
    background: #222;
    padding: 2px 6px;
    border-radius: 4px;
}

.input-wrapper {
    background: #000;
    border: 1px solid #333;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.prefix {
    display: block;
    color: #444;
    font-family: monospace;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.vault-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: var(--gold);
    font-family: monospace;
    font-size: 2rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    outline: none;
    transition: 0.3s;
}

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

.vault-input::placeholder {
    color: #222;
}

.vault-submit-btn {
    margin-top: 2rem;
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: var(--bone);
    padding: 1rem;
    cursor: pointer;
    font-family: var(--font-title);
    letter-spacing: 2px;
    transition: 0.3s;
}

.vault-submit-btn:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(200, 170, 110, 0.5);
    animation: scan 3s linear infinite;
    opacity: 0;
}

.input-wrapper:hover .scan-line,
.vault-input:focus~.scan-line {
    opacity: 1;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.console-output {
    margin-top: 2rem;
    height: 60px;
    font-family: monospace;
    color: #888;
    font-size: 0.9rem;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.msg-success {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.msg-error {
    color: #f44336;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

/* --- AUTH & FORMS --- */
.auth-body,
.forge-body,
.contact-body {
    background-color: var(--void);
    min-height: 100vh;
}

.auth-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 160px 2rem 2rem;
    background: radial-gradient(circle, #151515 0%, #000 100%);
}

.auth-card {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #333;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #555;
    font-family: monospace;
    font-size: 0.75rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.rheikan-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    padding: 12px 15px;
    color: var(--bone);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.rheikan-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.1);
}

.rheikan-textarea {
    resize: vertical;
    min-height: 120px;
}

.rheikan-input[type="date"] {
    color-scheme: dark;
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.forge-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.reward-box {
    border: 1px solid var(--gold-dim);
    padding: 1.5rem;
    background: rgba(200, 170, 110, 0.05);
}

.reward-box h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.reward-box ul {
    list-style: inside square;
    color: #999;
    line-height: 1.8;
}

.reward-box strong {
    color: var(--bone);
}

.contact-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding-top: 160px;
}

.contact-info {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #080808;
    border-right: 1px solid #222;
}

.contact-form-wrapper {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-details {
    margin-top: 3rem;
}

.c-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: #999;
}

.c-item span {
    font-size: 1.5rem;
}

/* --- PROFILE / LAIR --- */
.profile-body {
    background-color: #080808;
    min-height: 100vh;
    padding-top: 160px;
}

.lair-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
    border-left: 1px solid #222;
    border-right: 1px solid #222;
    padding-top: 160px;
    /* Added padding here */
}

.lair-sidebar {
    background: #0f0f0f;
    border-right: 1px solid #222;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.user-brief {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid #222;
    padding-bottom: 2rem;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    margin: 0 auto 1rem;
    overflow: hidden;
    background: #000;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-rank {
    font-family: monospace;
    color: var(--gold);
    font-size: 0.8rem;
}

.lair-menu {
    list-style: none;
    flex: 1;
}

.lair-menu li {
    padding: 1rem;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.lair-menu li:hover,
.lair-menu li.active {
    background: rgba(200, 170, 110, 0.1);
    color: var(--bone);
}

.lair-menu li.active {
    border-left: 3px solid var(--gold);
}

.btn-logout {
    background: transparent;
    border: 1px solid #333;
    color: #555;
    width: 100%;
    padding: 10px;
    cursor: pointer;
}

.btn-logout:hover {
    border-color: #d9534f;
    color: #d9534f;
}

.lair-content {
    padding: 3rem;
    background: #080808;
}

.lair-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.lair-section.active-section {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-vault {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    background: #111;
    padding: 1rem;
    border: 1px solid #333;
}

.quick-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--gold);
    font-family: monospace;
    outline: none;
}

.btn-small {
    background: var(--gold);
    border: none;
    padding: 5px 15px;
    font-weight: bold;
    cursor: pointer;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 2rem;
}

.collection-slot {
    aspect-ratio: 2/3;
    background: #050505;
    border: 1px solid #222;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: 0.3s;
}

.collection-slot.locked {
    color: #333;
    font-size: 1.5rem;
}

.collection-slot.locked .slot-number {
    position: absolute;
    bottom: 5px;
    font-size: 0.7rem;
    font-family: monospace;
    color: #333;
}

.collection-slot.obtained {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.1);
    cursor: pointer;
}

.collection-slot.obtained img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.collection-slot.obtained:hover {
    transform: scale(1.05);
    z-index: 10;
}

.rheikan-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.rheikan-table th {
    text-align: left;
    border-bottom: 1px solid var(--gold);
    padding: 1rem;
    color: var(--gold);
    font-family: monospace;
}

.rheikan-table td {
    padding: 1rem;
    border-bottom: 1px solid #222;
    color: #ccc;
}

.btn-download {
    color: var(--bone);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #444;
    padding: 5px 10px;
}

.btn-download:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.status-ok {
    color: #4caf50;
    font-size: 0.8rem;
}

.status-pending {
    color: #ff9800;
    font-size: 0.8rem;
}

.bounties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.boon-card {
    background: #111;
    border: 1px solid var(--gold-dim);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.boon-icon {
    font-size: 2rem;
}

.boon-code {
    background: #000;
    padding: 5px;
    font-family: monospace;
    color: var(--gold);
    margin-top: 5px;
    display: inline-block;
    border: 1px dashed #444;
}

@media (max-width: 768px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* ========================================
   ARMORY CATALOG GRID (PAGINA ARMORY)
   ========================================
*/
.armory-catalog {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    padding-top: 160px;
}

.catalog-filters {
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid #333;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.catalog-filters h3 {
    color: var(--gold);
    border-bottom: 1px solid var(--gold-dim);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
}

.filter-group label:hover {
    color: var(--bone);
}

.filter-group input {
    margin-right: 10px;
    accent-color: var(--gold);
}

.size-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-tag {
    border: 1px solid #444;
    padding: 5px 12px;
    font-family: monospace;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
}

.size-tag.available:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.size-tag.low-stock {
    border-color: #d9534f;
    color: #d9534f;
}

.size-tag.sold-out {
    text-decoration: line-through;
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #333;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.catalog-card {
    background: #0f0f0f;
    border: 1px solid #222;
    transition: 0.3s ease;
    position: relative;
    overflow: hidden;
}

.catalog-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-media {
    height: 350px;
    background: #151515;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.5s;
}

.catalog-card:hover .card-media img {
    transform: scale(1.05);
}

.stock-indicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    padding: 5px 10px;
    font-size: 0.7rem;
    color: #ccc;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    box-shadow: 0 0 5px #4caf50;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.card-details {
    padding: 1.5rem;
}

.card-details h3 {
    font-size: 1.2rem;
    color: var(--bone);
    margin-bottom: 5px;
}

.edition-info {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid #222;
    padding-top: 1rem;
}

.price-row span {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--gold);
}

.btn-quick-view {
    background: transparent;
    border: 1px solid #444;
    color: var(--bone);
    padding: 5px 15px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-quick-view:hover {
    background: var(--bone);
    color: #000;
}

@media (max-width: 900px) {
    .armory-catalog {
        grid-template-columns: 1fr;
        padding-top: 80px;
    }

    .catalog-filters {
        position: static;
        margin-bottom: 3rem;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}



/* --- ROSTER GRID (25 CHARACTERS) --- */

.roster-grid {
    display: grid;
    /* 5 Columnas exactas */
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    /* Un poco más ancho para que entren bien */
    margin: 4rem auto 0;
    padding: 0 2rem;
}

.roster-card {
    aspect-ratio: 1/1.2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #222;
    text-decoration: none;
    overflow: hidden;
    background-color: #080808;
    /* Color de carga por si falla la imagen */

    /* Configuración de la Imagen de Fondo */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transition: 0.4s ease;
}



/* LA CAPA OSCURA (OVERLAY) */
/* Esto oscurece la imagen para que el texto resalte */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* 60% de oscuridad */
    z-index: 1;
    transition: 0.4s;
}

.card-inner {
    z-index: 3;
    /* Encima del overlay y del fuego */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    height: 100%;
    justify-content: center;

    /* Sombra al texto para máxima legibilidad */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.active-card {
    border-color: #444;
    cursor: pointer;
}

/* CAMBIOS EN EL TEXTO */
.archetype-name {
    font-family: var(--font-title);
    color: var(--bone);
    letter-spacing: 2px;
    font-size: 1.2rem;
    /* Un poco más grande ahora */
    font-weight: bold;
    transition: 0.3s;
}

.archetype-class {
    font-family: monospace;
    color: var(--gold);
    /* Dorado para contraste */
    font-size: 0.8rem;
    letter-spacing: 1px;
    opacity: 0.8;
    transform: translateY(0);
    /* Siempre visible ahora */
}

/* --- HOVER EFFECTS (MAGIA) --- */

.active-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Efecto Zoom en la imagen de fondo */
    background-size: 110%;
    /* Hacemos un pequeño zoom manual simulado */
    /* Nota: background-size no anima suave en todos los navegadores,
       pero transform scale en el contenedor hijo sí.
       Como usamos background-image en el padre, esto es un workaround simple. */
}

/* Al hacer hover, aclaramos un poco la imagen para revelarla */
.active-card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.3);
    /* Bajamos oscuridad a 30% */
}

.active-card:hover .archetype-name {
    color: var(--gold);
    transform: scale(1.1);
}

/* Mantenemos el fuego, pero aseguramos que esté visible */
.ember-effect {
    z-index: 2;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, rgba(200, 170, 110, 0.2), transparent);
    z-index: 1;
    transition: 0.4s;
    opacity: 0;
}

/* Al hacer hover, "se prende fuego" desde abajo */
.active-card:hover .ember-effect {
    height: 100%;
    opacity: 1;
    /* Animación sutil de parpadeo */
    animation: ember-pulse 2s infinite alternate;
}

@keyframes ember-pulse {
    0% {
        background: linear-gradient(to top, rgba(200, 170, 110, 0.2), transparent);
    }

    100% {
        background: linear-gradient(to top, rgba(74, 4, 4, 0.4), transparent);
    }

    /* De dorado a rojo sangre */
}

/* Partículas de ceniza (Simuladas con sombra) */
.active-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(200, 170, 110, 0.1);
    z-index: 1;
}




/* ============================
   ESTADO 3: MYSTERY (ACT III+)
   ============================ */
.mystery-card {
    background: #050505;
    border: none;
    color: #111;
    font-family: var(--font-title);
    font-size: 1.5rem;
    cursor: help;
}

.mystery-card:hover {
    color: #222;
    background: #080808;
}


/* RESPONSIVE */
@media (max-width: 900px) {
    .roster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .roster-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .active-card:hover {
        transform: none;
    }

    /* En móvil quitamos el efecto de salto */
}






/* --- FORM VALIDATION ERRORS --- */
.rheikan-input.is-invalid {
    border-color: var(--oxblood);
    box-shadow: 0 0 10px rgba(74, 4, 4, 0.3);
}

.invalid-feedback {
    display: block;
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 5px;
    font-family: monospace;
}


/* Estilo Técnico para la Info */
.meta-label {
    font-family: 'Lato', monospace;
    /* O tu fuente monoespaciada */
    font-size: 0.75rem;
    color: var(--gold);
    letter-spacing: 2px;
    opacity: 0.7;
    display: block;
    margin-bottom: 10px;
}

.lore-text {
    color: #999;
    font-style: italic;
    border-left: 2px solid var(--oxblood);
    padding-left: 15px;
    margin-bottom: 2rem;
}

/* Detalles tipo Terminal */
.terminal-style .c-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-family: 'Lato', monospace;
}

.icon-tech {
    color: var(--gold);
    font-size: 1.2rem;
    margin-right: 15px;
    font-weight: bold;
}

.c-data label {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: #555;
    display: block;
    text-transform: uppercase;
}

.c-data p {
    font-size: 1rem;
    color: #ddd;
    margin: 0;
}

/* Formulario Tech */
.form-header {
    border-bottom: 1px solid #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    text-align: right;
}

.form-header span {
    font-family: monospace;
    font-size: 0.7rem;
    color: #444;
}

.form-disclaimer {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: #444;
    text-align: center;
}

/* Ajuste al Select para que se vea custom */
.select-wrapper {
    position: relative;
}

/* (Opcional) Puedes agregar una flecha custom con ::after aquí si quieres */
.select-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--bone);
}

.lore-hero {
    text-align: center;
    border-bottom: 1px solid #ffffff0d;
    justify-content: center;
    align-items: center;
    height: 60vh;
    padding-top: 160px;
    display: flex;
}

.forge-form select option {
    background: #000;
    color: var(--gold);
}


.size-tag.active {
    background: var(--gold);
    color: var(--void);
    border-color: var(--gold);
}

/* --- RHEIKAN NOTIFICATIONS --- */
#rheikan-notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rheikan-toast {
    background: #0a0a0a;
    color: #fff;
    padding: 15px 25px;
    border: 1px solid #333;
    border-left: 4px solid #333;
    font-family: var(--font-mono, monospace);
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
}

.rheikan-toast.visible {
    opacity: 1;
    transform: translateX(0);
}

.rheikan-toast.success {
    border-left-color: var(--gold);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.1);
}

.rheikan-toast.success::before {
    content: '?';
    color: var(--gold);
    font-weight: bold;
}

.rheikan-toast.error {
    border-left-color: #f44336;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.1);
}

.rheikan-toast.error::before {
    content: '!';
    color: #f44336;
    font-weight: bold;
}

/* --- MOBILE REFACTOR: ARCHETYPES --- */
@media (max-width: 768px) {
    .char-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: -20px;
        padding: 0 1rem;
    }

    .char-visual-col .img-placeholder {
        height: 60vh !important;
        max-height: 450px;
        width: 100%;
    }

    .char-visual-col .img-placeholder img {
        object-fit: contain;
    }

    .tcg-card-frame {
        transform: rotate(0);
        margin: 0 auto 2rem auto;
        max-width: 350px;
    }

    .stats-panel {
        padding: 1.5rem;
    }

    .tcg-stats-row {
        gap: 1rem;
    }

    .stat-orb {
        width: 75px;
        height: 75px;
    }

    .orb-val {
        font-size: 1.4rem;
    }

    .char-title-large {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .char-subtitle {
        font-size: 0.9rem;
    }

    /* Hero Buttons Overlap Fix */
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    /* Contact Page Overrides */
    .contact-split {
        padding-top: 80px;
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .contact-info {
        padding: 3rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid #222;
        text-align: center;
        align-items: center;
    }

    .contact-form-wrapper {
        padding: 3rem 1.5rem;
    }

    .glitch-text {
        font-size: clamp(2.2rem, 12vw, 3.5rem) !important;
        margin-bottom: 1rem;
    }

    .lore-text {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        color: #888;
    }

    .terminal-style .c-item {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .icon-tech {
        font-size: 1.2rem;
        color: var(--gold);
        opacity: 0.6;
    }

    .c-data label {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .c-data p {
        font-size: 1rem;
    }

    /* Form specific mobile tweaks */
    .auth-form {
        padding: 2rem 1.5rem !important;
    }

    .form-disclaimer {
        font-size: 0.7rem;
        text-align: center;
        opacity: 0.4;
    }
}

/* ========================================
   RESPONSIVIDAD MOBILE-FIRST (PHASE 42)
   ======================================== */

@media (max-width: 1024px) {
    .lair-layout {
        grid-template-columns: 1fr !important;
        padding-top: 140px !important;
    }

    .lair-sidebar {
        border-right: none !important;
        border-bottom: 1px solid #222 !important;
        padding: 1.5rem !important;
    }

    .lair-menu {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .lair-menu li {
        flex: 1 1 calc(50% - 8px) !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        text-align: center !important;
    }

    .forge-layout,
    .forge-columns-container,
    .contact-split {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .page-header {
        padding-top: 8rem !important;
    }

    .page-header h1 {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 600px) {
    .lair-menu li {
        flex: 1 1 100% !important;
    }

    .rheikan-table thead {
        display: none;
    }

    .rheikan-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #222;
    }

    .rheikan-table td {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border-bottom: 1px solid #111;
        position: relative;
    }

    .rheikan-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        color: var(--gold);
        text-transform: uppercase;
        font-size: 0.65rem;
    }
}

.break-words {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* --- GLOBAL EVENT & BOSS EFFECTS --- */
.boss-pulse-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #c0392b;
    box-shadow: 0 0 15px #c0392b;
    z-index: 99999;
    animation: bottom-pulse 2s infinite ease-in-out;
    pointer-events: none;
}

.boss-pulse-bar::after {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 100px;
    background: radial-gradient(ellipse at bottom, rgba(192, 57, 43, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    animation: beam-pulse 2s infinite ease-in-out;
}

@keyframes bottom-pulse {

    0%,
    100% {
        opacity: 0.3;
        height: 2px;
    }

    50% {
        opacity: 1;
        height: 4px;
        box-shadow: 0 0 25px #ff0000;
    }
}

@keyframes beam-pulse {

    0%,
    100% {
        opacity: 0.1;
        transform: translateX(-50%) scaleX(0.8);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
}

.event-aura-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 100001;
    pointer-events: none;
    opacity: 0.8;
    transition: 0.5s;
}

.event-aura-line::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 80px;
    filter: blur(15px);
    animation: beam-pulse 3s infinite ease-in-out;
}

.aura-peace {
    background: #fff;
    box-shadow: 0 0 15px #fff;
}

.aura-peace::after {
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

.aura-buff {
    background: #a855f7;
    box-shadow: 0 0 15px #a855f7;
}

.aura-buff::after {
    background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
}

.aura-debuff {
    background: #e67e22;
    box-shadow: 0 0 15px #e67e22;
}

.aura-debuff::after {
    background: radial-gradient(ellipse at top, rgba(230, 126, 34, 0.3) 0%, transparent 70%);
}

.event-legend {
    position: fixed;
    top: 110px;
    right: 20px;
    z-index: 100002;
    font-family: var(--font-title);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: help;
    transition: 0.3s;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: calc(100% - 40px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.event-legend-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.event-legend:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--gold);
}

.event-legend-detail {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 250px;
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 1.5rem;
    border-radius: 4px;
    z-index: 100003;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.event-legend:hover+.event-legend-detail {
    display: block;
}

.event-legend .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .event-legend {
        top: 115px;
        right: 15px;
        padding: 5px 12px;
    }

    .event-legend-detail {
        top: auto;
        bottom: 140px;
        right: 15px;
        width: calc(100% - 30px);
    }
}

/* RHEIKAN NOTIFICATIONS */
#rheikan-notifications {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 100005;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.rheikan-toast {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid #333;
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    color: #eee;
    font-family: monospace;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateX(0);
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: all;
    display: flex;
    flex-direction: column;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-msg {
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.toast-success {
    border-left: 4px solid #4caf50;
}

.toast-success .toast-icon {
    color: #4caf50;
}

.toast-error {
    border-left: 4px solid #f44336;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    width: 100%;
    animation: toast-timer 5s linear forwards;
}

@keyframes toast-timer {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@media (max-width: 768px) {
    #rheikan-notifications {
        top: auto;
        bottom: 100px;
        right: 15px;
        left: 15px;
        width: auto;
    }

    .rheikan-toast {
        max-width: none;
        min-width: 0;
    }
}

/* HEADER SPECIFIC STYLES */
.nav-logo-img {
    width: 55px;
}

.nav-link-highlight {
    color: var(--gold) !important;
    font-weight: bold;
}

.nav-admin-link {
    color: var(--tech-gold, #c6a872) !important;
    border: 1px dashed var(--tech-gold, #c6a872) !important;
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 1px;
}

.nav-admin-link:hover {
    background: rgba(198, 168, 114, 0.1);
}

.duel-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    width: 17px;
    height: 17px;
    font-size: 0.6rem;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: duel-pulse 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes duel-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

@keyframes guiaHeartbeat {
    0% {
        color: inherit;
        text-shadow: none;
        transform: scale(1);
    }

    50% {
        color: var(--gold);
        text-shadow: 0 0 10px rgba(198, 168, 114, 0.8);
        transform: scale(1.08);
    }

    100% {
        color: inherit;
        text-shadow: none;
        transform: scale(1);
    }
}

.guia-pulse {
    animation: guiaHeartbeat 2s infinite ease-in-out;
    display: inline-block;
    font-weight: bold;
}

.btn-pointer {
    cursor: pointer;
}
