
* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;

    font-family: Arial, sans-serif;

    background: #030308;

    color: white;
}

.screen1 {
    position: relative;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    isolation: isolate;
}

.background {
    position: absolute;
    inset: 0;

    overflow: hidden;

    --backgroundbrightness: 1;

    background:
        radial-gradient(
            circle at 50% 48%,
            #26063e 0%,
            #10091b 35%,
            #07070d 70%,
            #020204 100%
        );
}

.background::after {
    content: "";

    position: absolute;
    inset: -30%;

    z-index: 1;

    background:
        radial-gradient(
            circle at center,
            rgba(110, 48, 180, 0.25) 0%,
            rgba(50, 20, 80, 0.10) 32%,
            transparent 65%
        );

    pointer-events: none;

    animation:
        sidesPulse 4s ease-in-out infinite;
}

.background-vignette {
    position: absolute;
    inset: 0;

    z-index: 20;

    pointer-events: none;

    background:
        radial-gradient(
            circle at center,
            transparent 30%,
            rgba(0, 0, 0, 0.24) 65%,
            rgba(0, 0, 0, 0.82) 100%
        );

    opacity:
        calc(1 - var(--backgroundbrightness));
}

#starCanvas {
    position: absolute;
    inset: 0;

    z-index: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 2s ease;
}

.background.post-impact #starCanvas {
    opacity: 1;
}

#impactCanvas {
    position: absolute;
    inset: 0;

    z-index: 15;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

.swiec {
    position: absolute;

    top: 50%;
    left: 50%;

    width: var(--blobsize);
    height: var(--blobsize);

    margin:
        calc(var(--blobsize) / -2)
        0
        0
        calc(var(--blobsize) / -2);

    border-radius: 50%;

    opacity: 0.58;

    filter: blur(24px);

    pointer-events: none;

    will-change:
        transform,
        opacity,
        filter;

    z-index: 2;

    transition:
        opacity 320ms ease,
        filter 320ms ease;
}

.glow1,
.glow2,
.glow3,
.glow4,
.glow5,
.glow6,
.glow7 {
    --blobsize:
        min(20vw, 270px);
}

.glow1 {
    background:
        radial-gradient(
            circle at 38% 40%,
            #e46eff 0%,
            #8b3ccc 35%,
            #5e35bd 50%,
            transparent 72%
        );
}

.glow2 {
    background:
        radial-gradient(
            circle at 50% 45%,
            #63fff0 0%,
            #1ecbbd 33%,
            #1683c4 50%,
            transparent 72%
        );
}

.glow3 {
    background:
        radial-gradient(
            circle at 45% 45%,
            #ffe66b 0%,
            #d39c20 34%,
            #b36710 50%,
            transparent 72%
        );
}

.glow4 {
    background:
        radial-gradient(
            circle at 45% 45%,
            #c7ff84 0%,
            #31d65d 34%,
            #15af50 50%,
            transparent 72%
        );
}

.glow5 {
    background:
        radial-gradient(
            circle at 42% 45%,
            #7376ff 0%,
            #4144ec 35%,
            #1933c8 50%,
            transparent 72%
        );
}

.glow6 {
    background:
        radial-gradient(
            circle at 42% 45%,
            #ff5b66 0%,
            #ed243d 35%,
            #a31336 50%,
            transparent 72%
        );
}

.glow7 {
    background:
        radial-gradient(
            circle at 52% 42%,
            #efff83 0%,
            #cadb3d 34%,
            #89a918 50%,
            transparent 72%
        );
}

.background.post-impact .swiec {
    opacity: 0 !important;
    filter: blur(60px) !important;
}

.background.post-impact::after {
    animation: none;

    opacity: 0;
}

.implosion-core {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 100px;
    height: 100px;

    margin:
        -50px
        0
        0
        -50px;

    border-radius: 50%;

    z-index: 10;

    pointer-events: none;

    opacity: 0.12;

    transform:
        scale(0.35);

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,1) 0%,
            rgba(232,190,255,0.95) 12%,
            rgba(164,78,255,0.72) 26%,
            rgba(94,27,170,0.35) 45%,
            transparent 72%
        );

    filter:
        blur(7px);

    box-shadow:
        0 0 25px
        rgba(220,160,255,0.25),

        0 0 80px
        rgba(150,70,255,0.18);

    will-change:
        transform,
        opacity,
        filter;
}

