:root {
    --background-color: #0d1126;
    --primary-text: #89ddff;
    --secondary-text: #b0c4de;
    --highlight-color: #ff69b4;
    --border-color: #89ddff;
    --panel-bg: rgba(20, 26, 61, 0.85);
    --panel-header-bg: #89ddff;
    --panel-header-text: #0d1126;
    --font-stack: 'Pixelify Sans', sans-serif;
    --handwriting-font: 'Kalam', cursive;
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    cursor: default;
    overflow-x: hidden;
    scrollbar-width: none;
}

body {
    background-color: var(--background-color);
    color: var(--secondary-text);
    font-family: var(--font-stack);
    font-size: 18px;
    margin: 0;
    padding: 20px;
    padding-bottom: 150px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    width: 100vw;
    overflow-x: hidden;
    transition: background-image 0.7s ease-in-out;
}

body.loading,
body.modal-open {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15) 1px, transparent 1px, transparent 3px);
    z-index: 100;
    pointer-events: none;
    animation: scanline 10s linear infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

* {
    box-sizing: border-box;
}

#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#letter-loader {
    position: fixed;
    inset: 0;
    z-index: 1003;
    background: rgba(13, 17, 38, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#letter-loader.visible {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 100px;
    height: 100px;
    overflow: visible;
    transition: transform 1s cubic-bezier(0.6, -0.28, 0.735, 0.045), opacity 0.5s 0.8s;
}

#preloader.flying .loader .loader-fill,
#preloader.flying .loader .loader-outline {
    animation: none;
}

.loader-outline {
    fill: none;
    stroke: url(#loader-gradient);
    stroke-width: 4;
    animation: color-cycle-border 3s linear infinite, rockstar-glow 2s ease-in-out infinite alternate;
}

.loader-fill {
    animation:
        gentle-pass 3s ease-in-out infinite,
        rgb-loader-fill 6s linear infinite;
}

.simple-spinner {
    animation: rotate 2s linear infinite;
    width: 50px;
    height: 50px;
}

.simple-spinner .path {
    stroke: var(--primary-text);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 2px var(--primary-text));
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}


::-webkit-scrollbar {
    display: none;
}

.site-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 150vh;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.site-wrapper.visible {
    opacity: 1;
}

header,
.sidebar-left,
.main-content,
.sidebar-right {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s var(--ease-out-back);
}

.loaded {
    opacity: 1;
    transform: translateY(0);
}

header {
    width: 100%;
    top: 40px;
    left: 0;
    background: var(--panel-bg);
    z-index: 10;
    border-radius: 12px;
    height: 70px;
    border: 2px solid var(--primary-text);
    box-shadow: 0 0 15px var(--primary-text);
    transition: box-shadow 0.3s ease;
}

header:hover {
    box-shadow: 0 0 25px var(--primary-text);
}

header::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg width="20" height="12" viewBox="0 0 20 12" xmlns="http://www.w3.org/2000/svg"><path d="M0 12 C 4 0, 6 0, 10 12 S 16 0, 20 12" stroke="white" fill="none" stroke-width="2"/></svg>');
    background-repeat: repeat-x;
}

.header-main-bar {
    height: 100%;
    border-radius: 10px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 20px;
    background-color: rgba(0, 0, 0, 0.2);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.02) 75%, rgba(255, 255, 255, 0.02)), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.02) 75%, rgba(255, 255, 255, 0.02));
    background-size: 15px 15px;
}

