html.site-ambient-html {
    background-color: #090b16;
    background-image:
        radial-gradient(ellipse at 12% 14%, rgba(120, 87, 255, 0.28), transparent 40%),
        radial-gradient(ellipse at 88% 38%, rgba(46, 137, 235, 0.23), transparent 43%),
        radial-gradient(ellipse at 48% 88%, rgba(30, 173, 174, 0.13), transparent 46%),
        linear-gradient(135deg, #090b16 0%, #111326 50%, #0b1722 100%);
    background-size: 170% 170%, 170% 170%, 170% 170%, 100% 100%;
    background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
}

body.site-ambient-body {
    position: relative;
    isolation: isolate;
    background: transparent;
}

body.site-ambient-body::before {
    position: fixed;
    z-index: -1;
    inset: -22%;
    background-image:
        radial-gradient(ellipse 48% 38% at 15% 23%, transparent 75.5%, rgba(167, 149, 255, 0.22) 75.8%, transparent 76.2%),
        radial-gradient(ellipse 57% 40% at 88% 73%, transparent 73%, rgba(111, 169, 255, 0.18) 73.3%, transparent 73.65%),
        radial-gradient(circle, rgba(214, 222, 255, 0.56) 0.7px, transparent 1.6px),
        radial-gradient(circle, rgba(117, 207, 255, 0.38) 0.8px, transparent 1.8px);
    background-size: auto, auto, 146px 146px, 208px 208px;
    background-position: center, center, 0 0, 62px 38px;
    content: "";
    opacity: 0.72;
    pointer-events: none;
    transform-origin: center;
    animation: site-orbit-drift 30s ease-in-out infinite alternate;
    will-change: transform;
}

body.site-ambient-body::after {
    position: fixed;
    z-index: -1;
    inset: -32%;
    background:
        radial-gradient(ellipse 42% 34% at 16% 18%, rgba(132, 91, 255, 0.34), transparent 76%),
        radial-gradient(ellipse 42% 34% at 84% 31%, rgba(48, 137, 245, 0.28), transparent 78%),
        radial-gradient(ellipse 44% 34% at 58% 84%, rgba(29, 184, 176, 0.2), transparent 80%),
        radial-gradient(ellipse 30% 26% at 42% 54%, rgba(244, 125, 184, 0.1), transparent 78%);
    content: "";
    filter: blur(64px);
    opacity: 0.94;
    pointer-events: none;
    animation: site-ambient-drift 28s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes site-orbit-drift {
    from { transform: translate3d(-2.2%, -1.4%, 0) rotate(-2deg); }
    to { transform: translate3d(2.2%, 1.4%, 0) rotate(2deg); }
}

@keyframes site-ambient-drift {
    from { transform: translate3d(-2.2%, -1.4%, 0) scale(0.98); }
    to { transform: translate3d(2.6%, 1.8%, 0) scale(1.08); }
}

@media (max-width: 620px) {
    body.site-ambient-body::before {
        opacity: 0.5;
        animation: none;
        will-change: auto;
    }

    body.site-ambient-body::after {
        inset: -24%;
        filter: blur(38px);
        opacity: 0.78;
        animation: none;
        will-change: auto;
    }

    .hero-carousel-shell {
        animation: none;
    }

    .hero-slide.is-active .hero-slide-image {
        animation: none;
        transform: scale(1.05);
        will-change: auto;
    }

    .epin-campaign-ribbon::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.site-ambient-html,
    body.site-ambient-body::before,
    body.site-ambient-body::after {
        animation: none;
    }
}

html.site-ambient-html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d17;
    --bg-1: #0c0f1b;
    --bg-2: #12172a;
    --bg-3: #1a2035;
    --surface: #15192b;
    --card: rgba(22, 26, 44, 0.88);
    --header: rgba(12, 14, 26, 0.9);
    --footer: #090b15;
    --border: rgba(168, 177, 226, 0.16);
    --divider: rgba(168, 177, 226, 0.09);
    --text: #f0effb;
    --text-1: #f0effb;
    --text-2: #d7daed;
    --muted: #a4abc2;
    --primary: #8b73f4;
    --primary-hover: #a192ff;
    --secondary: #6269e9;
    --accent: #79aaff;
    --focus: #a99aff;
    --hover: rgba(139, 115, 244, 0.14);
    --active: rgba(104, 151, 255, 0.17);
    --gradient: linear-gradient(120deg, #8b73f4 0%, #6c70ed 54%, #5796ed 100%);
    --shadow: 0 18px 48px rgba(2, 5, 17, 0.36);
    --glow: 0 0 30px rgba(111, 101, 238, 0.2);
    --radius: 12px;
}

body.site-ambient-body {
    color: var(--text-1);
}

.site-header {
    border-bottom-color: rgba(168, 177, 226, 0.15);
    background: linear-gradient(120deg, rgba(11, 14, 26, 0.95), rgba(17, 21, 39, 0.93));
    box-shadow: 0 12px 40px rgba(2, 5, 17, 0.24);
    backdrop-filter: blur(18px);
}

.market-topbar {
    border-bottom-color: var(--divider);
    background: rgba(12, 14, 26, 0.78);
}

.marketplace-nav {
    border-color: rgba(168, 177, 226, 0.1);
    background: rgba(16, 19, 34, 0.86);
    backdrop-filter: blur(16px);
}

.site-header .marketplace-main-row .header-search {
    border-color: rgba(168, 177, 226, 0.16);
    background: linear-gradient(120deg, rgba(23, 27, 46, 0.94), rgba(19, 24, 41, 0.92));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.site-header .marketplace-main-row .header-search button {
    background: var(--gradient);
    box-shadow: 0 5px 16px rgba(106, 105, 235, 0.24);
}

.site-header .marketplace-auth-button.is-register {
    background: var(--gradient);
    box-shadow: 0 3px 10px rgba(5, 10, 28, 0.16);
}

.site-header .marketplace-auth-button.is-login {
    border-color: rgba(126, 161, 220, 0.25);
    background: linear-gradient(120deg, #495989, #426a8b);
    box-shadow: 0 3px 10px rgba(5, 10, 28, 0.16);
}

.site-footer {
    border-top-color: var(--divider);
    background: linear-gradient(180deg, rgba(14, 17, 30, 0.84), rgba(9, 11, 21, 0.96));
}

body.site-ambient-body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]):not(.auth-input-wrap input):not(.header-search input):not(.hero-search input):not(.filter-search input):not(.market-category-search input):not(.category-directory-search input):not(.admin-menu-search input),
body.site-ambient-body select:not(.filter-select select),
body.site-ambient-body textarea {
    border-color: rgba(168, 177, 226, 0.19);
    background-color: rgba(34, 46, 68, 0.94);
    color: var(--text-1);
}

body.site-ambient-body .auth-input-wrap {
    border-color: rgba(168, 186, 224, 0.24);
    background-color: #222e44;
}

body.site-ambient-body .auth-input-wrap:focus-within {
    background-color: #2a3851;
}

body.site-ambient-body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="range"]):not([type="color"]):focus,
body.site-ambient-body select:focus,
body.site-ambient-body textarea:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(139, 115, 244, 0.16);
}