.impact-flash {
    position: absolute;
    inset: 0;

    z-index: 18;

    pointer-events: none;

    opacity: 0;

    background:
        radial-gradient(
            circle at center,
            rgba(255,255,255,0.98) 0%,
            rgba(226,188,255,0.72) 7%,
            rgba(160,80,255,0.28) 22%,
            transparent 60%
        );
}

.welcomecard1 {
    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    z-index: 30;

    width:
        min(
            520px,
            calc(100vw - 40px)
        );

    padding:
        42px 38px;

    border:
        1px solid
        rgba(255,255,255,0.11);

    border-radius: 24px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(68, 31, 112, 0.48),
            rgba(18, 8, 34, 0.62)
        );

    backdrop-filter:
        blur(22px);

    box-shadow:
        0 20px 80px
        rgba(0,0,0,0.45),

        inset 0 1px 0
        rgba(255,255,255,0.08);

    transition:
        opacity 0.8s ease,
        transform 1s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        ),
        filter 1s ease;
}

.logo1 {
    margin-bottom: 28px;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.25em;

    text-transform: uppercase;

    color:
        rgba(225, 207, 242, 0.68);
}

h1 {
    margin: 0;

    font-size:
        clamp(32px, 5vw, 54px);

    line-height: 1.05;

    letter-spacing: -0.04em;

    text-shadow:
        0 0 34px
        rgba(255, 255, 255, 0.28),

        0 0 24px
        rgba(194, 143, 255, 0.3);
}

.jakistekst {
    margin:
        18px auto
        30px;

    max-width: 380px;

    font-size: 15px;

    line-height: 1.6;

    color:
        rgba(255,255,255,0.58);
}

.startButton {
    position: relative;

    min-width: 160px;

    padding:
        14px 28px;

    border:
        1px solid
        rgba(255,255,255,0.18);

    border-radius: 999px;

    color: white;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    cursor: pointer;

    background:
        linear-gradient(
            135deg,
            rgba(155,77,255,0.95),
            rgba(90,48,200,0.90)
        );

    box-shadow:
        0 0 0
        rgba(160,90,255,0),

        0 10px 30px
        rgba(80,30,180,0.25);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.startButton:hover {
    transform:
        translateY(-2px);

    filter:
        brightness(1.12);

    box-shadow:
        0 0 30px
        rgba(176,93,255,0.35),

        0 12px 40px
        rgba(80,30,180,0.35);
}

.startButton:active {
    transform:
        translateY(1px)
        scale(0.98);
}

.startButton:disabled {
    cursor: default;
}

.pianoUI {
    position: fixed;
    inset: 0;

    z-index: 40;

    overflow: hidden;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform:
        scale(1.035)
        translateY(12px);

    filter: blur(10px);

    transition:
        opacity 1.1s ease,
        transform 1.2s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        ),
        filter 1.1s ease,
        visibility 0s linear 1.1s;
}

.pianoUI.visible {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        scale(1)
        translateY(0);

    filter: blur(0);

    transition-delay: 0s;
}

.piano-hud {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    z-index: 60;

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    min-height: 70px;

    padding:
        14px 22px;

    border-bottom:
        1px solid
        rgba(255,255,255,0.06);

    background:
        linear-gradient(
            to bottom,
            rgba(17, 7, 33, 0.88),
            rgba(7, 3, 16, 0.7)
        );

    backdrop-filter:
        blur(16px);

    box-shadow:
        0 8px 26px
        rgba(5, 2, 12, 0.38),

        inset 0 -1px 0
        rgba(155, 77, 255, 0.14);
}

.headtekst {
    font-size: 14px;

    font-weight: 700;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    color:
        rgba(255,255,255,0.78);

    text-shadow:
        0 0 10px
        rgba(210, 169, 255, 0.7);
}

.topInfo {
    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 12px;

    color:
        rgba(255,255,255,0.42);
}

.hud-separator {
    opacity: 0.3;
}

.hud-right {
    justify-self: end;

    display: flex;

    align-items: center;

    gap: 14px;
}

.connectionStatus {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 11px;

    color:
        rgba(255,255,255,0.5);
}

