/* =========================================
    PÁGINA EN CONSTRUCCIÓN (GUÍAS)
   ========================================= */

.construction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
    background: radial-gradient(circle at center, rgba(251, 176, 59, 0.05) 0%, transparent 60%);
}

.construction-box {
    background-color: rgba(20, 20, 22, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 60px 40px;
    max-width: 700px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.construction-box h1 {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(251, 176, 59, 0.3);
}

.construction-box p {
    color: #9ca3af;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* --- Animación del Martillo/Pico Sincronizada y Corregida --- */
.mining-animation {
    position: relative;
    width: 180px; /* Ensanchamos el contenedor para dar espacio al martillo */
    height: 120px;
    margin: 0 auto 30px auto;
}

.block-target {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Centrado estricto */
    width: 60px;
    height: 40px;
    background-color: #2a2a2a;
    border: 2px solid #444;
    border-radius: 4px;
    z-index: 2;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.1);
    transform-origin: bottom center; /* Se aplasta hacia el suelo */
    animation: squish 1.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hammer-tool {
    position: absolute;
    bottom: 32px;
    left: 15%;
    font-size: 55px;
    color: #FBB03B;
    transform-origin: bottom left; 
    /* Cambiamos la curva global a 'linear' */
    animation: mine 1.2s infinite linear; 
    filter: drop-shadow(0 0 10px rgba(251, 176, 59, 0.5));
    z-index: 3;
}

.sparks {
    position: absolute;
    bottom: 40px; /* Exactamente en el techo del bloque */
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    z-index: 4;
}

.spark {
    position: absolute;
    width: 6px; /* Chispas ligeramente más grandes */
    height: 6px;
    background-color: #FBB03B;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 8px #FBB03B; /* Resplandor para que no desaparezcan en el fondo */
}

.spark.s1 { animation: spark-fly-1 1.2s infinite; }
.spark.s2 { animation: spark-fly-2 1.2s infinite; }
.spark.s3 { animation: spark-fly-3 1.2s infinite; }

/* 1. Animación del Martillo */
@keyframes mine {
    0% { 
        transform: rotate(-45deg); 
        /* Coge impulso: Sube rápido al principio y frena al llegar arriba */
        animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); 
    }
    35% { 
        transform: rotate(-90deg); 
        /* La caída: Empieza a caer despacio y acelera brutalmente hacia el bloque */
        animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); 
    }
    45% { 
        transform: rotate(30deg); 
        /* El impacto: Tensión máxima contra el bloque, frena en seco */
        animation-timing-function: ease-out; 
    }
    50% { 
        transform: rotate(32deg); 
        /* El rebote: Sale disparado hacia atrás por el choque */
        animation-timing-function: ease-in; 
    }
    60% { 
        transform: rotate(10deg); 
        /* Recuperación: Vuelve a la posición inicial suavemente */
        animation-timing-function: ease-in-out; 
    }
    100% { 
        transform: rotate(-45deg); 
    }
}
/* 2. Animación de Deformación del Bloque (Mantiene el translateX para no moverse) */
@keyframes squish {
    0%, 40% { transform: translateX(-50%) scale(1, 1); }
    45% { transform: translateX(-50%) scale(1.25, 0.55); background-color: #3d3d3d; } /* Aplastamiento severo y destello */
    50% { transform: translateX(-50%) scale(1.15, 0.75); }
    65%, 100% { transform: translateX(-50%) scale(1, 1); background-color: #2a2a2a; } /* Recupera forma */
}

/* 3. Animación de las Chispas (Saltan MUY alto) */
@keyframes spark-fly-1 {
    0%, 44% { transform: translate(0, 0) scale(0); opacity: 0; }
    45% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    65% { transform: translate(-45px, -70px) scale(0); opacity: 0; } /* Vuela a la izquierda y muy alto */
    100% { opacity: 0; }
}

@keyframes spark-fly-2 {
    0%, 44% { transform: translate(0, 0) scale(0); opacity: 0; }
    45% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    65% { transform: translate(0px, -90px) scale(0); opacity: 0; } /* Vuela altísimo en vertical */
    100% { opacity: 0; }
}

@keyframes spark-fly-3 {
    0%, 44% { transform: translate(0, 0) scale(0); opacity: 0; }
    45% { transform: translate(0, 0) scale(1.5); opacity: 1; }
    65% { transform: translate(45px, -60px) scale(0); opacity: 0; } /* Vuela a la derecha y muy alto */
    100% { opacity: 0; }
}

/* --- Barra de Precaución (Warning Tape) --- */
.warning-bar {
    width: 100%;
    height: 12px;
    background-color: #111;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid #333;
}

.warning-stripes {
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        #FBB03B,
        #FBB03B 15px,
        #222 15px,
        #222 30px
    );
    animation: move-stripes 2s linear infinite;
}

@keyframes move-stripes {
    0% { transform: translateX(0); }
    100% { transform: translateX(-42px); }
}

/* --- Botones --- */
.construction-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-return {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-return:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .construction-actions {
        flex-direction: column;
    }
    .construction-box {
        padding: 40px 20px;
    }
    .construction-box h1 {
        font-size: 28px;
    }
}