html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: Noto Sans, system-ui, sans-serif;
    min-height: 100vh;
    margin: 0;
    background-image: url('./beats.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: #111;
}

.topbar {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    padding: 10px 16px;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.125);
    color: #fff;
}

:root {
    --window-opacity: 0.96;
}

.brand {
    margin: 0;
    padding: 4px 12px;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.125);
    border-radius: 16px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 16px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
}

.topbar-note {
    color: #fff;
}

.topbar-time {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.launcherbutton {
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.launcherbutton:hover {
    background: rgba(255, 255, 255, 0.28);
}

.dock {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    min-width: 520px;
    max-width: calc(100% - 40px);
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 12px 18px;
    background: rgba(20, 20, 20, 0.3);
    backdrop-filter: blur(16px);
    border-radius: 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.appicon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 88px;
    padding: 14px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    color: #fff;
    text-align: center;
    cursor: pointer;
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    z-index: 2;
    flex-shrink: 0;
}

.appicon:hover {
    transform: translateY(-2px);
}

.appicon-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.36);
    color: #111;
    font-weight: 800;
    font-size: 1.2rem;
}

.appicon-label {
    margin: 0;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.window {
    border: solid 1px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    position: absolute;
    backdrop-filter: blur(6px);
    background-color: rgba(255, 255, 255, var(--window-opacity));
    background: linear-gradient(180deg, rgba(255, 255, 255, var(--window-opacity)), rgba(245, 245, 245, var(--window-opacity)));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    width: clamp(320px, 90vw, 980px);
    max-width: 980px;
    max-height: calc(100vh - 40px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.windowheader {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(245, 245, 245, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(16px);
    cursor: grab;
    user-select: none;
    position: relative;
}

.window-controls,
.window-title,
.window-handle {
    display: flex;
    align-items: center;
}

.window-controls {
    gap: 8px;
}

.window-title {
    gap: 10px;
}

.headertext {
    margin: 0;
    color: #2b2b2b;
    font-weight: 700;
    letter-spacing: 0.16em;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.closebutton,
.openbutton {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 0;
}

.closebutton {
    background: #ff5f56;
}

.openbutton {
    background: #27c93f;
}

.yellow-light {
    width: 12px;
    height: 12px;
    background: #ffbd2e;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.window-pill {
    width: 42px;
    height: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(215, 215, 215, 0.9));
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.window-handle {
    width: 60px;
    min-width: 60px;
    height: 18px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    justify-content: center;
    padding: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.window-handle-pill {
    width: 28px;
    height: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
}

.window-body {
    padding: 16px 16px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.music-shell {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 16px;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: rgba(20, 20, 20, 0.9);
    border-radius: 20px;
    color: #fff;
}

.hero-panel p,
.hero-panel h2 {
    margin: 0;
}

.greeting-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.now-playing-label {
    margin-top: 8px;
    color: #ddd;
    font-size: 0.95rem;
}

.now-playing-song {
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

.time-group {
    text-align: right;
}

.clock-large {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.date-large {
    font-size: 0.95rem;
    color: #ccc;
}

.player-card {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    align-items: center;
}

.artwork-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
}

.album-artwork {
    width: min(280px, 100%);
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #ff7f50 0%, #ff4f8d 100%);
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2.4rem;
    margin: 0 auto;
}

.album-meta {
    display: grid;
    gap: 4px;
}

.song-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.artist-name {
    color: #666;
}

.progress-card {
    display: grid;
    gap: 16px;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

#progressSlider {
    width: 100%;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.control-button {
    border: none;
    background: rgba(20, 20, 20, 0.08);
    width: 48px;
    height: 48px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.2rem;
}

.volume-slider {
    flex: 1;
}

.quick-apps {
    display: flex;
    gap: 10px;
    padding: 18px 0;
}

.quick-app-button {
    border: none;
    background: rgba(20, 20, 20, 0.08);
    color: #222;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.quick-app-button.active,
.quick-app-button:hover {
    background: rgba(20, 20, 20, 0.18);
}

.screen-panels {
    display: grid;
    gap: 18px;
}

.app-screen {
    display: none;
    padding: 18px;
    background: rgba(245, 245, 245, 0.9);
    border-radius: 20px;
}

.app-screen.active {
    display: block;
}

.library-list,
.playlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.library-list li,
.playlist-list li {
    background: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.playlist-manager {
    display: grid;
    gap: 16px;
}

.playlist-form {
    display: flex;
    gap: 10px;
}

.playlist-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.playlist-form button {
    border: none;
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border-radius: 14px;
    cursor: pointer;
}

.settings-grid {
    display: grid;
    gap: 16px;
}

.settings-item {
    display: grid;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.settings-item label {
    font-weight: 700;
    color: #333;
}

.settings-item input[type="color"],
.settings-item input[type="range"] {
    width: 100%;
}

.control-button {
    border: none;
    background: rgba(20, 20, 20, 0.08);
    width: 80px;
    height: 44px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
}

.window-heading {
    color: black;
    margin: 4px;
}

@media (max-width: 980px) {
    .window {
        width: calc(100vw - 28px);
        max-width: none;
        max-height: calc(100vh - 28px);
    }

    .window-body {
        padding: 16px 12px 14px;
        max-height: calc(100vh - 104px);
    }

    .music-shell {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-panel,
    .player-card,
    .app-screen,
    .settings-item {
        padding: 14px;
        border-radius: 18px;
    }

    .hero-panel {
        flex-direction: column;
    }

    .player-card {
        grid-template-columns: 1fr;
    }

    .progress-info,
    .player-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .control-button {
        width: 100%;
    }
}

@media (max-width: 640px) {

    .topbar,
    .dock {
        padding-left: 12px;
        padding-right: 12px;
    }

    .dock {
        height: auto;
        min-width: auto;
        padding: 12px 12px 14px;
    }

    .appicon {
        width: 72px;
        padding: 12px 8px;
    }

    .appicon-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .quick-app-button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
}