/* =========================================================================
 *  Everymail Security Tool - Stylesheet (v3 — Full redesign)
 * =========================================================================
 *  Design: Centered / Glass morphism / Animated
 * ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --em-purple:      #7B2FF7;
    --em-purple-dark: #4A17A8;
    --em-purple-deep: #2D0E6B;

    --em-white:     #ffffff;
    --em-text:      #1C2B3A;
    --em-text-gray: #6B7A8F;

    --em-danger-bg: #FDECEA;
    --em-danger-br: #F5C6CB;
    --em-danger-tx: #721C24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--em-text);
    background: #0F0620;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* =========================================================================
 *  PAGE — centered full-screen with animated orbs
 * ========================================================================= */
.em-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, #2D0E6B 0%, transparent 45%),
        radial-gradient(circle at 80% 90%, #4A17A8 0%, transparent 45%),
        linear-gradient(135deg, #0F0620 0%, #1A0B3D 50%, #0F0620 100%);
}

/* Floating orbs */
.em-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    animation: em-float 12s ease-in-out infinite;
}
.em-orb-1 {
    width: 380px; height: 380px;
    background: #7B2FF7;
    top: -100px; left: -100px;
}
.em-orb-2 {
    width: 320px; height: 320px;
    background: #A78BFA;
    bottom: -80px; right: -80px;
    animation-delay: -4s;
}
.em-orb-3 {
    width: 240px; height: 240px;
    background: #4A17A8;
    top: 50%; right: 15%;
    animation-delay: -8s;
}

@keyframes em-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -20px) scale(1.05); }
    66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* =========================================================================
 *  CENTER CONTENT
 * ========================================================================= */
.em-center {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    text-align: center;
}

/* Badge */
.em-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    color: #C4B5FD;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}
.em-badge-dot {
    width: 6px; height: 6px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 12px #22C55E;
    animation: em-pulse 2s ease-in-out infinite;
}

@keyframes em-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.3); }
}

/* Small logo */
.em-logo-small {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.em-logo-small img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

/* Hero Title */
.em-hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin-bottom: 1rem;
}

.em-gradient-text {
    background: linear-gradient(135deg, #A78BFA 0%, #7B2FF7 50%, #C4B5FD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.em-hero-sub {
    font-size: 15px;
    color: #B8A9D9;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* =========================================================================
 *  GLASS CARD
 * ========================================================================= */
.em-glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* =========================================================================
 *  CAPTCHA DISPLAY (New style)
 * ========================================================================= */
.em-captcha-display {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 76px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.15), rgba(74, 23, 168, 0.25));
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
}

.em-captcha-shimmer {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    animation: em-shimmer 3s ease-in-out infinite;
}

@keyframes em-shimmer {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}

.em-captcha-text {
    position: relative;
    z-index: 2;
    font-family: 'Courier New', monospace;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 12px;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.6);
    padding-left: 12px;
}

/* =========================================================================
 *  INPUT
 * ========================================================================= */
.em-input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 16px;
    letter-spacing: 1px;
    text-align: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    outline: none;
    transition: all .2s;
    margin-bottom: 14px;
}
.em-input:focus {
    border-color: #A78BFA;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(123, 47, 247, 0.2);
}
.em-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: normal;
}

/* =========================================================================
 *  ERROR
 * ========================================================================= */
.em-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #FCA5A5;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 14px;
    text-align: left;
}

/* =========================================================================
 *  SUBMIT BUTTON
 * ========================================================================= */
.em-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #7B2FF7 0%, #4A17A8 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all .2s;
    box-shadow: 0 10px 30px rgba(123, 47, 247, 0.4);
}
.em-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(123, 47, 247, 0.55);
    background: linear-gradient(135deg, #8B3FFF 0%, #5A27C8 100%);
}
.em-submit:active {
    transform: translateY(0);
}
.em-submit-arrow {
    transition: transform .2s;
}
.em-submit:hover .em-submit-arrow {
    transform: translateX(4px);
}

/* =========================================================================
 *  TRUST BADGE
 * ========================================================================= */
.em-trust {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}
.em-trust-dot {
    width: 6px; height: 6px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 8px #22C55E;
}

/* =========================================================================
 *  SHIELD STAGE (Download page)
 * ========================================================================= */
.em-shield-stage {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.em-shield-main {
    width: 110px;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 12px 30px rgba(123, 47, 247, 0.5));
    animation: em-shield-float 4s ease-in-out infinite;
}

@keyframes em-shield-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.em-shield-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(167, 139, 250, 0.3);
    animation: em-ring 3s ease-out infinite;
}
.em-ring-delay {
    animation-delay: 1.5s;
}

@keyframes em-ring {
    0%   { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* =========================================================================
 *  DOWNLOAD BUTTONS
 * ========================================================================= */
.em-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1rem;
}

.em-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all .2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
}
.em-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 12px 30px rgba(123, 47, 247, 0.3);
}

.em-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7B2FF7, #4A17A8);
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(123, 47, 247, 0.4);
}

.em-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
    flex: 1;
}
.em-btn-text strong {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}
.em-btn-text small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.em-btn-arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform .2s, color .2s;
}
.em-btn:hover .em-btn-arrow {
    transform: translateX(4px);
    color: #A78BFA;
}

/* =========================================================================
 *  FOOTNOTE
 * ========================================================================= */
.em-footnote {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.6;
}

/* =========================================================================
 *  COUNTDOWN OVERLAY
 * ========================================================================= */
.em-countdown {
    position: fixed;
    inset: 0;
    background: rgba(15, 6, 32, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}
.em-countdown.show {
    display: flex;
    animation: em-fade-in .3s ease;
}

@keyframes em-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.em-countdown-inner {
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.em-cd-logo {
    height: 36px;
    width: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.em-cd-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: .5rem;
    letter-spacing: -0.3px;
}

.em-cd-sub {
    font-size: 14px;
    color: #B8A9D9;
    margin-bottom: 2rem;
}

.em-cd-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
}
.em-cd-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}
.em-cd-track {
    fill: none;
    stroke: rgba(167, 139, 250, 0.15);
    stroke-width: 8;
}
.em-cd-progress {
    fill: none;
    stroke: url(#emGradient);
    stroke: #A78BFA;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset .95s linear;
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.8));
}
.em-cd-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.6);
}

.em-cd-redirect {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
}
.em-cd-redirect strong {
    color: #A78BFA;
}

/* =========================================================================
 *  Responsive
 * ========================================================================= */
@media (max-width: 600px) {
    .em-page { padding: 2rem 1rem; }

    .em-hero-title { font-size: 28px; }
    .em-hero-sub { font-size: 14px; }

    .em-glass-card { padding: 1.25rem; border-radius: 16px; }

    .em-captcha-display { height: 68px; }
    .em-captcha-text { font-size: 28px; letter-spacing: 10px; }

    .em-shield-stage { width: 130px; height: 130px; }
    .em-shield-main { width: 90px; }

    .em-cd-circle { width: 130px; height: 130px; }
    .em-cd-number { font-size: 40px; }
}

@media (max-width: 400px) {
    .em-hero-title { font-size: 24px; }
    .em-captcha-text { font-size: 24px; letter-spacing: 8px; }
}