body.site-ambient-body input::placeholder,
body.site-ambient-body textarea::placeholder {
    color: #a6b0c7;
    opacity: 1;
}

body.site-ambient-body .admin-sidebar {
    border-right-color: rgba(168, 177, 226, 0.15);
    background:
        radial-gradient(ellipse at 10% 0, rgba(139, 115, 244, 0.17), transparent 38%),
        linear-gradient(180deg, #13172c, #0b1020 76%);
}

body.site-ambient-body .admin-brand-mark {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 7px 20px rgba(104, 100, 230, 0.24);
}

body.site-ambient-body .admin-nav-group {
    border-color: rgba(168, 177, 226, 0.11);
    background: rgba(21, 25, 43, 0.62);
}

body.site-ambient-body .admin-nav-group > a:hover {
    border-color: rgba(151, 137, 255, 0.2);
    background: rgba(126, 109, 232, 0.12);
}

body.site-ambient-body .admin-nav-group > a.active {
    border-color: rgba(151, 137, 255, 0.25);
    background: linear-gradient(100deg, rgba(119, 99, 225, 0.28), rgba(69, 92, 164, 0.13));
    box-shadow: inset 3px 0 #a091ff, 0 5px 14px rgba(0, 0, 0, 0.14);
}

body.site-ambient-body .admin-nav-group > a.active .admin-nav-icon {
    color: #c3b9ff;
}

body.site-ambient-body .admin-topbar {
    border-bottom-color: rgba(168, 177, 226, 0.13);
    background: rgba(12, 15, 28, 0.92);
}

body.site-ambient-body .admin-main .stat-card {
    border-color: rgba(168, 177, 226, 0.15);
    background:
        radial-gradient(ellipse at 100% 0, rgba(139, 115, 244, 0.1), transparent 52%),
        linear-gradient(145deg, rgba(22, 27, 47, 0.96), rgba(13, 18, 33, 0.96));
}

body.site-ambient-body .admin-main .stat-card:hover {
    border-color: rgba(151, 137, 255, 0.34);
}

body.site-ambient-body .admin-main .btn:not(.btn-outline),
body.site-ambient-body .admin-login-card .btn {
    border-color: transparent;
    background: var(--gradient);
    box-shadow: 0 8px 22px rgba(104, 100, 230, 0.2);
}

body.site-ambient-body .admin-main .btn:not(.btn-outline):hover,
body.site-ambient-body .admin-login-card .btn:hover {
    background: linear-gradient(120deg, #9a84ff 0%, #7779f0 54%, #69a6f1 100%);
}

body.site-ambient-body .admin-login-shell {
    border-color: rgba(168, 177, 226, 0.17);
    background: linear-gradient(145deg, rgba(22, 26, 44, 0.98), rgba(13, 17, 31, 0.98));
    box-shadow: 0 28px 90px rgba(2, 5, 17, 0.42), 0 0 38px rgba(112, 99, 231, 0.1);
}

body.site-ambient-body .admin-login-intro {
    background:
        radial-gradient(ellipse at 12% 15%, rgba(139, 115, 244, 0.19), transparent 50%),
        radial-gradient(ellipse at 92% 84%, rgba(74, 139, 226, 0.13), transparent 45%),
        linear-gradient(145deg, #171a35, #101629);
}

body.site-ambient-body .admin-login-card {
    background: rgba(15, 18, 32, 0.38);
}

.site-header .marketplace-auth-button {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(5, 10, 28, 0.16), inset 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.site-header .marketplace-auth-button > .ui-icon {
    transition: transform 160ms ease;
}

.site-header .marketplace-auth-button.is-register {
    border-color: rgba(171, 155, 243, 0.26);
    background: linear-gradient(120deg, #5b4d91, #50558f);
}

.site-header .marketplace-auth-button.is-login {
    border-color: rgba(126, 161, 220, 0.25);
    background: linear-gradient(120deg, #495989, #426a8b);
}

.site-header .marketplace-auth-button:hover {
    transform: translateY(-1px);
}

.site-header .marketplace-auth-button.is-register:hover {
    border-color: rgba(190, 178, 246, 0.34);
    background: linear-gradient(120deg, #65579a, #5a6098);
    box-shadow: 0 5px 14px rgba(5, 10, 28, 0.2), inset 0 1px rgba(255, 255, 255, 0.1);
}

.site-header .marketplace-auth-button.is-login:hover {
    border-color: rgba(147, 177, 225, 0.34);
    background: linear-gradient(120deg, #536694, #4c7595);
    box-shadow: 0 5px 14px rgba(5, 10, 28, 0.2), inset 0 1px rgba(255, 255, 255, 0.1);
}

.site-header .marketplace-auth-button:active {
    transform: translateY(0);
}

.site-header .marketplace-auth-button:hover > .ui-icon {
    transform: translateY(-1px) scale(1.08);
}

.site-header .marketplace-auth-button:focus-visible {
    outline: 2px solid #d5ccff;
    outline-offset: 3px;
}

html[data-theme="light"] .site-header .marketplace-auth-button.is-register {
    border-color: rgba(93, 79, 159, 0.17);
    background: linear-gradient(120deg, #ece8f7, #e2def1);
    box-shadow: 0 3px 10px rgba(57, 48, 115, 0.1);
    color: #4e456f;
}

html[data-theme="light"] .site-header .marketplace-auth-button.is-login {
    border-color: rgba(58, 91, 145, 0.17);
    background: linear-gradient(120deg, #e5eaf4, #dbe6f0);
    box-shadow: 0 3px 10px rgba(39, 68, 105, 0.1);
    color: #405470;
}

html[data-theme="light"] .site-header .marketplace-auth-button.is-register:hover {
    border-color: rgba(93, 79, 159, 0.28);
    background: linear-gradient(120deg, #e4dff2, #d8d3e9);
}

html[data-theme="light"] .site-header .marketplace-auth-button.is-login:hover {
    border-color: rgba(58, 91, 145, 0.28);
    background: linear-gradient(120deg, #dce4f1, #d1dfed);
}

@media (prefers-reduced-motion: reduce) {
    .site-header .marketplace-auth-button {
        animation: none;
        transition: none;
    }

    .site-header .marketplace-auth-button:hover,
    .site-header .marketplace-auth-button:active {
        transform: none;
    }

    .site-header .marketplace-auth-button:hover > .ui-icon {
        transform: none;
    }
}