.header-logo-breakout {
    position: absolute;
    left: 20px;
    top: -20px;
    background: #000;
    color: var(--primary-text);
    padding: 8px 15px;
    border: 2px solid var(--primary-text);
    transform: skew(-15deg);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-main-text {
    display: flex;
}

.logo-char {
    display: inline-block;
    padding: 0 5px;
    font-size: 2.5rem;
    line-height: 1;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: logo-float 3s ease-in-out infinite;
}

.char-d {
    background-color: #3498db;
}

.char-i {
    background-color: #9b59b6;
}

.char-g {
    background-color: #2ecc71;
}

.char-t {
    background-color: #e67e22;
}

.char-a {
    background-color: #e91e63;
}

.char-l {
    background-color: #00bcd4;
}

.char-y {
    background-color: #f1c40f;
    color: #333;
}

.logo-main-text .logo-char:nth-child(1) {
    animation-delay: 0.1s;
}

.logo-main-text .logo-char:nth-child(2) {
    animation-delay: 0.2s;
}

.logo-main-text .logo-char:nth-child(3) {
    animation-delay: 0.3s;
}

.logo-main-text .logo-char:nth-child(4) {
    animation-delay: 0.4s;
}

.logo-main-text .logo-char:nth-child(5) {
    animation-delay: 0.5s;
}

.logo-main-text .logo-char:nth-child(6) {
    animation-delay: 0.6s;
}

.logo-main-text .logo-char:nth-child(7) {
    animation-delay: 0.7s;
}

.logo-main-text .logo-char:nth-child(8) {
    animation-delay: 0.8s;
}

.logo-main-text .logo-char:nth-child(9) {
    animation-delay: 0.9s;
}

.logo-main-text .logo-char:nth-child(10) {
    animation-delay: 1s;
}

.logo-tagline {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-top: 5px;
}

.header-title-area {
    text-align: left;
    padding-left: 380px;
}

#main-title {
    font-size: 1.8rem;
    color: #fff;
    margin: 0;
}

#tagline {
    font-size: 1rem;
    color: var(--secondary-text);
    margin: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px dashed;
    border-image-slice: 1;
    padding: 5px 10px;
    border-radius: 8px;
    animation: color-cycle-border 6s linear infinite;
}

.header-nav a,
.header-nav button {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s ease;
    background: none;
    border: none;
    font-family: inherit;
}

.header-nav a:hover,
.header-nav button:hover {
    color: var(--highlight-color);
    text-shadow: 0 0 5px var(--highlight-color);
    transform: translateY(-2px);
}

.sidebar-left {
    top: 130px;
    left: 20px;
    width: 23%;
}

.main-content {
    top: 130px;
    left: 27%;
    width: 46%;
}

.sidebar-right {
    top: 130px;
    right: 20px;
    width: 23%;
}

.panel {
    position: relative;
    border: 2px dashed;
    border-image-slice: 1;
    padding: 15px;
    box-shadow: 0 0 25px rgba(137, 221, 255, 0.2);
    margin-bottom: 20px;
    animation: color-cycle-border 6s linear infinite;
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--panel-bg);
    backdrop-filter: blur(5px);
}

.panel-header {
    background-color: var(--panel-header-bg);
    color: var(--panel-header-text);
    padding: 5px 10px;
    margin: -15px -15px 15px -15px;
    font-size: 1.4rem;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.2);
    border-bottom: 2px dashed var(--border-color);
}

a,
button,
.playlist-song,
.site-button-code {
    cursor: url(https://win98icons.alexmeub.com/cursors/pointer.cur), pointer;
}

a {
    color: var(--primary-text);
    text-decoration: none;
}

a:hover {
    color: var(--highlight-color);
}

ul {
    list-style: none;
    padding: 0;
}

ul.nav-list li {
    margin-bottom: 10px;
}

ul.nav-list a {
    display: block;
    padding: 5px;
    border: 1px solid transparent;
    transition: all 0.2s ease-out;
}

ul.nav-list a:hover {
    background-color: rgba(137, 221, 255, 0.1);
    border-color: var(--primary-text);
    transform: translateX(4px);
}

#welcome-panel {
    position: relative;
    padding-bottom: 0;
}

#welcome-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://pekly.neocities.org/wallpaper/hatsune-miku1.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -1;
}

#welcome-panel>* {
    position: relative;
    z-index: 1;
}

#imood-widget {
    position: relative;
    right: 15px;
    margin-bottom: 15px;
    display: inline-block;
    background: var(--panel-bg);
    border: 1px solid var(--primary-text);
    padding: 5px;
    transition: all 0.3s ease;
}

#imood-widget:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--primary-text);
}

#imood-widget::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--primary-text);
}

#imood-widget img {
    display: block;
}

.avatar-container {
    position: relative;
    width: 100px;
    margin: 0 auto 15px auto;
}

.welcome-avatar {
    display: block;
    width: 100px;
    height: 100px;
    border: 2px solid var(--border-color);
    image-rendering: pixelated;
    transition: all 0.3s ease;
}

