:root {
    --bg-color: #F2F0E3;
    --accent-color: #2A2A2A;
    --accent-glow: rgba(246, 111, 83, 0.15);
    --text-primary: #2A2A2A;
    --text-secondary: #666666;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(0, 0, 0, 0.05);
    --font-main: 'Outfit', sans-serif;
    --orange: #F66F53;
    --light-blue: #00D4FF;
    --soft-blue: #B5E5FF;
    --cursor-color: var(--orange);
}

html,
body,
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    opacity: 0; /* Hidden initially, script will fade it in */
    transition: opacity 0.3s ease;
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--cursor-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-glow);
    will-change: transform;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-cursor.success-expanded::before {
    transform: scale(3000);
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
    background-color: var(--orange);
    box-shadow: none;
}

.cursor-label {
    position: absolute;
    top: 10px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--cursor-color);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-2px);
    pointer-events: none;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.custom-cursor.has-label .cursor-label {
    opacity: 1;
    transform: translateY(0);
}

.custom-cursor.success-expanded .cursor-label {
    position: absolute;
    top: 50%;
    left: 50%;
    opacity: 1;
    transition: opacity 0.6s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Success Screen Typography & Layout */
.success-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    pointer-events: none;
}

.success-title-wrapper {
    overflow: hidden;
    margin-bottom: 6px;
}

.success-title-text {
    font-family: 'Jomhuria', serif;
    font-size: clamp(55px, 9vw, 110px);
    line-height: 0.85;
    color: #ffffff !important;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transform: translateY(100%);
    animation: success-text-reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

.success-subtitle-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(9px, 1.2vw, 12px);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85) !important;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(15px);
    animation: success-fade-slide-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.7s;
}

@keyframes success-text-reveal {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes success-fade-slide-up {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Shockwave Ring */
.success-shockwave {
    position: fixed;
    top: var(--y);
    left: var(--x);
    width: 12px;
    height: 12px;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.9;
    will-change: transform, opacity;
    animation: shockwave-expand 0.9s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

@keyframes shockwave-expand {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(55);
        opacity: 0;
    }
}

/* Success Exploding Particles */
.success-particle {
    position: fixed;
    width: var(--size, 6px);
    height: var(--size, 6px);
    background-color: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    will-change: transform, opacity;
}

@keyframes particle-explode {
    0% {
        transform: translate3d(var(--start-x), var(--start-y), 0) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--end-x), var(--end-y), 0) scale(0.2);
        opacity: 0;
    }
}

/* Ambient Parallax Background */
.vector-accent {
    position: fixed;
    top: -125px;
    left: -125px;
    width: 250px;
    height: 250px;
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    opacity: 0.25; /* Decreased opacity a bit */
}

.vector-accent::before,
.vector-accent::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    filter: blur(60px);
    transition: opacity 1.8s ease-in-out;
}

.vector-accent::before {
    background: radial-gradient(circle, rgba(246, 111, 83, 0.25) 0%, rgba(246, 111, 83, 0.05) 60%, transparent 100%);
    opacity: 1;
}

.vector-accent::after {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.25) 0%, rgba(0, 212, 255, 0.05) 60%, transparent 100%);
    opacity: 0;
}

body.cursor-blue .vector-accent::before {
    opacity: 0;
}

body.cursor-blue .vector-accent::after {
    opacity: 1;
}

/* Entrance Animations */
@keyframes main-entrance {
    from {
        opacity: 0;
        transform: translateY(calc(-10vh + 30px));
    }
    to {
        opacity: 1;
        transform: translateY(-10vh);
    }
}

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

::selection {
    background: #F66F53;
    color: #ffffff;
}

main {
    text-align: center;
    transform: translateY(-10vh);
    z-index: 10;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 24px;
    perspective: 1000px;
    cursor: pointer;
    user-select: none;
    min-height: 2em;
}

.subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

.bottom-bar {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 0);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.connect-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 12px 10px 24px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.connect-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.ado-brand {
    font-family: 'Caprasimo', cursive;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
    text-transform: uppercase;
    display: inline-flex;
    cursor: pointer;
    margin-left: 4px;
}

.social-links {
    display: flex;
    gap: 24px;
    margin-left: 24px;
}

.social-links a {
    color: var(--text-primary);
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: -10px;
}

.social-links a:hover {
    color: black;
    opacity: 1;
    transform: translateY(-3px);
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.4));
}


.social-links a svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Subscribe Button */
.subscribe-card {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    z-index: 101;
}

.subscribe-inner {
    width: 40px;
    /* Slightly smaller for optical balance */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(246, 111, 83, 0.15);
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    opacity: 0.85;
    /* Reduced opacity */
}

.subscribe-card:hover .subscribe-inner {
    border-color: var(--orange);
}

.subscribe-card:hover .bell-icon {
    animation: bell-wiggle 1s ease infinite;
    opacity: 1;
}

.bell-icon {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
    transform-origin: center;
    opacity: 0.75;
}

