/* ===================================
   BLOXSMITH AI - AUTH MODAL STYLES
   Shared authentication modal styling
   Iron Gate Forge Theme Edition
   =================================== */

/* CSS Variables - inherit from page or define defaults */
:root {
    --magma-orange: #ff5500;
    --magma-red: #ff4500;
    --magma-glow: #ff8c00;
    --ash: #1a1a1a;
    --cold-iron: #0f0f0f;
}

/* --- AUTH MODAL OVERLAY with Fiery Background --- */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    overflow: hidden;
}

/* Fire Video Background */
.auth-fire-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.35;
    filter: contrast(1.2) brightness(0.6);
    pointer-events: none;
}

/* Particle Canvas for Sparks */
.auth-fire-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* When shown via JS (display: flex), animate in */
.auth-modal-overlay[style*="flex"] {
    animation: fadeInAuth 0.3s ease-out;
}

/* --- AUTH BOX - Iron Plate Edition --- */
.auth-box {
    background: linear-gradient(145deg, #1a1a1a, #050505);
    border: 2px solid #444;
    width: 420px;
    padding: 50px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 85, 0, 0.1);
    transform: scale(0.9);
    transition: all 0.5s;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* Rust/Texture Overlay */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/black-felt.png");
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Forge Glow at Bottom */
.auth-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: radial-gradient(ellipse at bottom, rgba(255, 85, 0, 0.25), transparent 70%);
    pointer-events: none;
    animation: heat-pulse 3s infinite alternate;
    z-index: 1;
}

@keyframes heat-pulse {
    0% {
        opacity: 0.5;
        height: 60px;
    }

    100% {
        opacity: 0.9;
        height: 100px;
    }
}

.auth-modal-overlay.active .auth-box {
    transform: scale(1);
    border-color: var(--magma-orange);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(255, 85, 0, 0.3);
}

/* --- CLOSE BUTTON --- */
.auth-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #666;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.2s;
    z-index: 5;
}

.auth-close:hover {
    color: var(--magma-orange);
    text-shadow: 0 0 10px rgba(255, 85, 0, 0.5);
}

/* --- AUTH STEPS --- */
.auth-step {
    display: none;
    position: relative;
    z-index: 2;
}

.auth-step.active {
    display: block;
    animation: fadeInAuth 0.5s;
}

/* --- HEADER --- */
.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 1);
}

.text-glow-strike {
    color: #ff4500 !important;
    text-shadow: 0 0 20px #ff4500, 0 0 40px #ff0000 !important;
    transform: scale(1.05);
}

.auth-header p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 25px;
}

/* --- ROBLOX LOGIN BUTTON --- */
.btn-roblox-login {
    background: #fff;
    color: #000;
    font-weight: 800;
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 10px;
    transition: 0.3s;
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.btn-roblox-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

/* --- INPUT FIELDS --- */
.blox-input {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #333;
    color: #fff;
    margin-bottom: 15px;
    border-radius: 6px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    z-index: 2;
    transition: all 0.3s;
}

.blox-input:focus {
    border-color: var(--magma-orange);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.3), inset 0 0 10px rgba(255, 69, 0, 0.1);
}

/* --- CREATE ACCOUNT BUTTON --- */
.btn-create-acc {
    background: linear-gradient(135deg, var(--magma-orange), var(--magma-red));
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(255, 69, 0, 0.3);
    position: relative;
    z-index: 2;
}

.btn-create-acc:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 69, 0, 0.6);
}

.btn-create-acc:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- LOADER SPINNER --- */
.loader {
    border: 4px solid #333;
    border-top: 4px solid var(--magma-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* --- SECURITY AREA (Hammer Strike) - EPIC FORGE --- */
@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 15px rgba(255, 85, 0, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(255, 85, 0, 1)) drop-shadow(0 0 50px rgba(255, 50, 0, 0.5));
    }
}

@keyframes ember-float {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(0.3);
        opacity: 0;
    }
}

@keyframes anvil-heat {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(255, 50, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 50px rgba(255, 85, 0, 0.5), 0 0 80px rgba(255, 50, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
    }
}

.security-area {
    width: 380px !important;
    margin: 10px auto;
    position: relative;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 2;
}

.anvil-video {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid #ff5500;
    z-index: 1;
    background: #000;
    transition: all 0.1s ease;
    animation: anvil-heat 3s ease-in-out infinite;
}

/* Massive spark effect when hit */
.anvil-video.spark {
    border-color: #fff;
    box-shadow:
        0 0 50px rgba(255, 255, 255, 1),
        0 0 100px rgba(255, 85, 0, 0.8),
        0 0 150px rgba(255, 50, 0, 0.5),
        inset 0 0 30px rgba(255, 200, 100, 0.6);
    transform: scale(1.02);
    filter: brightness(1.3);
}

.hammer-base {
    position: absolute;
    z-index: 2;
    cursor: pointer;
    width: 130px;
    height: auto;
    top: 60px !important;
    transition: filter 0.2s, transform 0.1s;
    filter: drop-shadow(0 0 8px rgba(255, 85, 0, 0.4));
}

.hammer-base:hover {
    filter: drop-shadow(0 0 25px var(--magma-orange)) drop-shadow(0 0 40px rgba(255, 50, 0, 0.6)) brightness(1.3);
    transform: scale(1.05);
}

.hammer-right {
    right: -50px !important;
    transform-origin: bottom left;
    transform: rotate(30deg);
}

.hammer-left {
    left: -60px !important;
    top: 75px !important;
    transform-origin: bottom right;
    transform: rotate(-20deg);
}

.hammer-right.striking {
    animation: hammer-strike-right 0.2s ease-out forwards;
}

.hammer-left.striking {
    animation: hammer-strike-left 0.2s ease-out forwards;
}

/* --- PROGRESS BAR - FIRE FORGE --- */
@keyframes fire-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 85, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 85, 0, 0.8), 0 0 30px rgba(255, 50, 0, 0.4);
    }
}

.progress-container {
    width: 100%;
    height: 12px;
    background: linear-gradient(to bottom, #111, #1a1a1a);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid #333;
    position: relative;
    z-index: 2;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff5500, #ff8c00, #ffcc00, #ff8c00, #ff5500);
    background-size: 200% 100%;
    animation: fire-pulse 1.5s ease-in-out infinite;
    transition: width 0.3s ease;
    border-radius: 6px;
}

/* --- ANIMATIONS --- */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

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

@keyframes hammer-strike-right {
    0% {
        transform: rotate(30deg);
    }

    50% {
        transform: rotate(-45deg);
    }

    100% {
        transform: rotate(30deg);
    }
}

@keyframes hammer-strike-left {
    0% {
        transform: rotate(-20deg);
    }

    50% {
        transform: rotate(45deg);
    }

    100% {
        transform: rotate(-20deg);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 500px) {
    .auth-box {
        width: 95%;
        padding: 30px 20px;
    }

    .security-area {
        width: 100% !important;
        transform: scale(0.8);
    }
}