.welcome-avatar:hover {
    box-shadow: 0 0 15px var(--highlight-color);
    transform: scale(1.05);
}

#welcome-panel h4 {
    color: var(--primary-text);
    border-bottom: 1px dashed var(--secondary-text);
    padding-bottom: 4px;
    margin: 15px 0 10px 0;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

#music-carousel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-video-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.main-video-area {
    flex-grow: 1;
}

#main-video-title {
    color: var(--primary-text);
    margin-top: 8px;
    text-align: center;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-nav-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--primary-text);
    color: var(--primary-text);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-nav-btn:hover {
    background: var(--primary-text);
    color: var(--panel-bg);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary-text);
}

.thumbnail-strip {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 5px;
    flex-wrap: wrap;
}

.thumbnail-img {
    width: 100px;
    height: 56px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s;
}

.thumbnail-img:hover {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--highlight-color);
}

.thumbnail-img.active {
    opacity: 1;
    border-color: var(--primary-text);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--primary-text);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.status-box {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-text);
    padding: 10px;
    text-align: center;
}

.status-box .label {
    color: var(--primary-text);
    font-weight: bold;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    border-top: 1px dotted var(--secondary-text);
    margin-top: 10px;
    padding-top: 10px;
}

.social-icons a,
.social-icons span {
    display: inline-block;
    transition: transform 0.2s, filter 0.3s ease;
    width: 32px;
    height: 32px;
}

.social-icons a:hover,
.social-icons span:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px var(--highlight-color));
}

.social-icons img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.site-button-code {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 8px;
    font-family: monospace;
    border: 1px dotted var(--secondary-text);
    border-radius: 4px;
    resize: none;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
}

.site-button-code:hover {
    border-color: var(--primary-text);
    box-shadow: 0 0 8px var(--primary-text);
}

#chattable {
    width: 100%;
    height: 300px;
    border: none;
}

.update-item {
    border-bottom: 1px dotted var(--secondary-text);
    padding-bottom: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    padding: 5px;
}

.update-item:hover {
    background-color: rgba(137, 221, 255, 0.05);
    border-radius: 4px;
}

.update-item:last-child {
    border-bottom: none;
}

.update-date {
    font-weight: bold;
    color: var(--primary-text);
}

.scrollable-content {
    max-height: 250px;
    overflow-y: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: center;
}

.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
    background-color: rgba(137, 221, 255, 0.05);
    border-radius: 8px;
}

.stat-item .stat-value {
    font-size: 1.2rem;
    color: var(--primary-text);
}

.stat-item .stat-label {
    font-size: 0.8rem;
}

.pet-container {
    text-align: center;
    padding: 10px;
}

#desktop-pet {
    width: 80px;
    image-rendering: pixelated;
    transition: transform 0.3s var(--ease-out-back);
}

.pet-container:hover #desktop-pet {
    animation: pet-wake-up 0.5s ease-in-out;
}

.deco {
    position: fixed;
    z-index: 1;
    font-size: 2rem;
    opacity: 0.3;
    user-select: none;
    animation: float 20s ease-in-out infinite alternate;
    pointer-events: none;
}

.deco-1 {
    top: 10%;
    left: 5%;
    animation-duration: 22s;
}

.deco-2 {
    top: 20%;
    right: 10%;
    animation-duration: 18s;
}

.deco-3 {
    bottom: 15%;
    left: 15%;
    animation-duration: 25s;
}

.deco-4 {
    bottom: 5%;
    right: 5%;
    animation-duration: 15s;
    color: var(--highlight-color);
}

.featured-things-container {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    flex-wrap: wrap;
}

.featured-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border: 1px dotted var(--secondary-text);
}

.featured-item h3 {
    color: var(--primary-text);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.featured-item img {
    width: 100%;
    aspect-ratio: 4 / 4;
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    image-rendering: pixelated;
    transition: all 0.3s ease;
}

.featured-item:hover img {
    border-color: var(--highlight-color);
}

.art-credit {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

.art-credit a {
    color: var(--secondary-text);
    text-decoration: none;
}

.art-credit a:hover {
    color: var(--highlight-color);
}

.featured-game-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.featured-game-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted var(--secondary-text);
}

#game-nav-indicator {
    font-size: 0.9rem;
    color: var(--primary-text);
}