.connection-indicator {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background:
        rgba(150, 150, 160, 0.45);

    box-shadow: none;

    transition:
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.connection-indicator.connected {
    background:
        #d6a1ff;

    box-shadow:
        0 0 14px
        rgba(214, 161, 255, 0.85);
}

.hud-actions {
    display: flex;

    align-items: center;

    gap: 6px;
}

.hud-actions button {
    width: 32px;
    height: 32px;

    padding: 0;

    border:
        1px solid
        rgba(155, 77, 255, 0.26);

    border-radius: 50%;

    color:
        rgba(255,255,255,0.72);

    background:
        rgba(109, 57, 171, 0.32);

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}

.hud-actions button:hover {
    transform:
        translateY(-1px);

    color: white;

    background:
        rgba(155, 77, 255, 0.38);
}

.hide-vkeyboard {
    margin-left: 5px;

    color:
        rgba(255,255,255,0.45) ;

    background:
        rgba(28, 9, 49, 0.48) ;

    border-color:
        rgba(255,255,255,0.08) ;

    backdrop-filter:
        blur(8px);

    transition:
        transform 0.45s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        ),
        background 0.2s ease;
}

.visualizer {
    position: absolute;

    inset: 70px 0 0 0;

    overflow: hidden;
}

.visualizer-grid {
    position: absolute;
    inset: 0;

    opacity: 0.25;

    background:
        linear-gradient(
            rgba(255,255,255,0.022) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,0.022) 1px,
            transparent 1px
        );

    background-size:
        50px 50px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 88%
        );
}

#noteCanvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

#particleCanvas {
    position: fixed;
    inset: 0;

    z-index: 70;

    width: 100%;
    height: 100%;

    pointer-events: none;
}

.piano-area {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 50;

    width: 100%;

    height:
        clamp(
            145px,
            22.5vh,
            243px
        );

    padding:
        0 16px 0;

    transform:
        translateY(0);

    transition:
        transform 700ms
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        );
}

.piano-area.keyboard-hidden {
    transform:
        translateY(100%);
}

.piano {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: visible;

    border:
        1px solid
        rgba(255,255,255,0.10);

    border-bottom:
        0;

    border-radius:
        16px 16px 0 0;

    background:
        linear-gradient(
            to bottom,
            rgba(12,11,20,0.96),
            rgba(3,3,8,0.99)
        );

    box-shadow:
        0 -24px 80px
        rgba(0,0,0,0.62),

        inset 0 1px 0
        rgba(255,255,255,0.07);
}

.piano-keys {
    position: relative;

    width: 100%;
    height: 100%;
}

.key {
    position: absolute;

    user-select: none;

    touch-action: none;

    cursor: pointer;

    transition:
        transform 80ms ease,
        background 120ms ease,
        box-shadow 120ms ease,
        filter 120ms ease;
}

.key.white {
    bottom: 0;

    height: 100%;

    border:
        1px solid
        rgba(10,10,15,0.85);

    border-radius:
        0 0 7px 7px;

    background:
        linear-gradient(
            to bottom,
            #ffffff 0%,
            #eeeeee 55%,
            #cfcfcf 100%
        );

    box-shadow:
        inset 0 -5px 8px
        rgba(0,0,0,0.12);

    z-index: 1;
}

.key.black {
    top: 0;

    height: 62%;

    border:
        1px solid
        rgba(255,255,255,0.07);

    border-radius:
        0 0 5px 5px;

    background:
        linear-gradient(
            to bottom,
            #282630,
            #0a0910 75%,
            #020205 100%
        );

    box-shadow:
        inset 0 -3px 5px
        rgba(0,0,0,0.6),

        0 6px 8px
        rgba(0,0,0,0.45);

    z-index: 10;
}

.key.white.active {
    z-index: 8;

    transform:
        translateY(4px);

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #e6d7ff 60%,
            #b995ff 100%
        );

    box-shadow:
        inset 0 4px 8px
        rgba(80,40,160,0.18),

        0 -5px 22px
        rgba(185,120,255,0.78),

        0 -14px 54px
        rgba(130,70,255,0.42);

    filter:
        brightness(1.08);
}

.key.black.active {
    z-index: 11;

    transform:
        translateY(4px);

    background:
        linear-gradient(
            to bottom,
            #9b74ff,
            #432071 65%,
            #13081f 100%
        );

    box-shadow:
        0 -5px 18px
        rgba(150,90,255,0.95),

        0 -13px 42px
        rgba(115,65,255,0.5);

    filter:
        brightness(1.25);
}

