/* =========================================================
   404 Page Styles — Integrated with Global Theme System
   Uses variables from style.css (:root / [data-theme])
   ========================================================= */

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Particles Background */
#particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Main Container */
.glitch-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Error Code */
.error-code {
    font-size: 10rem;
    font-weight: 900;
    color: var(--cyan-neon);
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    line-height: 1;
}

/* Main Title */
.main-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* =========================================================
   Glitch Effect (theme-aware)
   ========================================================= */

.glitch {
    position: relative;
    animation: glitch-animation 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
}

.glitch::before {
    animation: glitch-before 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    color: var(--accent-danger, #ff453a);
    z-index: -1;
}

.glitch::after {
    animation: glitch-after 0.3s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    color: var(--cyan-neon);
    z-index: -1;
}

@keyframes glitch-animation {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-before {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-4px, 0); }
    66% { transform: translate(4px, 0); }
}

@keyframes glitch-after {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(4px, 0); }
    66% { transform: translate(-4px, 0); }
}

/* =========================================================
   Revelation / Typed Area
   ========================================================= */

.revelation-box {
    min-height: 50px;
}

.reveal-line {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2;
    color: var(--text-secondary);
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.5rem;
    background: var(--cyan-neon);
    margin-left: 2px;
    animation: blink 0.7s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* =========================================================
   Message Container
   ========================================================= */

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

.message {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.message.large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyan-neon);
    margin: 3rem 0;
}

.message.emphasis {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-danger, #ff453a);
}

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

/* =========================================================
   CTA Section
   ========================================================= */

.cta-section {
    margin-top: 4rem;
    transition: opacity 1s ease;
}

.btn-primary-404 {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--midnight);
    background: linear-gradient(
        135deg,
        var(--cyan-neon) 0%,
        var(--primary-blue) 100%
    );
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.3);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.btn-primary-404::before {
    content: '';
    position: absolute;
    inset: 0;
    left: -100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary-404:hover::before {
    left: 100%;
}

.btn-primary-404:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 229, 255, 0.5);
}

.btn-arrow {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.btn-primary-404:hover .btn-arrow {
    transform: translateX(5px);
}

/* =========================================================
   Final Texts
   ========================================================= */

.final-quote {
    font-size: 1.1rem;
    color: var(--text-tertiary);
    line-height: 1.8;
    margin: 2rem 0;
    font-style: italic;
}

.final-quote em {
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.final-question {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-danger, #ff453a);
    margin: 2rem 0 3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Back Link */
.back-link {
    display: inline-block;
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 1rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--cyan-neon);
    border-color: var(--cyan-neon);
    background: rgba(0, 229, 255, 0.1);
}


/* Estilo para o Mockup do Livro no Terminal */
.mockup-logos {
    max-width: 80%; /* Garante que a imagem não estoure o container */
    height: auto;
    display: block;
    margin: 20px auto;
    
    /* Arredondamento simples */
    border-radius: 12px;
    
    /* Sombra leve e discreta */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    
    /* Transição suave para o hover */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Hover discreto */
.mockup-logos:hover {
    /* Apenas um leve realce */
    transform: translateY(-5px); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}



/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
    .error-code { font-size: 6rem; }
    .main-title { font-size: 2rem; }
    .reveal-line { font-size: 1.2rem; }
    .message { font-size: 1.2rem; }
    .message.large { font-size: 1.5rem; }
    .message.emphasis { font-size: 1.3rem; }
    .btn-primary-404 {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
    .final-question { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .error-code { font-size: 4rem; }
    .main-title { font-size: 1.5rem; }
    .glitch-container { padding: 1rem; }
}
.mockup-logos {
    max-width: 420px;
    width: 100%;
    margin: 2.5rem auto;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

@media (max-width: 768px) {
    .mockup-logos {
        max-width: 300px;
    }
}