.footer-credits {
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
    padding: 20px 0;
    text-shadow: 1px 1px 2px #000;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 38, 0.9);
    border-top: 2px dashed;
    border-image-slice: 1;
    animation: color-cycle-border 6s linear infinite;
    z-index: 20;
    transition: transform 0.4s ease-out;
}

.footer-content {
    white-space: nowrap;
    padding: 10px 0;
    overflow: hidden;
}

#button-wall-scroller {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    animation: scroll-left 40s linear infinite;
}

#button-wall-scroller a {
    transition: all 0.3s ease;
}

#button-wall-scroller a:hover {
    transform: translateY(-3px) scale(1.05);
}

#footer-handle {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 17, 38, 0.9);
    border: 2px dashed;
    border-image-slice: 1;
    border-bottom: none;
    padding: 0px 10px;
    color: var(--primary-text);
    animation: color-cycle-border 6s linear infinite;
    transition: all 0.3s ease;
}

#footer-handle:hover {
    color: var(--highlight-color);
}

#footer-handle i {
    transition: transform 0.3s ease-out;
}

footer.footer-hidden {
    transform: translateY(100%);
}

footer.footer-hidden #footer-handle i {
    transform: rotate(180deg);
}

#music-player {
    position: fixed;
    bottom: 70px;
    left: 20px;
    z-index: 30;
    display: flex;
    align-items: stretch;
    transition: transform 0.5s var(--ease-out-back);
    border-radius: 0;
    border: 2px dashed;
    border-image-slice: 1;
    animation: color-cycle-border 6s linear infinite;
    box-shadow: 0 0 25px rgba(137, 221, 255, 0.2);
    overflow: visible;
}

#music-player.player-hidden {
    transform: translateX(calc(-100% + 42px));
}

.player-body {
    position: relative;
    padding: 8px;
    width: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow: hidden;
}

.player-body::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--panel-bg);
    backdrop-filter: blur(8px);
}

#player-album-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.5);
    z-index: -2;
    transition: background-image 0.5s ease-in-out;
}

.album-art-container {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    z-index: 3;
}

#album-art {
    height: 100%;
    width: 100%;
    border-radius: 50%;
    object-fit: cover;
}

#playlist-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.album-art-container:hover #playlist-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.player-info-and-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 200px;
    position: relative;
    z-index: 3;
}

.song-info {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
}

#song-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-text);
    text-overflow: ellipsis;
    overflow: hidden;
}

#song-artist {
    font-size: 0.8rem;
    color: var(--secondary-text);
    text-overflow: ellipsis;
    overflow: hidden;
    flex-shrink: 1;
}

.timeline-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.time-display {
    font-size: 0.7rem;
    color: var(--secondary-text);
    min-width: 35px;
    text-align: center;
}

#player-toggle-btn {
    background: var(--panel-bg);
    border: none;
    width: 42px;
    color: var(--primary-text);
    font-size: 1.2rem;
    transition: color 0.2s, text-shadow 0.2s;
    border-radius: 0;
    position: relative;
    z-index: 3;
}

#player-toggle-btn:hover {
    color: var(--highlight-color);
    text-shadow: 0 0 8px var(--highlight-color);
}

.toggled-glow {
    color: var(--highlight-color) !important;
    text-shadow: 0 0 8px var(--highlight-color);
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.player-controls button {
    background: none;
    border: none;
    color: var(--secondary-text);
    transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.player-controls button:hover {
    color: var(--primary-text);
    transform: scale(1.15);
    text-shadow: 0 0 5px var(--primary-text);
}

.volume-control-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

#volume-slider-input {
    width: 0;
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    pointer-events: none;
    flex-shrink: 0;
}

.volume-control-wrapper:hover #volume-slider-input {
    width: 50px;
    opacity: 1;
    pointer-events: auto;
}

input[type=range] {
    -webkit-appearance: none;
    background: transparent;
    width: 100%;
    margin: 0;
    padding: 0;
}

input[type=range]::-webkit-slider-runnable-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--primary-text);
    margin-top: -4.5px;
    box-shadow: 0 0 5px var(--highlight-color);
}