.key-label {
    position: absolute;

    left: 50%;

    bottom: 11px;

    transform:
        translateX(-50%);

    white-space: nowrap;

    pointer-events: none;

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 0.02em;

    color:
        rgba(30,25,40,0.48);

    transition:
        color 100ms ease,
        text-shadow 100ms ease;
}

.key.black .key-label {
    bottom: 7px;

    font-size: 7px;

    color:
        rgba(255,255,255,0.42);
}

.key.active .key-label {
    color:
        rgba(255,255,255,0.95);

    text-shadow:
        0 0 8px
        rgba(190,140,255,0.8);
}

.tenpopup {
    position: fixed;
    inset: 0;

    z-index: 100;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    background:
        rgba(0,0,0,0.42);

    backdrop-filter:
        blur(10px);

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.tenpopup.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}

.tenpopup-content {
    width:
        min(
            480px,
            100%
        );

    padding: 34px;

    border:
        1px solid
        rgba(255,255,255,0.12);

    border-radius: 24px;

    text-align: center;

     background:
        linear-gradient(
            145deg,
            rgba(66, 31, 109, 0.76),
            rgba(17, 7, 33, 0.84)
        );
    box-shadow:
        0 30px 100px
        rgba(0,0,0,0.55);

    transform:
        translateY(15px)
        scale(0.98);

    transition:
        transform 0.4s
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        );
}

.tenpopup.active
.tenpopup-content {
    transform:
        translateY(0)
        scale(1);
}

.popup-icon {
    font-size: 42px;

    margin-bottom: 15px;
}

.tenpopup h2 {
    margin:
        0 0 12px;
}

.tenpopup p {
    margin: 0;

    line-height: 1.6;

    color:
        rgba(255,255,255,0.62);
}

.popup-actions {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 25px;

    flex-wrap: wrap;
}

.popup-actions button {
    padding:
        12px 20px;

    border:
        1px solid
        rgba(255,255,255,0.13);

    border-radius: 999px;

    color: white;

    cursor: pointer;

    background:
        rgba(90, 43, 143, 0.24);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.popup-actions button:hover {
    transform:
        translateY(-1px);

    background:
        rgba(155, 77, 255, 0.3);
}

#midiTAK {
    background:
        linear-gradient(
            135deg,
            #8c49ff,
            #5632c9
        );
    box-shadow:
         0 0 30px
        rgba(141, 86, 228, 0),

         0 0 30px
        rgba(203, 186, 237, 0.25);
}

.popupMidiTak {
    position: fixed;

    top: 82px;
    right: 18px;

    z-index: 120;

    padding:
        10px 14px;

    border:
        1px solid
        rgba(255,255,255,0.10);

    border-radius: 12px;

    background:
        rgba(18,12,29,0.76);

    backdrop-filter:
        blur(12px);

    box-shadow:
        0 12px 35px
        rgba(0,0,0,0.35);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(-10px);

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}

.popupMidiTak.visible {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

.popupMidiTak p {
    margin: 0;

    font-size: 12px;

    color:
        rgba(255,255,255,0.82);
}

@keyframes sidesPulse {

    0%,
    100% {
        opacity: 0.30;

        transform:
            scale(0.99);
    }

    50% {
        opacity: 0.44;

        transform:
            scale(1.015);
    }
}

@media (max-width: 800px) {

    .piano-hud {
        grid-template-columns:
            1fr
            auto;

        gap: 8px;

        min-height: 62px;

        padding:
            10px 14px;
    }

    .topInfo {
        display: none;
    }

    .hud-right {
        gap: 8px;
    }

    .connectionStatus {
        display: none;
    }

    .visualizer {
        inset: 62px;
    }

    .piano-area {
        height:
            clamp(
                130px,
                21vh,
                190px
            );

        padding-left: 8px;
        padding-right: 8px;
    }

    .piano {
        border-radius:
            12px 12px 0 0;
    }

    .key-label {
        bottom: 8px;

        font-size: 7px;
    }

    .key.black .key-label {
        bottom: 5px;

        font-size: 6px;
    }

    .tenpopup-content {
        padding:
            28px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }
}

.app-windows {
    position: absolute;

    inset: 0;

    z-index: 80;

    pointer-events: none;
}

.appWin {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 420px;
    min-height: 260px;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    pointer-events: auto;

    border:
        1px solid
        rgba(255, 255, 255, 0.16);

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(66, 31, 109, 0.68),
            rgba(17, 7, 33, 0.82)
        );

    backdrop-filter:
        blur(24px)
        saturate(130%);

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.45),

        inset 0 1px 0
        rgba(255, 255, 255, 0.13),

        inset 0 -1px 0
        rgba(0, 0, 0, 0.18);

    opacity: 0;

    visibility: hidden;

    transform:
        translate(-50%, -50%)
        scale(0.95);

    transition:
        opacity 220ms ease,
        transform 280ms
        cubic-bezier(
            0.16,
            1,
            0.3,
            1
        ),
        visibility 220ms ease;
}

