body {
    background-color: #121212;
    color: #ffffff;
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    transition: filter 0.6s ease-in-out;
    filter: none;
}
h1 {
    margin-bottom: 50px;
}

#bubble-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    filter: url(#goo);
}

#grid-layer {
    position: absolute;
    inset: 0;
    transform: rotate(40deg);
    transform-origin: center center;
}

#grid-layer .grid-bubble {
    position: absolute;
    width: 8px; height: 8px;
    border: 1px solid rgba(50,100,200,0.5);
    border-radius: 50%;
    box-sizing: border-box;
}

#meta-layer {
    position: absolute;
    inset: 0;
}

#meta-layer .metaball {
    position: absolute;
    border-radius: 50%;
    background: rgba(50, 50, 250, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

@keyframes metaballFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.logo-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeSlideIn 1.2s ease-out;
    z-index: 50;
}
.logo {
    max-width: 250px;
    height: auto;
    animation: popIn 1s ease forwards;
    z-index: 50;
}
.logo-text {
    font-size: 64px;
    font-weight: bold;
    display: none;
    animation: popIn 1s ease forwards;
    z-index: 50;
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.hamburger {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 40px;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 999;
    border: 2px solid transparent;
    transition: transform 0.3s ease;
    box-sizing: border-box;
    overflow: visible;
}

.hamburger::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 10px;
    z-index: -1;
    background: linear-gradient(
        135deg,
        #1c1ba6 0%,
        #0E8DD3 5%,
        #00ffff 10%,
        #80FF80 15%,
        #ffff00 20%,
        #FF8A4A 25%,
        #ff1493 30%,
        #C520BB 35%,
        #8a2be2 40%,
        #5323C4 45%,
        #1c1ba6 50%,
        #0E8DD3 55%,
        #00ffff 60%,
        #80FF80 65%,
        #ffff00 70%,
        #FF8A4A 75%,
        #ff1493 80%,
        #C520BB 85%,
        #8a2be2 90%,
        #5323C4 95%,
        #1c1ba6 100%
    );
    background-size: 200% 200%;
    animation: rainbowLinear 4s linear infinite;

    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    padding: 2px;
    box-sizing: border-box;
    display: none;
}

.hamburger.rainbow-border::before {
    display: block;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

@keyframes rainbowLinear {
    0%   { background-position: 0% 0%; }
    100%  { background-position: 100% 100%; }
}

/* .hamburger.rainbow-border {
    animation: rainbow-border 4s infinite;
} */

.hamburger span {
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translateY(6px) translateX(4px) scaleX(1.4);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-6px) translateX(4px) scaleX(1.4);
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #1e1e1e;
    backdrop-filter: blur(20px);
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 998;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar.open {
    transform: translateX(25%);
}

.sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaaaaa;
    margin: 0 0 8px 0;
    padding-left: 4px;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.sidebar a:hover {
    background-color: #333;
    transform: translateX(2px);
}

.sidebar a .icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
}

