:root {
    color-scheme: dark;
    --bg-1: #09090f;
    --bg-2: #121225;
    --panel: rgba(20, 24, 34, 0.72);
    --panel-border: rgba(166, 179, 255, 0.2);
    --text-main: #f2f5ff;
    --text-subtle: #9da7c2;
    --accent-a: #8e6bff;
    --accent-b: #44b8ff;
    --accent-c: #69ffc7;
}

* {
    box-sizing: border-box;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
    min-height: 100vh;
    background: #000;
    color: var(--text-main);
    overflow-x: hidden;
}

html {
    scrollbar-width: thin;
    scrollbar-color: rgba(166, 179, 255, 0.35) rgba(255, 255, 255, 0.04);
}
html::-webkit-scrollbar {
    width: 10px;
}
html::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}
html::-webkit-scrollbar-thumb {
    background: rgba(166, 179, 255, 0.35);
    border-radius: 10px;
}
html::-webkit-scrollbar-thumb:hover {
    background: rgba(166, 179, 255, 0.5);
}

#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -4;
    pointer-events: none;
}

body::before,
body::after {
    display: none;
}

.glass-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), inset 0 -10px 20px rgba(255, 255, 255, 0.015), 0 10px 20px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    position: relative;
    overflow: hidden;
    transition: backdrop-filter 220ms ease, -webkit-backdrop-filter 220ms ease,
        background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, 0.24), transparent 35%),
        radial-gradient(circle at 92% 120%, rgba(130, 160, 255, 0.1), transparent 40%);
    pointer-events: none;
}

.glass-card::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 180%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.25);
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.082) 0%, transparent 76%);
    transition: transform 0.45s ease, opacity 0.45s ease;
    pointer-events: none;
}

.glass-card:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.56), inset 0 -16px 30px rgba(255, 255, 255, 0.03),
        0 16px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(30px) saturate(185%);
    -webkit-backdrop-filter: blur(30px) saturate(185%);
}

.glass-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.page-wrapper {
    min-height: 100vh;
}

.corner-cat {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10;
    transform: rotate(-8deg);
    transform-origin: bottom right;
    line-height: 0;
    pointer-events: none;
}

.corner-cat img {
    display: block;
    width: 100px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.discord-profile-wrap {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 10;
}

.page-layout {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 24px;
}

.center {
    min-width: 0;
}

.music-panel-wrap {
    margin-bottom: 40px;
}

.music-panel-wrap .music-panel {
    max-width: 100%;
}

.intro {
    text-align: center;
    margin-bottom: 24px;
}

.intro__title {
    margin: 0;
    font-size: clamp(32px, 5vw, 52px);
    letter-spacing: 0.02em;
    text-shadow: 0 0 28px rgba(142, 107, 255, 0.45);
}

.intro__subtitle {
    margin: 12px 0 0;
    color: var(--text-subtle);
    font-size: clamp(14px, 2vw, 18px);
}

.section {
    margin-bottom: 36px;
}

.section__title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.project-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.project-card__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.project-card__desc {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: var(--text-subtle);
    line-height: 1.5;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-card__tags span {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-subtle);
}

.cmd-window {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}

.cmd-window__titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.cmd-window__title {
    flex: 1;
    text-align: center;
}

.cmd-window__buttons {
    display: flex;
    gap: 8px;
}

.cmd-window__btn {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.cmd-window__body {
    padding: 16px 18px 20px;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    background: rgba(0, 8, 12, 0.6);
    color: #a8e6cf;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 230, 207, 0.4) rgba(0, 20, 28, 0.6);
}

.cmd-window__body::-webkit-scrollbar {
    width: 8px;
}

.cmd-window__body::-webkit-scrollbar-track {
    background: rgba(0, 20, 28, 0.6);
}

.cmd-window__body::-webkit-scrollbar-thumb {
    background: rgba(168, 230, 207, 0.4);
    border-radius: 8px;
}

.cmd-window__body::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 230, 207, 0.55);
}

.cmd-window__line {
    margin: 0;
}

.cmd-window__prompt {
    color: #ffd93d;
    margin-right: 6px;
}

.cmd-window__line--output {
    color: #b8e6d5;
    margin: 4px 0 0 1em;
}

.cmd-window__line--meta {
    color: #7eb8a8;
    font-size: 0.85em;
    margin: 2px 0 0 1em;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(168, 230, 207, 0.2);
}

.cmd-window__line--meta:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cmd-window__cursor {
    animation: cmd-blink 1s step-end infinite;
    color: #ffd93d;
}

@keyframes cmd-blink {
    50% { opacity: 0; }
}

.music-panel {
    padding: 24px;
    width: 100%;
}

.music-panel__title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0.01em;
    text-shadow: 0 0 22px rgba(142, 107, 255, 0.4);
}

.subtitle {
    margin-top: 8px;
    color: var(--text-subtle);
}

