/* ============================================
DJLI - ESTILOS COMUNES
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;900&display=swap');
@font-face {
    font-family: 'Future Earth';
    src: url('../fonts/future-earth.ttf') format('truetype');
    font-weight: 700 900; 
    font-style: normal; 
    font-display: swap;
}

:root {
    --gold-light: #f5e6b8;
    --gold-medium: #c9a961;
    --gold-dark: #8b6f47;
    --gold-primary: #d4af37;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --bg-gradient-start: #2a2a2a;
    --bg-gradient-end: #000000;
}

/* CORRECCIÓN 1: Añadido el selector universal '*' que faltaba */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    background: radial-gradient(ellipse at center, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 70%, var(--bg-dark) 100%);
    /* CORRECCIÓN 2: Permitir scroll vertical si el contenido es más alto que la pantalla */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    color: var(--gold-medium);
}

/* Efecto de luz de fondo */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%);
    animation: lightShift 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes lightShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10%, 5%); }
}

/* Marco dorado */
.frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    pointer-events: none;
    z-index: 0;
}

.frame::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Contenedor principal */
.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px; /* Reducido ligeramente para dar más margen en pantallas medianas */
    max-width: 900px;
    width: 95%; /* CORRECCIÓN 3: Asegura que no toque los bordes en pantallas pequeñas */
    margin: 0 auto;
}

/* Logo */
.logo-container {
    margin: 0 auto 30px;
    width: 280px;
    height: 280px;
    max-width: 100%;
    animation: fadeInLogo 1.5s ease-out;
}

@keyframes fadeInLogo {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.logo-container svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.3));
}

/* Títulos */
.title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 8px;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 30%, var(--gold-dark) 50%, var(--gold-primary) 70%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    animation: slideUp 1s ease-out 0.3s both;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 12px;
    color: var(--gold-medium);
    margin-bottom: 40px;
    animation: slideUp 1s ease-out 0.5s both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Caja de mensaje */
.message-box {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 30px 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto 40px;
    animation: slideUp 1s ease-out 0.7s both;
}

.message-box p {
    color: rgba(201, 168, 76, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: 0.5px;
}

/* Error Code */
.error-code {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 30%, var(--gold-dark) 50%, var(--gold-primary) 70%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
    animation: slideUp 1s ease-out 0.3s both, glow 2s ease-in-out infinite alternate;
    letter-spacing: -5px;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3)); }
    to { filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.6)); }
}

/* Botón/Link */
.home-link {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-primary) 50%, var(--gold-light) 100%);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 3px;
    border-radius: 5px;
    transition: all 0.3s ease;
    animation: slideUp 1s ease-out 0.9s both;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    margin-bottom: 30px;
}

.home-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

/* Divisor */
.divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    margin: 0 auto 20px;
    animation: slideUp 1s ease-out 1.1s both;
}

/* Footer */
.footer-text {
    font-size: 0.75rem;
    letter-spacing: 6px;
    color: rgba(201, 168, 76, 0.5);
    font-weight: 300;
    animation: slideUp 1s ease-out 1.3s both;
}

/* ============================================
RESPONSIVE MEJORADO
============================================ */
@media (max-width: 768px) {
    .frame {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
    
    .logo-container {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }
    
    .error-code {
        font-size: 6rem;
        letter-spacing: -3px;
    }
    
    .title {
        font-size: 2rem;
        letter-spacing: 5px;
    }
    
    .subtitle {
        font-size: 1rem;
        letter-spacing: 8px;
        margin-bottom: 30px;
    }
    
    .message-box {
        padding: 25px 20px;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .frame {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .container {
        padding: 30px 15px;
        width: 100%;
    }

    .logo-container {
        width: 150px;
        height: 150px;
    }

    .error-code {
        font-size: 4.5rem;
        letter-spacing: -2px;
    }

    .title {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 5px;
    }

    .message-box p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .home-link {
        padding: 12px 25px;
        font-size: 0.85rem;
        letter-spacing: 2px;
        width: 100%;
        max-width: 280px;
    }
    
    .footer-text {
        font-size: 0.65rem;
        letter-spacing: 4px;
    }
}