.sidebar section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: -8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.settings {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    padding: 8px;
    background-color: #2a2a2a;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    border: 2px solid transparent;
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}
.settings::after {
    content: "✕";
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    font-size: 24px;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.settings img {
    width: 24px;
    height: 24px;
    opacity: 1;
    transform: rotate(0deg) scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.settings.open img {
    opacity: 0;
    transform: rotate(90deg) scale(0.3);
}

.settings.open::after {
    content: "✕";
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #ffffff;
    pointer-events: none;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    transition-delay: 0.15s;
}

/* .settings.open {
    transform: scale(1.05);
    border-color: #fff;
} */

.settings.rainbow-border::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 10px;
    z-index: -1;
    background: linear-gradient(
        135deg,
        #1c1ba6 0%,
        #0E8DD3 5%,
        #00ffff 10%,
        #80FF80 15%,
        #ffff00 20%,
        #FF8A4A 25%,
        #ff1493 30%,
        #C520BB 35%,
        #8a2be2 40%,
        #5323C4 45%,
        #1c1ba6 50%,
        #0E8DD3 55%,
        #00ffff 60%,
        #80FF80 65%,
        #ffff00 70%,
        #FF8A4A 75%,
        #ff1493 80%,
        #C520BB 85%,
        #8a2be2 90%,
        #5323C4 95%,
        #1c1ba6 100%
        /* rgba(255, 0, 0, 1) 0%,
        rgba(255, 154, 0, 1) 5%,
        rgba(208, 222, 33, 1) 10%,
        rgba(79, 220, 74, 1) 15%,
        rgba(63, 218, 216, 1) 20%,
        rgba(47, 201, 226, 1) 25%,
        rgba(28, 127, 238, 1) 30%,
        rgba(95, 21, 242, 1) 35%,
        rgba(186, 12, 248, 1) 40%,
        rgba(251, 7, 217, 1) 45%,
        rgba(255, 0, 0, 1) 50%,
        rgba(255, 154, 0, 1) 55%,
        rgba(208, 222, 33, 1) 60%,
        rgba(79, 220, 74, 1) 65%,
        rgba(63, 218, 216, 1) 70%,
        rgba(47, 201, 226, 1) 75%,
        rgba(28, 127, 238, 1) 80%,
        rgba(95, 21, 242, 1) 85%,
        rgba(186, 12, 248, 1) 90%,
        rgba(251, 7, 217, 1) 95%,
        rgba(255, 0, 0, 1) 100% */
    );
    background-size: 200% 200%;
    animation: rainbowLinear 4s linear infinite;

    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    padding: 2px;
    box-sizing: border-box;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

.settings-sidebar {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 195px;
    background: #1e1e1e;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    padding: 20px 0px 20px 40px;
    border-radius: 10px;
    z-index: 998;
    display: none;
    flex-direction: column;
    gap: 20px;
}
.settings-sidebar.show {
    display: flex;
}

.settings-sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaaaaa;
    margin: 0 0 8px 0;
    padding-left: 4px;
}

.settings-sidebar select,
.settings-sidebar .clear-btn {
    background-color: #333;
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.settings-sidebar select:hover,
.settings-sidebar .clear-btn:hover {
    background-color: #444;
    transform: scale(1.03);
}

.settings-sidebar section {
    gap: 4px;
    margin-bottom: -8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.music-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    padding: 8px;
    background-color: #2a2a2a;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.music-btn img {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
    filter: invert(1);
}

.music-btn.active {
    box-shadow: inset 0 0 0 2px white;
}

.music-slash {
    position: absolute;
    width: 50%;
    height: 2px;
    border-radius: 4px;
    background: white;
    transform: rotate(45deg) scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.music-btn.muted .music-slash {
    transform: rotate(45deg) scaleX(1);
}

.volume-container {
    position: relative;
    height: 30px;
    margin: 8px 0;
}

#volume-control {
    appearance: none;
    -webkit-appearance: none;
    width: 160px;
    height: 8px;
    border-radius: 4px;
    background: rgba(60, 60, 60, 0.7);
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

#volume-control::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid #2a2a2a;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
}

#volume-control::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

#volume-control::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid #2a2a2a;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
}

#volume-control::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.volume-display {
    position: absolute;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, 
        rgba(50, 100, 200, 0.6) 0%, 
        rgba(100, 150, 255, 0.8) 100%);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    transition: width 0.0s ease;
    pointer-events: none;
}

.volume-container.rainbow-border::after {
    display: block;
}

.focus-mode {
    cursor: none;
    transition: cursor 0.5s ease;
}

.focus-mode.show-cursor {
    cursor: default;
}

.focus-mode .logo-container,
.focus-mode #hamburger,
.focus-mode #settings-btn,
.focus-mode #music-btn,
.focus-mode .settings-sidebar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.focus-mode #exit-focus-btn {
    display: block;
}

#exit-focus-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.7);
    color: #aaa;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    opacity: 0;
    pointer-events: none;
}

#exit-focus-btn.show {
    opacity: 1;
    pointer-events: auto;
}

#exit-focus-btn .shortcut {
    font-size: 10px;
    color: #888;
    margin-top: 3px;
    text-align: center;
}

.focus-mode #bubble-bg {
    transition: filter 0.5s ease;
}

#exit-focus-btn:hover {
    background: rgba(50, 50, 50, 0.8);
    color: #fff;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* background: rgba(0, 0, 0, 0.4); */
    z-index: 997;
    display: none;
}

.overlay.show {
    display: block;
}

/** BELOW IS OLD STYLES FROM BEFORE THE MAJOR INDEX REDESIGN, KEPT FOR REFERENCE AND HISTORICAL PURPOSES **/
.navbar {
    position: absolute;
    top: 20px;
    right: 20px;
}
.navbar ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}
.navbar ul li {
    margin: 0;
}
.navbar ul li a {
    color: #999999;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s, font-size 0.3s;
}
.navbar ul li a.selected {
    color: #ffffff;
    font-size: 20px;
}
.dropdown {
    position: relative;
    display: inline-block;
    margin: 0 10px;
}
.dropdown button {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.dropdown button::before {
    content: "> ";
    font-size: 16px;
}
.dropdown:hover button::before {
    content: "v ";
    color: #FFFFFF;
}
.dropdown button:hover {
    background-color: #575757;
    transform: scale(1.05);
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #444;
    min-width: 145px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    left: 0;
}
.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 4px;
}
.dropdown-content a:hover {
    background-color: #575757;
}
.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
}