.appWin.active {

    opacity: 1;

    visibility: visible;

    transform:
        translate(-50%, -50%)
        scale(1);
}

.appWin.dragging {

    transition: none;
}

.appWinTitlebar {

    height: 46px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 10px 0 14px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.09);

    background:
        linear-gradient(
            to right,
            rgba(155, 77, 255, 0.22),
            rgba(63, 26, 104, 0.12)
        );

    user-select: none;

    cursor: grab;
}

.appWinTitlebar:active {
    cursor: grabbing;
}

.appWinTitle {

    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 13px;

    font-weight: 600;

    color:
        rgba(255, 255, 255, 0.9);
}

.appWinIcon {

    display: flex;

    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 7px;

    background:
        rgba(155, 77, 255, 0.16);
}

.appWinControls {

    display: flex;

    gap: 4px;
}

.appWinButton,
.appWinControls button {

    width: 28px;
    height: 28px;

    padding: 0;

    border:
        1px solid
        rgba(155, 77, 255, 0.2);

    border-radius: 50%;

    color:
        rgba(255,255,255,0.55);

    background:
        rgba(90, 43, 143, 0.22);

    cursor: pointer;

    font-size: 15px;

    transition:
        background 0.18s ease,
        color 0.18s ease;
}

.appWinButton:hover,
.appWinControls button:hover {

    color: white;

    background:
        rgba(155,77,255,0.36);

    box-shadow:
        0 0 12px
        rgba(155, 77, 255, 0.24);
}

.appWinButtonClose:hover {

    background:
        rgba(155,77,255,0.42);

    color:
        #f1ddff;
}

.appWinContent {

    flex: 1;

    min-height: 0;

    padding: 16px;
}

.notepadWin {
    padding: 0;
}

.notepad-textarea {

    width: 100%;
    height: 100%;

    min-height: 220px;

    resize: none;

    padding: 18px;

    border: 0;

    outline: none;

    color:
        rgba(255,255,255,0.9);

    font:
        14px/1.6
        Arial,
        sans-serif;

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.035),
            rgba(255,255,255,0.015)
        );

    caret-color:
        #d6b7ff;
}

.notepad-textarea::placeholder {

    color:
        rgba(255,255,255,0.28);
}

.notepad-textarea:focus {

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.045),
            rgba(255,255,255,0.018)
        );
}

.metronomeBpm {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 18px;
}

.metronomeBpm {

    display: flex;

    flex-direction: column;

    align-items: center;
}

.metronomeBpmValue {

    font-size: 64px;

    font-weight: 300;

    line-height: 1;

    letter-spacing: -0.05em;

    color:
        rgba(255,255,255,0.95);

    text-shadow:
        0 0 30px
        rgba(196,145,255,0.25);
}

.metronomeBpmLabel {

    margin-top: 5px;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 0.25em;

    color:
        rgba(255,255,255,0.42);
}

.metronome-slider {

    width: 80%;

    height: 8px;

    appearance: none;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            rgba(90, 48, 200, 0.78) 0%,
            rgba(155, 77, 255, 0.84) 55%,
            rgba(194, 111, 238, 0.92) 100%
        );

    box-shadow:
        0 0 14px
        rgba(155, 77, 255, 0.22),

        inset 0 1px 2px
        rgba(0, 0, 0, 0.35);

    cursor: pointer;

    margin-bottom: 16px;
}

.metronome-slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;

    appearance: none;

    border: 2px solid
        rgba(239, 218, 255, 0.95);

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #d18aff,
            #7929a9
        );

    box-shadow:
        0 0 12px
        rgba(194, 111, 238, 0.75);
}