#song-notification-toast {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel-bg);
    border: 2px dashed;
    border-image-slice: 1;
    padding: 8px 12px;
    border-radius: 8px;
    width: 250px;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out-back), visibility 0.4s;
    pointer-events: none;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(137, 221, 255, 0.2);
    animation: color-cycle-border 6s linear infinite;
}

#song-notification-toast.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

#toast-album-art {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

#song-notification-toast>div {
    overflow: hidden;
}

#toast-song-title {
    font-size: 0.9rem;
    color: var(--primary-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#playlist-modal {
    position: absolute;
    bottom: 110%;
    left: 0;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s var(--ease-out-back), visibility 0.4s;
    pointer-events: none;
}

#playlist-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.modal-content {
    position: relative;
    border: 2px dashed;
    border-image-slice: 1;
    width: 280px;
    max-height: 40vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 25px rgba(137, 221, 255, 0.2);
    animation: color-cycle-border 6s linear infinite;
}

.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--panel-bg);
    backdrop-filter: blur(5px);
}

.modal-header {
    padding: 10px 15px;
    border-bottom: 2px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-text);
}

#playlist-search {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-text);
    color: var(--primary-text);
    padding: 5px 8px;
    font-family: var(--font-stack);
    border-radius: 4px;
}

#playlist-search:focus {
    outline: none;
    border-color: var(--primary-text);
    box-shadow: 0 0 5px var(--primary-text);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-text);
}

#playlist-container {
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.playlist-song {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 0;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(137, 221, 255, 0.2);
    overflow: hidden;
}

.playlist-song .song-blur-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.4);
    z-index: -1;
    transition: background-image 0.3s ease;
}

.playlist-song-content {
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    overflow: hidden;
}

.playlist-song:last-child {
    border-bottom: none;
}

.playlist-song:hover {
    background-color: rgba(137, 221, 255, 0.1);
}

.playlist-song.playing {
    background-color: rgba(137, 221, 255, 0.2);
    border-left: 2px solid var(--primary-text);
    padding-left: 6px;
}

.playlist-song img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.playlist-song>div>div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.playlist-song-title {
    font-size: 1rem;
    color: var(--primary-text);
}

.playlist-song-artist {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

.spinning {
    animation: spin 4s linear infinite;
}

.gradient-button {
    background-image: linear-gradient(45deg, var(--primary-text), var(--highlight-color));
    color: var(--background-color);
    border: none;
    padding: 10px 15px;
    font-family: var(--font-stack);
    font-size: 1rem;
    border-radius: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gradient-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

#letter-board-panel .panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#recent-letters-preview {
    max-height: 150px;
    overflow: hidden;
    position: relative;
    padding: 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.2);
}

#recent-letters-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(20, 26, 61, 0.85), transparent);
}

.recent-letter-item {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: var(--secondary-text);
}

.recent-letter-item strong {
    color: var(--primary-text);
}

#full-screen-board-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(13, 17, 38, 0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#full-screen-board-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#letter-board-main {
    width: 100%;
    height: 100%;
    padding: 80px 40px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    align-content: start;
}

.sticky-note {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 15px;
    padding-top: 25px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s var(--ease-out-back), box-shadow 0.2s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #2c3e50;
    border: 2px solid transparent;
}

.sticky-note.pinned {
    order: -1;
    /* Puts it at the start */
    border-color: var(--primary-text);
}

.sticky-note.hidden {
    transform: scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.sticky-note:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.note-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.note-action-btn {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: inherit;
    opacity: 0.5;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 1;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-action-btn:hover {
    opacity: 1;
}

.sticky-note-content {
    flex-grow: 1;
    overflow: hidden;
    word-wrap: break-word;
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.sticky-note-content b,
.sticky-note-content strong {
    color: #000;
}

.sticky-note-content i,
.sticky-note-content em {
    color: #1a1a1a;
}

.sticky-note-content s {
    opacity: 0.6;
}

.sticky-note-author {
    font-size: 0.9rem;
    text-align: right;
    font-weight: bold;
    color: rgba(44, 62, 80, 0.7);
}

.sticky-note.font-pixel {
    font-family: var(--font-stack);
}

.sticky-note.font-mono {
    font-family: monospace;
}

.sticky-note.font-cursive {
    font-family: var(--handwriting-font);
    font-size: 1.2rem;
}

.sticky-note.frame-dashed {
    border-style: dashed;
    border-color: rgba(0, 0, 0, 0.3);
}

.sticky-note.frame-solid {
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.3);
}

.sticky-note.frame-double {
    border-style: double;
    border-color: rgba(0, 0, 0, 0.3);
    border-width: 4px;
}


.board-top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 10px;
}

#add-letter-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-image: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
}

