/*
 * Mis Pasos Doy - Estética del Vacío Blanco
 * Pureza, silencio, soberanía interior.
 */

:root {
    --bg-white: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-muted: #888888;
    --text-light: #AAAAAA;
    --border-soft: rgba(0, 0, 0, 0.08);
    --font-serif: "Newsreader", "Cardo", "Georgia", "Baskerville", serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-white);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* Contenedor Universal */
.stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    transition: opacity 0.5s ease;
}

/* ========================================================
   FASE 1: EL SILENCIO (PANTALLA INICIAL)
   ======================================================== */
.silence-container {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Cursor Parpadeante */
.cursor-anchor {
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: 24px;
    animation: gentleBlink 1.4s infinite;
}

@keyframes gentleBlink {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.1; }
}

/* Campo de Texto sin Bordes */
.input-duda {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-serif);
    font-size: 23px;
    line-height: 1.5;
    color: var(--text-primary);
    text-align: center;
    resize: none;
    margin-bottom: 30px;
    caret-color: var(--text-primary);
}

.input-duda::placeholder {
    color: var(--text-light);
    font-style: italic;
    font-weight: 300;
}

/* Acciones Iniciales */
.actions-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-trigger {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-trigger:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-enviar-duda {
    background: var(--text-primary);
    color: var(--bg-white);
    border: 1px solid var(--text-primary);
}

.btn-enviar-duda:hover {
    background: #000;
}

/* Input File Oculto */
#fileInput {
    display: none;
}

/* ========================================================
   FASE 2: EL SÍMBOLO (PALOMA EN PROCESAMIENTO)
   ======================================================== */
.processing-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.dove-svg {
    width: 58px;
    height: 58px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: doveWingFlutter 2s infinite ease-in-out;
}

@keyframes doveWingFlutter {
    0%, 100% {
        transform: translateY(0px) scaleY(1);
    }
    50% {
        transform: translateY(-8px) scaleY(0.85);
    }
}

.processing-hint {
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-style: italic;
    opacity: 0.7;
}

/* ========================================================
   FASE 3: LA REVELACIÓN (CORTE LIMPIO)
   ======================================================== */
.revelation-container {
    display: none;
    width: 100%;
    max-width: 640px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInRevelation 0.8s ease forwards;
}

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

.dove-static {
    width: 32px;
    height: 32px;
    stroke: var(--text-muted);
    stroke-width: 1.4;
    fill: none;
    margin-bottom: 34px;
    opacity: 0.6;
}

.revelation-text {
    font-family: var(--font-serif);
    font-size: 26px;
    line-height: 1.65;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-weight: 400;
    white-space: pre-line;
    max-width: 580px;
}

.revelation-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-share {
    background: var(--text-primary);
    color: var(--bg-white);
    border: none;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-share:hover {
    background: #000;
    transform: translateY(-1px);
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* Enlace discreto a la Ofrenda (esquina inferior derecha) */
.ofrenda-link {
    position: fixed;
    bottom: 20px;
    right: 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s;
    z-index: 10;
}

.ofrenda-link:hover {
    color: var(--text-primary);
}

/* Canvas Oculto para Generación 9:16 */
#cardCanvas {
    display: none;
}

/* Toast Sutil */
.toast-notice {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-white);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 12.5px;
    display: none;
    z-index: 100;
    animation: toastFade 0.3s ease;
}

@keyframes toastFade {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
    .input-duda {
        font-size: 20px;
    }
    .revelation-text {
        font-size: 22px;
        line-height: 1.55;
    }
    .revelation-actions {
        flex-direction: column;
        width: 100%;
        max-width: 240px;
    }
    .btn-share, .btn-reset {
        width: 100%;
        justify-content: center;
    }
}
