@font-face {
    font-family: ElmsSans;
    src: url("fonts/ElmsSans-VariableFont_wght.ttf") format("truetype");
}

@property --accent { syntax: "<color>"; inherits: true; initial-value: #debdff; }
@property --bg     { syntax: "<color>"; inherits: true; initial-value: #0B001F; }
@property --text   { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --water-opacity { syntax: "<number>"; inherits: true; initial-value: 0.18; }

:root {
    --accent: #debdff;
    --bg:     #0B001F;
    --text:   #ffffff;
    --water-opacity: 0.18;
    --panel-solid: color-mix(in srgb, var(--accent) 25%, var(--bg));
    --panel:  color-mix(in srgb, var(--panel-solid) 40%, transparent);
    --border: color-mix(in srgb, var(--accent) 20%, transparent);
    --glow:   color-mix(in srgb, var(--accent) 50%, transparent);
    --moon:   color-mix(in srgb, var(--accent) 20%, white);
    --popup:  color-mix(in srgb, var(--accent) 15%, var(--bg));
    --player: color-mix(in srgb, var(--panel-solid) 40%, transparent);

    transition: --accent 1.2s ease, --bg 1.2s ease, --text 1.2s ease, --water-opacity 1.2s ease;
}

.title {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ElmsSans, sans-serif;
}

.grid {
    position: fixed;
    inset: 0;
    background: var(--bg);
    overflow: hidden;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
}

.grid::after {
    content: "";
    position: absolute;
    inset: 0;

    background-image: url("assets/Tiles.png");
    background-size: 50px 50px;
    background-repeat: repeat;

    opacity: 0.08;

    mask-image: linear-gradient(
        to top,
        transparent 0%,
        black 100%
    );

    -webkit-mask-image: linear-gradient(
        to top,
        transparent 0%,
        black 100%
    );
}

.water-wrap {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    opacity: var(--water-opacity);
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
    filter: drop-shadow(0 0 20px var(--glow));
}

.water-slider {
    position: absolute;
    inset: 0;
}

.water-layer {
    position: absolute;
    left: 0;
    bottom: 0;
    width: calc(100% + var(--tile-w, 1000px));
    height: 100%;

    background-image: url("assets/water.png");
    background-repeat: repeat-x;
    background-position: left bottom;
    background-size: var(--tile-w, 1000px) var(--tile-h, 1000px);
    image-rendering: pixelated;

    opacity: 0;
    transition: opacity 1.2s ease;

    animation: waterMove var(--dur, 20s) linear infinite;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.water-layer.visible {
    opacity: 1;
}

.moon-glow {
    position: fixed;
    top: 200px;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);

    width: 100px;
    height: 100px;

    will-change: transform;

    filter: drop-shadow(0 0 20px var(--glow));
}

.moon {
    width: 100%;
    height: 100%;

    background: var(--moon);
    border-radius: 50%;

    -webkit-mask-image: radial-gradient(
        circle at 72% 35%,
        transparent 0 48px,
        black 49px
    );

    mask-image: radial-gradient(
        circle at 72% 35%,
        transparent 0 48px,
        black 49px
    );
}

@keyframes waterMove {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(-1 * var(--tile-w, 1000px)), 0, 0);
    }
}

.sections-wrapper {
    position: absolute;
    left: 50%;
    top: 30vh;
    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
}

.section a {
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.defaulttext {
    font-size: 1.2em;
}

.subtitle-text {
    font-size: 1em;
    opacity: 0.7;
}

.section a.subtitle-textspecial {
    font-size: 1em;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    color: var(--accent);
    opacity: 0.8;
}

.titlesub {
    font-size: 1.5em;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 500px));
    gap: 30px;
    margin-top: 20px;
}

.game-card {
    background-color: #0000001a;
    color: var(--text);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 5px 5px 15px #4400300e;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-card img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 10px 10px #44003036;
}

.game-card p {
    margin: 0px 0;
    text-align: center;
}

.biggap {
    height: 50px;
}

.bigbutsmallgap {
    height: 20px;
}

.socialmediarow {
    display: flex;
    gap: 20px;
}

.socialmediabutton:hover {
    transform: scale(1.1);
    transition: transform 0.1s ease;
    filter: drop-shadow(0 0 10px #ffbdbd);
}

.socialmediabutton2:hover {
    transform: scale(1.1);
    transition: transform 0.1s ease;
    filter: drop-shadow(0 0 10px #bdc9ff);
}

.socialmediabutton3:hover {
    transform: scale(1.1);
    transition: transform 0.1s ease;
    filter: drop-shadow(0 0 10px #bdffc0);
}

.audio-player {
    width: 280px;
    padding: 12px;
    background: var(--player);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-player button {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.audio-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.audio-info p {
    margin: 0;
}

.audio-info input {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

#volumeBtn img,
.audio-player button img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    image-rendering: pixelated;
}

#volumeBtn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 8px;
    margin-bottom: 8px;

    background: var(--popup);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 0 15px #0008;
    z-index: 10;
}

.volume-control.open .volume-popup {
    display: flex;
}

#volume {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 80px;
    accent-color: var(--accent);
    cursor: pointer;
}

.volume-control input {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 65px;
    accent-color: var(--accent);
    cursor: pointer;
}

.volume-control span {
    font-size: 14px;
}

.song-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(700px, 90vw);
    margin: 20px 0;
}

.song-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.song-row .audio-player {
    flex-shrink: 0;
}

.song-row:nth-child(even) {
    flex-direction: row-reverse;
}

@media (max-width: 600px) {
    .song-row {
        flex-direction: column !important;
        align-items: stretch;
        gap: 10px;
    }

    .song-info {
        text-align: center;
    }

    .song-row .audio-player {
        width: auto;
    }
}

.PLEASEBENORMALSIZED {
    width: 25%;
    height: auto;
    display: block;
    margin: 0 auto;

    filter: drop-shadow(0 0 10px var(--glow));
}