#show-hidden-btn,
#close-board-btn {
    position: relative;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#show-hidden-btn {
    background-image: linear-gradient(45deg, #89ddff, #b0c4de);
    color: var(--background-color);
}

#close-board-btn {
    background-image: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.letter-modal {
    position: fixed;
    inset: 0;
    z-index: 1002;
    background: rgba(13, 17, 38, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.letter-modal.visible {
    opacity: 1;
    visibility: visible;
}

.letter-modal .modal-inner-content {
    background-image: linear-gradient(135deg, #232526 0%, #414345 100%);
    width: 90%;
    max-width: 600px;
    padding: 25px;
    border-radius: 10px;
    position: relative;
    border: 2px dashed;
    border-image-slice: 1;
    animation: color-cycle-border 6s linear infinite;
    box-shadow: 0 0 30px rgba(137, 221, 255, 0.4);
    transform: scale(0.95);
    transition: transform 0.2s var(--ease-out-back);
}

.letter-modal.visible .modal-inner-content {
    transform: scale(1);
}

.letter-modal .modal-inner-content h3 {
    color: var(--primary-text);
    text-align: center;
    margin-top: 0;
    font-size: 1.8rem;
}

#add-letter-form,
#edit-letter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#add-letter-form input,
#add-letter-form textarea,
#edit-letter-form input,
#edit-letter-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-text);
    color: var(--primary-text);
    padding: 10px;
    border-radius: 4px;
    font-size: 1rem;
}

#add-letter-form textarea,
#edit-letter-form textarea {
    min-height: 150px;
}

#add-letter-form textarea.font-pixel,
#edit-letter-form textarea.font-pixel {
    font-family: var(--font-stack);
}

#add-letter-form textarea.font-mono,
#edit-letter-form textarea.font-mono {
    font-family: monospace;
}

#add-letter-form textarea.font-cursive,
#edit-letter-form textarea.font-cursive {
    font-family: var(--handwriting-font);
    font-size: 1.2rem;
}

#edit-letter-form textarea {
    resize: none;
}

#add-letter-form button,
#edit-letter-form button {
    margin-top: 10px;
}

.letter-modal .close-modal-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 1.8rem;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#view-letter-content {
    font-size: 1.2rem;
    color: var(--secondary-text);
    white-space: pre-wrap;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 5px;
    word-break: break-word;
}

#view-letter-author {
    margin-top: 20px;
    text-align: right;
    font-size: 1rem;
    color: var(--primary-text);
}

#delete-letter-btn,
#edit-letter-btn {
    background-image: linear-gradient(45deg, #f093fb, #f5576c);
    margin-top: 15px;
}

#edit-letter-btn {
    background-image: linear-gradient(45deg, #4facfe, #00f2fe);
}

#cooldown-message {
    text-align: center;
    color: var(--highlight-color);
}

.cosmetics-chooser {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px dashed var(--secondary-text);
    border-bottom: 1px dashed var(--secondary-text);
    padding: 15px 0;
}

.cosmetic-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cosmetic-group span {
    font-size: 0.9rem;
    color: var(--secondary-text);
    min-width: 60px;
}

.cosmetic-option {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cosmetic-option input {
    display: none;
}

.cosmetic-option:hover {
    transform: scale(1.1);
}

.cosmetic-option input:checked+label {
    border-color: var(--primary-text);
    box-shadow: 0 0 10px var(--primary-text);
}

.cosmetic-option label {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    cursor: pointer;
}

.cosmetic-option.font-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary-text);
    font-size: 1rem;
}

.font-pixel {
    font-family: var(--font-stack);
}

.font-mono {
    font-family: monospace;
}

.font-cursive {
    font-family: var(--handwriting-font);
}

.cosmetic-option.frame-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: var(--primary-text);
    font-size: 1rem;
}

