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

:root {
    --bg-primary: #030303;
    --bg-secondary: #151518;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.38);
    --glass-bg: rgba(255, 255, 255, 0.06);
}

html {
    height: 100%;
    min-height: 100lvh;
    overflow: hidden;
    background-color: var(--bg-primary);
    background-image: radial-gradient(
        circle at 50% 50%,
        var(--bg-secondary) 0%,
        var(--bg-secondary) 32%,
        var(--bg-primary) 72%
    );
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

body {
    min-height: 100%;
    background: transparent;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overflow-x: hidden;
}

.container {
    position: relative;
    z-index: 1;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(28px, env(safe-area-inset-top)) 36px max(28px, env(safe-area-inset-bottom));
}

.content {
    width: 100%;
    max-width: 340px;
    text-align: center;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wiki-box {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 22px;
    text-align: left;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

.wiki-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

.wiki-title {
    position: relative;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    animation: fadeIn 0.5s ease-out 0.2s forwards;
    opacity: 0;
}

.wiki-text {
    position: relative;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeIn 0.5s ease-out 0.35s forwards;
    opacity: 0;
}

.wiki-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hieroglyph {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
}

.email-form {
    width: 100%;
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 9999px;
    min-height: 50px;
    padding: 4px 8px 4px 4px;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    overflow: hidden;
}

.input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    border-radius: 9999px 9999px 0 0;
    pointer-events: none;
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

input[type="email"] {
    position: relative;
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
    padding: 13px 13px 13px 16px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="email"]::placeholder {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.35s ease, background 0.35s ease, color 0.35s ease;
    flex-shrink: 0;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.16) inset,
        0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.submit-btn:hover {
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0) scale(0.98);
}

.submit-btn.has-email {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0.12) 52%,
        rgba(255, 255, 255, 0.18) 100%
    );
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.26),
        0 0 0 1px rgba(255, 255, 255, 0.24) inset,
        0 1px 0 rgba(255, 255, 255, 0.34) inset,
        0 0 22px rgba(255, 255, 255, 0.06);
}

.submit-btn .icon-horus,
.submit-btn .icon-arrow {
    position: absolute;
    display: grid;
    place-items: center;
    line-height: 1;
    transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.submit-btn .icon-horus {
    font-family: 'Noto Sans Egyptian Hieroglyphs', serif;
    font-size: 1.125rem;
    opacity: 1;
    transform: translateY(-2px) rotate(0deg) scale(1);
    transform-origin: 50% 52%;
}

.submit-btn .icon-arrow {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0;
    transform: rotate(-90deg) scale(0.65);
    transform-origin: 50% 50%;
}

.submit-btn.has-email .icon-horus {
    opacity: 0;
    transform: translateY(-2px) rotate(180deg) scale(0.62);
}

.submit-btn.has-email .icon-arrow {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.helper-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 12px;
    animation: fadeIn 0.5s ease-out 0.55s forwards;
    opacity: 0;
}

.success-message {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 22px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.success-message.show {
    display: flex;
    animation: scaleIn 0.3s ease-out forwards;
}

.success-message svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .container {
        align-items: flex-start;
        padding: max(24px, env(safe-area-inset-top)) 32px max(24px, env(safe-area-inset-bottom));
        padding-top: max(32vh, 168px);
    }

    .content {
        max-width: 300px;
        transition: transform 0.25s ease;
    }

    .wiki-box {
        border-radius: 18px;
        margin-bottom: 18px;
        padding: 14px 16px;
    }

    .wiki-box::before {
        border-radius: 18px 18px 0 0;
    }
    
    .wiki-title {
        font-size: 0.9375rem;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    
    .wiki-text {
        font-size: 0.75rem;
        line-height: 1.5;
    }

    .input-wrapper {
        min-height: 48px;
        border-radius: 9999px;
        padding: 4px 7px 4px 4px;
    }

    .input-wrapper::before {
        border-radius: 9999px 9999px 0 0;
    }
    
    input[type="email"] {
        padding: 11px 11px 11px 15px;
        font-size: 16px;
    }
    
    .submit-btn {
        width: 38px;
        height: 38px;
    }

    .submit-btn .icon-horus {
        font-size: 1.05rem;
    }

    .submit-btn .icon-arrow {
        font-size: 1.125rem;
    }

    .helper-text {
        font-size: 0.75rem;
        margin-top: 12px;
    }

    .success-message {
        border-radius: 18px;
        padding: 12px 16px;
        font-size: 0.8125rem;
    }
}
