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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

*, *::selection {
    -webkit-user-select: none;
    user-select: none;
}

#custom-cursor {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    pointer-events: none;
    z-index: 99999;
}

@media (pointer: fine) {
    body, body * {
        cursor: none !important;
    }
    #custom-cursor {
        display: block;
    }
}

#custom-cursor .cursor-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 26px;
    height: 26px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#custom-cursor .cursor-layer.visible {
    opacity: 1;
}

#custom-cursor .cursor-layer img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
}

#custom-cursor.cursor-entry-glow .cursor-layer.visible img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.5));
}

#sand-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: default;
}

#entry-container {
    position: fixed;
    inset: 0;
    z-index: 100;
    cursor: pointer;
    background: #000;
}

#entry-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/dot.png");
    background-repeat: repeat;
    pointer-events: none;
}
#entry-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
#entry-container video.playing {
    display: block;
}
#entry-skip-hint {
    position: absolute;
    bottom: 24px;
    left: 24px;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 22px;
    color: #252525;
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}
#entry-skip-hint.visible {
    opacity: 1;
}
@media (max-width: 767px) {
    #entry-skip-hint {
        display: none;
    }
}

#biolink {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 24px 100px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}
#biolink.visible {
    opacity: 1;
    pointer-events: auto;
}
#biolink-header-wrap {
    position: relative;
    width: min(640px, 60vw);
    aspect-ratio: 1280 / 720;
    margin-bottom: 24px;
    flex-shrink: 0;
}
#biolink-header-shadow {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    mask-image: url(../assets/header.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(../assets/header.svg);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    filter: blur(14px);
    transform: translateY(6px);
    opacity: 0.6;
    pointer-events: none;
}
#biolink-header {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--biolink-header-color, #8acbbd);
    mask-image: url(../assets/header.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(../assets/header.svg);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.3s ease;
}
body:not(.theme-warm):not(.theme-home):not(.theme-sister) #biolink-header {
    --biolink-header-color: #8acbbd;
}
body.theme-warm #biolink-header {
    --biolink-header-color: #cbbc8a;
}
body.theme-home #biolink-header {
    --biolink-header-color: #d76f67;
}
body.theme-sister #biolink-header {
    --biolink-header-color: #94b378;
}
#biolink-owner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 20px 0;
    padding: 10px 20px;
    color: var(--biolink-owner-color, #8acbbd);
    border: 1px solid var(--biolink-owner-border, rgba(138, 203, 189, 0.5));
    border-radius: 8px;
    background: var(--biolink-owner-bg, rgba(0, 0, 0, 0.35));
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.biolink-owner-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-color: var(--biolink-owner-color, #8acbbd);
    mask-image: url(../assets/icons/crown.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(../assets/icons/crown.svg);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.3s ease;
}
body:not(.theme-warm):not(.theme-home):not(.theme-sister) #biolink-owner {
    --biolink-owner-color: #8acbbd;
    --biolink-owner-border: rgba(138, 203, 189, 0.5);
    --biolink-owner-bg: rgba(0, 0, 0, 0.35);
}
body.theme-warm #biolink-owner {
    --biolink-owner-color: #cbbc8a;
    --biolink-owner-border: rgba(203, 188, 138, 0.5);
    --biolink-owner-bg: rgba(0, 0, 0, 0.3);
}
body.theme-home #biolink-owner {
    --biolink-owner-color: #d76f67;
    --biolink-owner-border: rgba(215, 111, 103, 0.5);
    --biolink-owner-bg: rgba(0, 0, 0, 0.35);
}
body.theme-sister #biolink-owner {
    --biolink-owner-color: #94b378;
    --biolink-owner-border: rgba(148, 179, 120, 0.5);
    --biolink-owner-bg: rgba(0, 0, 0, 0.35);
}
#biolink-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 19px;
    max-width: 720px;
}
.biolink-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 19px;
    font-weight: 500;
    color: var(--biolink-text-color, rgba(255, 255, 255, 0.92));
    background: var(--biolink-bg, rgba(0, 0, 0, 0.35));
    border: 1px solid var(--biolink-border, rgba(255, 255, 255, 0.12));
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    pointer-events: auto;
    overflow: hidden;
}
.biolink-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 35%,
        rgba(255, 255, 255, 0.25) 45%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.25) 55%,
        transparent 65%,
        transparent 100%
    );
    transform: translateX(-100%) skewX(-12deg);
    transition: none;
    pointer-events: none;
}
.biolink-link:hover::before {
    transform: translateX(100%) skewX(-12deg);
    transition: transform 0.75s ease;
}
.biolink-link:hover {
    background: var(--biolink-bg-hover, rgba(0, 0, 0, 0.5));
    border-color: var(--biolink-border-hover, rgba(255, 255, 255, 0.2));
}
.biolink-link > .biolink-icon,
.biolink-link > .biolink-text {
    position: relative;
    z-index: 1;
}
.biolink-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-right: 19px;
    background-color: var(--biolink-icon-color, #8acbbd);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.3s ease;
}
.biolink-icon.icon-tiktok { mask-image: url(../assets/icons/tiktok.svg); -webkit-mask-image: url(../assets/icons/tiktok.svg); }
.biolink-icon.icon-twitter { mask-image: url(../assets/icons/twitter.svg); -webkit-mask-image: url(../assets/icons/twitter.svg); }
.biolink-icon.icon-steam { mask-image: url(../assets/icons/steam.svg); -webkit-mask-image: url(../assets/icons/steam.svg); }
.biolink-icon.icon-discord { mask-image: url(../assets/icons/discord.svg); -webkit-mask-image: url(../assets/icons/discord.svg); }
.biolink-icon.icon-poor { mask-image: url(../assets/icons/poor.svg); -webkit-mask-image: url(../assets/icons/poor.svg); }
.biolink-icon.icon-woah { mask-image: url(../assets/icons/woah.svg); -webkit-mask-image: url(../assets/icons/woah.svg); }
body:not(.theme-warm):not(.theme-home):not(.theme-sister) .biolink-icon {
    --biolink-icon-color: #8acbbd;
}
body.theme-warm .biolink-icon {
    --biolink-icon-color: #cbbc8a;
}
body.theme-home .biolink-icon {
    --biolink-icon-color: #d76f67;
}
body.theme-sister .biolink-icon {
    --biolink-icon-color: #94b378;
}
.biolink-text {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.biolink-main {
    font-weight: 600;
    font-size: 20px;
}
.biolink-sub {
    font-weight: 400;
    font-size: 16px;
}
body:not(.theme-warm):not(.theme-home):not(.theme-sister) .biolink-link {
    --biolink-main-color: #8acbbd;
    --biolink-sub-color: #6fb5a8;
    --biolink-text-color: rgba(255, 255, 255, 0.92);
    --biolink-bg: rgba(0, 0, 0, 0.35);
    --biolink-border: rgba(255, 255, 255, 0.12);
    --biolink-bg-hover: rgba(0, 0, 0, 0.5);
    --biolink-border-hover: rgba(255, 255, 255, 0.2);
}
body:not(.theme-warm):not(.theme-home):not(.theme-sister) .biolink-main { color: var(--biolink-main-color); }
body:not(.theme-warm):not(.theme-home):not(.theme-sister) .biolink-sub { color: var(--biolink-sub-color); }
body.theme-warm .biolink-link {
    --biolink-main-color: #cbbc8a;
    --biolink-sub-color: #b5a86a;
    --biolink-text-color: rgba(40, 35, 30, 0.95);
    --biolink-bg: rgba(0, 0, 0, 0.3);
    --biolink-border: rgba(40, 35, 30, 0.35);
    --biolink-bg-hover: rgba(0, 0, 0, 0.45);
    --biolink-border-hover: rgba(40, 35, 30, 0.45);
}
body.theme-warm .biolink-main { color: var(--biolink-main-color); }
body.theme-warm .biolink-sub { color: var(--biolink-sub-color); }
body.theme-home .biolink-link {
    --biolink-main-color: #d76f67;
    --biolink-sub-color: #c45a52;
    --biolink-text-color: rgba(255, 255, 255, 0.92);
    --biolink-bg: rgba(0, 0, 0, 0.35);
    --biolink-border: rgba(215, 111, 103, 0.3);
    --biolink-bg-hover: rgba(0, 0, 0, 0.5);
    --biolink-border-hover: rgba(215, 111, 103, 0.45);
}
body.theme-home .biolink-main { color: var(--biolink-main-color); }
body.theme-home .biolink-sub { color: var(--biolink-sub-color); }
body.theme-sister .biolink-link {
    --biolink-main-color: #94b378;
    --biolink-sub-color: #7a9962;
    --biolink-text-color: rgba(255, 255, 255, 0.92);
    --biolink-bg: rgba(0, 0, 0, 0.35);
    --biolink-border: rgba(148, 179, 120, 0.3);
    --biolink-bg-hover: rgba(0, 0, 0, 0.5);
    --biolink-border-hover: rgba(148, 179, 120, 0.45);
}
body.theme-sister .biolink-main { color: var(--biolink-main-color); }
body.theme-sister .biolink-sub { color: var(--biolink-sub-color); }

#volume-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

#volume-control.visible {
    opacity: 1;
    pointer-events: auto;
}

#volume-icon,
#volume-slider {
    cursor: pointer;
}

#volume-icon {
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

#volume-icon:hover {
    color: rgba(255, 255, 255, 0.8);
}

#volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
}

#site-version {
    position: fixed;
    bottom: 6px;
    left: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    z-index: 99998;
}