#hidden-notes-list {
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden-note-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hidden-note-item p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes gentle-pass {
    0% {
        transform: translateX(-140%) skewX(-30deg);
    }

    100% {
        transform: translateX(140%) skewX(-30deg);
    }
}

@keyframes rockstar-glow {
    from {
        filter: drop-shadow(0 0 3px var(--primary-text)) drop-shadow(0 0 5px rgba(137, 221, 255, 0.5));
    }

    to {
        filter: drop-shadow(0 0 5px var(--highlight-color)) drop-shadow(0 0 10px rgba(255, 105, 180, 0.7));
    }
}

@keyframes rgb-loader-fill {
    0% {
        fill: #ff00ff;
        filter: drop-shadow(0 0 8px #ff00ff);
    }

    17% {
        fill: #0000ff;
        filter: drop-shadow(0 0 8px #0000ff);
    }

    33% {
        fill: #00ffff;
        filter: drop-shadow(0 0 8px #00ffff);
    }

    50% {
        fill: #00ff00;
        filter: drop-shadow(0 0 8px #00ff00);
    }

    67% {
        fill: #ffff00;
        filter: drop-shadow(0 0 8px #ffff00);
    }

    83% {
        fill: #ff0000;
        filter: drop-shadow(0 0 8px #ff0000);
    }

    100% {
        fill: #ff00ff;
        filter: drop-shadow(0 0 8px #ff00ff);
    }
}

@keyframes title-glow {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

@keyframes header-glow {
    from {
        box-shadow: 0 0 15px var(--primary-text);
    }

    to {
        box-shadow: 0 0 30px var(--highlight-color);
    }
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(100vh);
    }
}

@keyframes float {
    from {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }

    to {
        transform: translateY(30px) translateX(-20px) rotate(5deg);
    }
}

@keyframes color-cycle {
    0% {
        border-color: #ff00ff;
    }

    33% {
        border-color: #00ffff;
    }

    66% {
        border-color: #ffff00;
    }

    100% {
        border-color: #ff00ff;
    }
}

@keyframes color-cycle-border {
    0% {
        border-image-source: linear-gradient(90deg, #ff00ff, #00ffff);
    }

    50% {
        border-image-source: linear-gradient(90deg, #00ffff, #ff00ff);
    }

    100% {
        border-image-source: linear-gradient(90deg, #ff00ff, #00ffff);
    }
}

@keyframes pet-wake-up {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-3px) rotate(-2deg);
    }

    50% {
        transform: translateY(0) rotate(2deg);
    }

    75% {
        transform: translateY(-3px) rotate(0);
    }
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes logo-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@media (max-width: 900px) {
    body {
        padding: 10px;
        padding-bottom: 80px;
    }

    .site-wrapper {
        min-height: auto;
    }

    header,
    .sidebar-left,
    .main-content,
    .sidebar-right {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }

    .header-title-area {
        padding-left: 20px;
        text-align: center;
        flex-grow: 1;
    }

    .header-logo-breakout {
        display: none;
    }

    .header-nav {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    #music-player {
        bottom: 70px;
        left: 10px;
        right: 10px;
        width: auto;
    }

    .player-info-and-controls {
        width: 100%;
        flex-grow: 1;
    }

    #playlist-modal {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
    }

    #playlist-modal.show {
        transform: translate(-50%, -50%) scale(1);
    }

    .deco {
        display: none;
    }

    .video-card {
        width: 250px;
    }

    #letter-board-main {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 70px 15px 100px 15px;
        gap: 15px;
    }

    #add-letter-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 20px;
    }

    .board-top-controls {
        top: 15px;
        right: 15px;
    }

    #show-hidden-btn,
    #close-board-btn {
        width: 40px;
        height: 40px;
    }
}

.webring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.webring-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

#audio-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0.6;
    pointer-events: none;
}

.buffering-indicator {
    position: absolute;
    inset: -2px;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    z-index: 99;
}

.buffering-indicator::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    filter: blur(5px);
    animation: color-cycle-border 3s linear infinite;
}

#music-player.buffering .buffering-indicator {
    opacity: 1;
}

#background-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    background-size: cover;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

#mobile-notice {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    color: var(--secondary-text);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1001;
    border: 1px solid var(--primary-text);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 15px;
}
#close-mobile-notice {
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 1.5rem;
    cursor: pointer;
}
