:root {
    --boulder-50: #f6f6f6;
    --boulder-100: #e7e7e7;
    --boulder-200: #d1d1d1;
    --boulder-300: #b0b0b0;
    --boulder-400: #888888;
    --boulder-500: #787878;
    --boulder-600: #5d5d5d;
    --boulder-700: #4f4f4f;
    --boulder-800: #454545;
    --boulder-900: #3d3d3d;
    --boulder-950: #262626;

    --salem-50: #f2fbf5;
    --salem-100: #e1f7e9;
    --salem-200: #c5edd2;
    --salem-300: #97deb0;
    --salem-400: #62c685;
    --salem-500: #3cab64;
    --salem-600: #2a844a;
    --salem-700: #266f40;
    --salem-800: #235836;
    --salem-900: #1e492e;
    --salem-950: #0c2717;

    --surface: #fafcfb;
    --on-surface: var(--boulder-950);
    --on-surface-muted: var(--boulder-500);
    --accent: var(--salem-500);
    --accent-hover: var(--salem-600);
    --accent-glow: rgba(60, 171, 100, 0.35);
    --accent-surface: var(--salem-50);
    --card-bg: rgba(255, 255, 255, 0.55);
    --card-border: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
    --surface: #0a0f0d;
    --on-surface: var(--boulder-100);
    --on-surface-muted: var(--boulder-400);
    --accent: var(--salem-400);
    --accent-hover: var(--salem-300);
    --accent-glow: rgba(98, 198, 133, 0.25);
    --accent-surface: rgba(30, 73, 46, 0.25);
    --card-bg: rgba(20, 30, 26, 0.60);
    --card-border: rgba(98, 198, 133, 0.10);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --surface: #0a0f0d;
        --on-surface: var(--boulder-100);
        --on-surface-muted: var(--boulder-400);
        --accent: var(--salem-400);
        --accent-hover: var(--salem-300);
        --accent-glow: rgba(98, 198, 133, 0.25);
        --accent-surface: rgba(30, 73, 46, 0.25);
        --card-bg: rgba(20, 30, 26, 0.60);
        --card-border: rgba(98, 198, 133, 0.10);
    }
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Google Sans', 'Product Sans', sans-serif;
    background: var(--surface);
    color: var(--on-surface);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15%;
    overflow: hidden;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease;
}

.circle-reveal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, var(--salem-400) 0%, var(--salem-700) 100%);
    z-index: 5;
    pointer-events: none;
    animation: curveReveal 1.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.circle-reveal.closing {
    pointer-events: auto;
    animation: curveHide 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes curveReveal {
    0% {
        clip-path: ellipse(150vw 150vh at 50vw 50vh);
    }
    100% {
        clip-path: ellipse(45vw 70vh at 0vw 50vh);
    }
}

@keyframes curveHide {
    0% {
        clip-path: ellipse(45vw 70vh at 0vw 50vh);
    }
    100% {
        clip-path: ellipse(150vw 150vh at 50vw 50vh);
    }
}

.redirect-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 520px;
    padding: 3rem 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    opacity: 0;
    animation: cardEntrance 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.redirect-container.closing {
    animation: cardExit 0.4s forwards;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes cardExit {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

.redirect-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background: var(--accent-surface);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: iconAppear 0.5s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

.redirect-icon .material-symbols-outlined {
    font-size: 36px;
    color: var(--accent);
    z-index: 1;
}

@keyframes iconAppear {
    from { opacity: 0; transform: scale(0.5) rotate(-20deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

.redirect-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--on-surface);
    opacity: 0;
    animation: textReveal 0.6s 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.redirect-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--on-surface-muted);
    margin-bottom: 2rem;
    opacity: 0;
    animation: textReveal 0.6s 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(16px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.redirect-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 32px;
    background: var(--salem-950);
    color: #fff;
    font-family: 'Google Sans', 'Product Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    min-width: 48px;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1),
                background-color 0.25s cubic-bezier(0.2, 0, 0, 1),
                box-shadow 0.25s cubic-bezier(0.2, 0, 0, 1),
                color 0.25s ease;
    opacity: 0;
    animation: textReveal 0.6s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.redirect-cta-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    z-index: 0;
    transition: width 1s linear;
}

.btn-text, .material-symbols-outlined {
    position: relative;
    z-index: 1;
}

.btn-text {
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1), letter-spacing 0.25s ease;
}

.redirect-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.redirect-cta:hover .btn-text {
    letter-spacing: 0.025em;
    transform: translateX(1px);
}

.redirect-cta:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.redirect-cta .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.redirect-cta .material-symbols-outlined {
    font-size: 20px;
}

@media (max-width: 768px) {
    body {
        justify-content: center;
        align-items: flex-start;
        padding-top: 15vh;
        padding-right: 0;
    }

    @keyframes curveReveal {
        0% {
            clip-path: ellipse(150vw 150vh at 50vw 50vh);
        }
        100% {
            clip-path: ellipse(75vw 45vh at 50vw 100vh);
        }
    }

    @keyframes curveHide {
        0% {
            clip-path: ellipse(75vw 45vh at 50vw 100vh);
        }
        100% {
            clip-path: ellipse(150vw 150vh at 50vw 50vh);
        }
    }

    @keyframes cardEntrance {
        0% {
            opacity: 0;
            transform: translateY(-40px) scale(0.95);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes cardExit {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        100% {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }
    }

    .redirect-container {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }
    .redirect-title { font-size: 1.5rem; }
    .redirect-subtitle { font-size: 0.9375rem; }
    .redirect-cta { padding: 12px 26px; font-size: 0.875rem; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .circle-reveal { display: none; }
    .redirect-container,
    .redirect-icon,
    .redirect-title,
    .redirect-subtitle,
    .redirect-cta {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}