.metronome-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;

    border: 2px solid
        rgba(239, 218, 255, 0.95);

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #d18aff,
            #7929a9
        );

    box-shadow:
        0 0 12px
        rgba(194, 111, 238, 0.75);
}

.metronome-buttons,
.metronome-controls {

    display: flex;

    align-items: center;

    gap: 13px;

    margin-top: 4px;
}

.metronome-buttons button,
.metronome-controls button {

    min-width: 42px;
    height: 42px;

    border:
        1px solid
        rgba(155, 77, 255, 0.24);

    border-radius: 50%;

    color:
        rgba(255,255,255,0.78);

    background:
        linear-gradient(
            145deg,
            rgba(155, 77, 255, 0.82),
            rgba(90, 48, 200, 0.78)
        );

    box-shadow:
        0 5px 16px
        rgba(80, 30, 180, 0.2),

        inset 0 1px 0
        rgba(255, 255, 255, 0.16);

    cursor: pointer;

    transition:
        background 0.18s ease,
        transform 0.18s ease;
}

.metronome-buttons button:hover,
.metronome-controls button:hover {

    background:
        linear-gradient(
            145deg,
            rgba(175, 91, 255, 0.9),
            rgba(103, 57, 218, 0.86)
        );

    box-shadow:
        0 0 14px
        rgba(155, 77, 255, 0.25);

    transform:
        translateY(-1px);
}

.metronome-controls #metronomeStartStop {
    min-width: 92px;

    padding:
        0 18px;

    border-radius: 999px;
}

.metronome-start {

    min-width: 110px;

    padding: 11px 20px;

    border:
        1px solid
        rgba(255,255,255,0.12);

    border-radius: 999px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(155,77,255,0.95),
            rgba(90,48,200,0.92)
        );

    cursor: pointer;

    box-shadow:
        0 10px 25px
        rgba(80,30,180,0.25),

        0 0 18px
        rgba(155, 77, 255, 0.2);
}

#notepadWindow {

    left: 32%;

    top: 42%;
}

#metronomeWindow {

    left: 68%;

    top: 42%;

    width: 330px;

    min-height: 290px;
}

@media (max-width: 800px) {

    .app-window {

        width:
            calc(100vw - 30px);

        max-width:
            420px;
    }

    #notepadWindow,
    #metronomeWindow {

        left: 50%;

        top: 50%;

        width:
            calc(100vw - 30px);
    }
}

.appDock {
    position: fixed;

    top: 50%;
    right: 18px;

    z-index: 95;

    display: flex;

    flex-direction: column;

    gap: 8px;

    padding: 8px;

    border:
        1px solid
        rgba(255,255,255,0.08);

    border-radius: 14px;

    background:
        rgba(25, 10, 47, 0.78);

    backdrop-filter:
        blur(16px);

    box-shadow:
        0 15px 40px
        rgba(0,0,0,0.30);

    transform:
        translateY(-50%);
}

.dockButton {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border:
        1px solid
        rgba(255,255,255,0.08);

    border-radius: 11px;

    font-size: 18px;

    color:
        rgba(255,255,255,0.72);

    background:
        rgba(90, 43, 143, 0.24);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.dockButton:hover {
    transform:
        translateX(-2px);

    color: white;

    background:
        rgba(155,77,255,0.3);

    box-shadow:
        0 0 18px
        rgba(155,77,255,0.18);
}

.dockButton:active {
    transform:
        scale(0.94);
}

.settings-container {
    display: flex;

    flex-direction: column;

    gap: 18px;
}

.settings-section {
    display: flex;

    flex-direction: column;

    gap: 18px;
}

.settings-section h3 {

    margin: 0;

    font-size: 12px;

    font-weight: 600;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color:
        rgba(255,255,255,0.46);
}

.setting-row {

    display: grid;

    grid-template-columns:
        1fr
        130px;

    align-items: center;

    gap: 18px;

    padding-bottom: 14px;

    border-bottom:
        1px solid
        rgba(255,255,255,0.06);
}

.setting-info {

    display: flex;

    flex-direction: column;

    gap: 4px;
}

.setting-info span {

    font-size: 13px;

    color:
        rgba(255,255,255,0.88);
}

.setting-info small {

    font-size: 10px;

    line-height: 1.4;

    color:
        rgba(255,255,255,0.36);
}

.setting-row input[type="range"] {

    width: 130px;

    accent-color:
        #a86cff;

    cursor: pointer;
}