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

:root {
    --cursor-x: 50%;
    --cursor-y: 50%;
    --page-bg: #05070d;
    --text-color: #f8fbff;
    --accent: #ffd84a;
    --accent-rgb: 255, 216, 74;
    --accent-two: #57d8ff;
    --accent-two-rgb: 87, 216, 255;
    --accent-three: #ff7ad9;
    --accent-three-rgb: 255, 122, 217;
    --glow-rgb: 138, 43, 226;
    --bg-one: #321252;
    --bg-two: #06364b;
    --bg-mid: #10131f;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-color);
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    cursor: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(var(--accent-rgb), 0.7) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(var(--accent-two-rgb), 0.75) 0 1px, transparent 1.4px);
    background-size: 42px 42px, 68px 68px, 96px 96px;
    background-position: 0 0, 18px 26px, 42px 18px;
    opacity: 0.42;
    pointer-events: none;
    animation: star-glitter 7s linear infinite;
}

.background {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.08), transparent 12%),
        radial-gradient(circle at 78% 72%, rgba(var(--accent-two-rgb), 0.08), transparent 16%),
        radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(var(--accent-rgb), 0.18), transparent 18%),
        radial-gradient(circle at top left, var(--bg-one), transparent 42%),
        radial-gradient(circle at bottom right, var(--bg-two), transparent 42%),
        linear-gradient(135deg, var(--page-bg), var(--bg-mid) 50%, var(--page-bg));
    transition: background-position 0.25s ease;
}

.glass-overlay {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.galaxy-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(var(--glow-rgb), 0.25);
    filter: blur(120px);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#stars {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cursor {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1);
    animation: cursor 5s infinite;
    pointer-events: none;
    box-shadow: 0 0 20px var(--accent),
                0 0 60px var(--accent-three),
                0 0 100px rgba(var(--accent-rgb), 0.75);
    mix-blend-mode: screen;
    opacity: 0;
    transition: height 0.2s ease, width 0.2s ease, opacity 0.2s ease;
}

.cursor::before {
    content: "";
    position: absolute;
    inset: -22px;
    border-radius: inherit;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.95) 0 2px, transparent 2.6px),
        radial-gradient(circle at 72% 16%, rgba(var(--accent-two-rgb), 0.95) 0 1.6px, transparent 2.2px),
        radial-gradient(circle at 86% 42%, rgba(var(--accent-rgb), 0.92) 0 1.8px, transparent 2.4px),
        radial-gradient(circle at 78% 74%, rgba(var(--accent-three-rgb), 0.95) 0 1.7px, transparent 2.3px),
        radial-gradient(circle at 48% 88%, rgba(255, 255, 255, 0.9) 0 1.5px, transparent 2.1px),
        radial-gradient(circle at 15% 68%, rgba(var(--accent-two-rgb), 0.88) 0 1.7px, transparent 2.4px),
        radial-gradient(circle at 10% 40%, rgba(var(--accent-rgb), 0.84) 0 1.4px, transparent 2px),
        radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.78) 0 1.2px, transparent 1.8px),
        radial-gradient(circle at 62% 55%, rgba(var(--accent-two-rgb), 0.78) 0 1.3px, transparent 1.9px);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    animation: cursor-sparkle 1.4s ease-in-out infinite;
}

.cursor::after {
    content: "";
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: inherit;
    transform: scale(1);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cursor.is-hovering {
    height: 34px;
    width: 34px;
    background: rgba(255, 255, 255, 0.16);
}

.cursor.is-hovering::after {
    border-color: rgba(var(--accent-rgb), 0.8);
    transform: scale(1.45);
}

body[data-cursor="ring"] .cursor {
    height: 30px;
    width: 30px;
    border: 3px solid var(--accent-two);
    background: transparent;
    box-shadow: 0 0 18px var(--accent-two),
                inset 0 0 14px rgba(var(--accent-two-rgb), 0.45);
}

body[data-cursor="ring"] .cursor::after {
    inset: 7px;
    border: 0;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
}

body[data-cursor="diamond"] .cursor {
    height: 24px;
    width: 24px;
    border-radius: 7px;
    background: linear-gradient(135deg, #fff8b5, var(--accent-three) 48%, var(--accent-two));
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 20px rgba(var(--accent-three-rgb), 0.8),
                0 0 70px rgba(var(--accent-two-rgb), 0.55);
}

body[data-cursor="diamond"] .cursor::after {
    inset: -9px;
    border-radius: 9px;
}

body[data-cursor="crosshair"] .cursor {
    height: 34px;
    width: 34px;
    border: 2px solid #ffffff;
    background:
        linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat,
        linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat;
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.75),
                0 0 58px rgba(255, 255, 255, 0.28);
}

body[data-cursor="crosshair"] .cursor::after {
    inset: 9px;
    border-color: rgba(var(--accent-two-rgb), 0.85);
}

.content {
    position: relative;
    z-index: 5;
    width: min(90vw, 620px);
    text-align: center;
    pointer-events: auto;
}

.content h1 {
    font-size: clamp(2.5rem, 9vw, 5.5rem);
    line-height: 0.95;
    margin-bottom: 20px;
    text-shadow: 0 0 35px rgba(var(--accent-rgb), 0.25);
}

.content p {
    max-width: 520px;
    margin: 0 auto 28px;
    color: rgba(248, 251, 255, 0.72);
    font-size: 1rem;
    line-height: 1.6;
}

.cursor-picker {
    position: relative;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 12px 14px 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(var(--accent-two-rgb), 0.08)),
        rgba(9, 13, 28, 0.42);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.22),
                0 0 28px rgba(var(--accent-two-rgb), 0.12);
    backdrop-filter: blur(22px) saturate(150%);
}