.discord-profile {
    width: 300px;
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
}

.discord-profile__avatar1 {
    height: 105px;
    min-height: 105px;
    width: 100%;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background-color: #1a1b1e;
}

.discord-profile__avatar1-img {
    display: block;
    width: 100%;
    height: 105px;
    object-fit: cover;
}

.discord-profile__body {
    padding: 0 16px 16px;
    position: relative;
}

.discord-profile__avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin-top: -46px;
    margin-left: 0;
    flex-shrink: 0;
}

.discord-profile__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.discord-profile__avatar-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    pointer-events: none;
}

.discord-profile__status {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
}

.discord-profile__status--online {
    background: #23a559;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.discord-profile__status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #b5bac1;
    font-size: 14px;
}

.discord-profile__status-emoji {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.discord-profile__display-name {
    margin: 6px 0 2px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #f2f3f5;
}

.discord-profile__username {
    margin: 0;
    font-size: 14px;
    color: #b5bac1;
}

.discord-profile__about {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.discord-profile__about-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b5bac1;
    margin-bottom: 4px;
}

.discord-profile__about-text {
    margin: 0;
    font-size: 14px;
    color: #f2f3f5;
}

.player {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    align-items: center;
}

.cover {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 18px;
    background: #262b35;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.meta {
    min-width: 0;
}

.state-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #c8cff9;
    margin-bottom: 10px;
    font-weight: 700;
}

.state-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-c);
    box-shadow: 0 0 16px rgba(105, 255, 199, 0.8);
    animation: pulse 2.1s ease-in-out infinite;
}

.player.is-last-played .state-label::before {
    background: #e6c84a;
    box-shadow: 0 0 16px rgba(230, 200, 74, 0.8);
}

.title {
    font-size: clamp(15px, 2vw, 20px);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.artists {
    margin-top: 6px;
    color: #d6dcf0;
    font-size: 15px;
}

.album {
    margin-top: 8px;
    color: #99a5c6;
    font-size: 13px;
}

.preview-btn {
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(227, 234, 255, 0.84);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: lowercase;
    cursor: pointer;
    backdrop-filter: blur(12px) saturate(135%);
    -webkit-backdrop-filter: blur(12px) saturate(135%);
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.preview-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    color: #eff4ff;
}

.preview-btn:disabled {
    cursor: default;
    opacity: 0.55;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(220, 228, 247, 0.6);
}

.progress-row {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    align-items: center;
    color: #bec7df;
    font-size: 12px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

#progressInner {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(174, 132, 255, 0.92), rgba(120, 205, 255, 0.96));
    box-shadow: 0 0 16px rgba(120, 171, 255, 0.8);
}

.empty,
.error {
    padding: 14px 16px;
    border-radius: 12px;
    margin-top: 8px;
}

.empty {
    background: rgba(255, 255, 255, 0.11);
    color: #d1dbf2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.error {
    background: rgba(130, 32, 70, 0.43);
    color: #ffd0e0;
    border: 1px solid rgba(255, 163, 198, 0.28);
}

.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .page-layout {
        padding: 16px;
    }
}

@media (max-width: 700px) {
    .page-wrapper {
        display: flex;
        flex-direction: column;
    }

    .page-layout {
        order: 0;
        padding: 12px;
    }

    .discord-profile-wrap {
        position: static;
        order: 1;
        padding: 12px 12px 24px;
        margin: 0 auto;
        width: 100%;
        max-width: 300px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .player {
        grid-template-columns: 120px 1fr;
    }

    .cover {
        width: 120px;
        height: 120px;
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.72);
        opacity: 0.6;
    }
}

@keyframes blobMoveA {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(10vmax, 8vmax, 0);
    }
}

@keyframes blobMoveB {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-8vmax, -10vmax, 0);
    }
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.loader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader__fall {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -100%);
    animation: loaderFall 2.5s ease-in-out forwards;
}

.loader__img {
    display: block;
    width: min(280px, 60vw);
    height: auto;
}

.loader__text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    user-select: none;
    -webkit-user-select: none;
}

.loader--text-visible .loader__text {
    opacity: 1;
    pointer-events: auto;
}

.loader__word {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: rgba(242, 245, 255, 0.6);
    text-shadow: 0 0 16px rgba(142, 107, 255, 0.2);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-user-select: none;
}

.loader__word--left {
    transform: translateX(-100vw);
}

.loader__word--right {
    transform: translateX(100vw);
}

.loader--text-visible .loader__word--left,
.loader--text-visible .loader__word--right {
    transform: translateX(0);
}

.loader--dismiss .loader__word--left {
    transform: translateX(-100vw);
}

.loader--dismiss .loader__word--right {
    transform: translateX(100vw);
}

@keyframes loaderFall {
    to {
        transform: translate(-50%, 100vh);
    }
}