@keyframes bell-wiggle {
    0%, 100% { transform: rotate(0); }
    15% { transform: rotate(15deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    85% { transform: rotate(-2deg); }
}

/* Subscription Popover */
.subscribe-popover {
    position: fixed;
    bottom: 110px;
    right: 25%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    width: 380px;
    font-family: 'Outfit', sans-serif;
    /* Clean, Readable Font */
}

.subscribe-popover.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.3s ease;
}

.popover-title {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.popover-subtitle {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.popover-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-wrapper {
    position: relative;
    flex-grow: 1;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    transform: translateZ(0);
}

.popover-input-group input {
    width: 100%;
    height: 34px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    color: transparent;
    caret-color: transparent;
    box-shadow: 0 0 0 0 transparent inset;
    transition: box-shadow 0.3s ease;
}

.input-wrapper.highlight-border input {
    box-shadow: 0 0 0 1px rgba(246, 111, 83, 0.5) inset;
}

.custom-placeholder {
    position: absolute;
    top: 0;
    left: 12px;
    height: 34px;
    line-height: 34px;
    white-space: nowrap;
    pointer-events: none;
    color: rgba(0, 0, 0, 0.1);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    letter-spacing: 2px;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.3s ease, color 0.8s ease;
    z-index: 10;
}

.custom-placeholder .is-blinking {
    animation: text-blink-orange 0.4s infinite;
}

@keyframes text-blink-orange {

    0%,
    100% {
        color: rgba(246, 111, 83, 0.6);
    }

    50% {
        color: rgba(0, 0, 0, 0.4);
    }
}

.input-wrapper.is-invalid .custom-placeholder {
    opacity: 0;
}

.email-overlay {
    position: absolute;
    top: 0;
    left: 12px;
    height: 34px;
    display: flex;
    align-items: center;
    pointer-events: none;
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    white-space: pre;
    color: var(--text-primary);
    overflow: hidden;
    transition: color 0.8s ease;
}



/* Custom Underscore Cursor */
.custom-underscore {
    display: inline-block;
    width: 9px;
    height: 2px;
    background: var(--orange);
    margin-left: 2px;
    animation: typewriter-blink 0.6s steps(1) infinite;
    transform: translateY(6px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}



.custom-underscore.is-char {
    background: none !important;
    height: auto !important;
    width: auto !important;
    transform: translateY(-1px);
    animation: none;
    /* No blink during transition characters */
}

@keyframes typewriter-blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Invalid State Animations */
.input-wrapper.is-invalid {
    animation: haptic-shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes haptic-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-3px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(3px, 0, 0);
    }
}

.input-wrapper.is-invalid .email-overlay {
    opacity: 0.5;
    transition: all 0.3s ease;
}

.input-wrapper.is-invalid .custom-underscore {
    position: absolute;
    right: 0;
    left: auto;
    transform: translateY(-2.5px) !important;
    width: 100% !important;
    background: linear-gradient(270deg, rgba(246, 111, 83, 0.4) 0%, rgba(246, 111, 83, 0.7) 50%, var(--orange) 95%, var(--orange) 100%) !important;
    height: 1.5px !important;
    transition: width 0.3s ease-out;
    z-index: 20;
    box-shadow: -3px 0 8px rgba(246, 111, 83, 0.7);
    color: transparent !important;
    animation: none;
}

.email-overlay .error-text {
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
}

/* Gas Dissolve for Strikethrough */
.drop-gas {
    animation: gas-dissolve 0.8s forwards ease-in;
}

@keyframes gas-dissolve {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: translateY(18px) scale(1.05);
        opacity: 0;
        filter: blur(12px);
    }
}

/* Simple Fade Transitions */
.gas-entrance {
    animation: fade-in-fast 0.3s forwards ease-out;
}

.gas-fade {
    animation: fade-out-slow 0.5s forwards ease-in-out;
}

@keyframes fade-in-fast {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fade-out-slow {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes error-char-pop {
    0% {
        transform: translateY(5px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.email-overlay span.orange-at {
    color: var(--orange);
    font-weight: 800;
    font-size: 16px;
    transform: translateY(-0.5px);
    display: inline-block;
}

#subscribeBtn {
    height: 30px;
    padding: 0 12px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    font-variant: all-small-caps;
    letter-spacing: 0.5px;
}

#subscribeBtn:hover {
    color: var(--orange);
}

/* Loading Dots Animation */
.dot-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
}

.dot-loader .dot {
    width: 4px;
    height: 4px;
    background-color: currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: dot-bounce 1.4s infinite ease-in-out both;
}

.dot-loader .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot-loader .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-4px);
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(0.6px);
}

.orange-char {
    color: #F66F53 !important;
    display: inline-block;
}

.char-slot.just-solved {
    color: inherit;
    transition: color 0.3s ease;
}

#scramble-text:hover .char-slot.just-solved {
    color: var(--orange);
}

.choice-btn {
    height: 22px;
    padding: 0 8px;
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
}

.choice-btn.show {
    display: block;
    animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.choice-btn:hover {
    transform: scale(1.1);
}

.choice-btn.yes {
    background: #000000;
    color: #ffffff;
    margin-right: -4px;
}

.choice-btn.no {
    background: #000000;
    color: #ffffff;
}

@keyframes pop-in {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}