.cursor-picker:has(.custom-select.is-open) {
    z-index: 80;
}

.cursor-picker span {
    color: rgba(248, 251, 255, 0.88);
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 0 14px rgba(var(--accent-two-rgb), 0.24);
}

.native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-select {
    position: relative;
    z-index: 1;
    min-width: 190px;
}

.custom-select.is-open {
    z-index: 90;
}

.select-trigger {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 178px;
    border: 1px solid rgba(var(--accent-rgb), 0.5);
    border-radius: 6px;
    padding: 10px 38px 10px 13px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-two-rgb), 0.14)),
        rgba(5, 7, 13, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
                0 0 22px rgba(var(--accent-rgb), 0.12);
    cursor: none;
    outline: none;
    font: inherit;
    font-weight: 700;
    text-align: left;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--accent) 50%),
        linear-gradient(135deg, var(--accent) 50%, transparent 50%),
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-two-rgb), 0.14));
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%,
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-select.is-open .select-trigger,
.select-trigger:hover,
.select-trigger:focus-visible {
    border-color: rgba(var(--accent-two-rgb), 0.85);
    box-shadow: 0 0 0 3px rgba(var(--accent-two-rgb), 0.2),
                0 0 32px rgba(var(--accent-rgb), 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.select-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(var(--accent-two-rgb), 0.34);
    border-radius: 8px;
    list-style: none;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-two-rgb), 0.1)),
        rgba(8, 11, 24, 0.86);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38),
                0 0 28px rgba(var(--accent-two-rgb), 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(22px) saturate(150%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.custom-select.is-open .select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.select-option {
    position: relative;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(248, 251, 255, 0.82);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: left;
    cursor: none;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.select-option + .select-option {
    margin-top: 3px;
}

.select-option:hover,
.select-option.is-selected {
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 50%, rgba(var(--accent-rgb), 0.28), transparent 34%),
        rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.select-option.is-selected::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transform: translateY(-50%);
}

body[data-theme="aurora"] {
    --page-bg: #03130f;
    --accent: #7dffca;
    --accent-rgb: 125, 255, 202;
    --accent-two: #8ea7ff;
    --accent-two-rgb: 142, 167, 255;
    --accent-three: #ff8ee6;
    --accent-three-rgb: 255, 142, 230;
    --glow-rgb: 46, 255, 175;
    --bg-one: #073b2d;
    --bg-two: #202760;
    --bg-mid: #071d22;
}

body[data-theme="neon"] {
    --page-bg: #08030d;
    --accent: #ff2bd6;
    --accent-rgb: 255, 43, 214;
    --accent-two: #00f5ff;
    --accent-two-rgb: 0, 245, 255;
    --accent-three: #b6ff00;
    --accent-three-rgb: 182, 255, 0;
    --glow-rgb: 255, 43, 214;
    --bg-one: #31003f;
    --bg-two: #003b43;
    --bg-mid: #120a22;
}

body[data-theme="firefly"] {
    --page-bg: #050805;
    --accent: #dfff74;
    --accent-rgb: 223, 255, 116;
    --accent-two: #4dff8a;
    --accent-two-rgb: 77, 255, 138;
    --accent-three: #ffbd59;
    --accent-three-rgb: 255, 189, 89;
    --glow-rgb: 138, 255, 70;
    --bg-one: #1e3210;
    --bg-two: #273300;
    --bg-mid: #0b1408;
}

@keyframes cursor {
    0%{
        filter: hue-rotate(0deg);
    }
    100%{
        filter: hue-rotate(360deg);
    }
}

    
@media only screen and (max-width: 768px) {
    .cursor {
        height: 14px;
        width: 14px;
    }

    .cursor.is-hovering {
        height: 26px;
        width: 26px;
    }

    .cursor-picker {
        flex-direction: column;
        width: min(100%, 280px);
        align-items: stretch;
    }

    .custom-select,
    .select-trigger {
        width: 100%;
        min-width: 0;
    }
}

@keyframes cursor-sparkle {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.84) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.08) rotate(18deg);
    }
}

@keyframes star-glitter {
    0% {
        opacity: 0.28;
        transform: translate3d(0, 0, 0);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0.28;
        transform: translate3d(-18px, 14px, 0);
    }
}
