* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #070707;
    --bg-panel: #111111;
    --bg-panel-soft: #161616;
    --line: #d6d0c7;
    --line-soft: #8d877f;
    --text-main: #f2eee8;
    --text-dim: #bbb5ad;
    --accent: #4f171d;
    --accent-soft: #341015;
    --shadow-dark: rgba(0, 0, 0, 0.6);
    --shadow-light: rgba(255, 255, 255, 0.06);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "VT323", "Courier New", monospace;
    background: var(--bg-black);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.25;
    letter-spacing: 0.03em;
    overflow-x: hidden;
    position: relative;
}

.texture-grid,
.texture-scanlines,
.texture-noise,
#particles-canvas,
.stars-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.texture-grid {
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 24px 24px;
}

.texture-scanlines {
    z-index: 1;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.025) 0,
        rgba(255, 255, 255, 0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.35;
}

.texture-noise {
    z-index: 2;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.4px, transparent 0.4px);
    background-size: 3px 3px;
    opacity: 0.2;
}

#particles-canvas {
    z-index: 1;
    opacity: 0.08;
}

.stars-container {
    z-index: 2;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(214, 208, 199, 0.2);
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.45;
    }
}

.container {
    width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 16px 0 20px;
    position: relative;
    z-index: 5;
}

.retro-window {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-soft) 100%);
    border: 1px solid var(--line-soft);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 var(--shadow-light),
        0 10px 24px -16px var(--shadow-dark);
}

.window-titlebar {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px 0 9px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #1b1b1b 0%, #101010 100%);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.window-label {
    font-family: "Press Start 2P", monospace;
    font-size: 9px;
    color: var(--line);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.window-controls span {
    width: 14px;
    height: 14px;
    border: 1px solid #8b857d;
    background: #1f1f1f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.window-controls span:last-child {
    border-color: #9d7478;
    background: var(--accent-soft);
}

.window-live {
    position: relative;
    will-change: translate;
}

.window-live.is-dragging {
    cursor: grabbing;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 var(--shadow-light),
        0 18px 34px -18px rgba(0, 0, 0, 0.8);
}

.window-live.is-dragging .window-titlebar {
    cursor: grabbing;
}

.window-live.is-minimized > .window-body {
    display: none;
}

.window-live.is-closed {
    visibility: hidden;
    pointer-events: none;
}

.window-body {
    padding: 10px;
}

.hero {
    margin-bottom: 12px;
}

.hero-content {
    min-height: 98px;
    display: grid;
    place-items: center;
}

.artist-name {
    font-family: "Press Start 2P", monospace;
    font-size: clamp(22px, 3vw, 40px);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-main);
    text-shadow: 1px 1px 0 #000;
}

.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(240px, 1fr);
    grid-template-areas:
        "links side"
        "releases side";
    gap: 12px;
    align-items: start;
}

.links-section {
    grid-area: links;
}

.releases-section {
    grid-area: releases;
}

.side-stack {
    grid-area: side;
    display: grid;
    gap: 12px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px;
}

.link-card {
    position: relative;
    min-height: 86px;
    border: 1px solid #8d877f;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.link-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: var(--line);
    background: linear-gradient(180deg, #212121 0%, #151515 100%);
}

.link-icon {
    font-size: 24px;
    color: var(--text-main);
    opacity: 0.9;
}

.link-label {
    font-family: "Press Start 2P", monospace;
    font-size: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
    text-align: center;
    line-height: 1.4;
}

.link-card:hover .link-label {
    color: var(--text-main);
}

.link-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.section-title {
    font-family: "Press Start 2P", monospace;
    font-size: 10px;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 9px;
}

.releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.release-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #8d877f;
    background: #0f0f0f;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.release-card:hover {
    transform: translateY(-2px);
    border-color: var(--line);
}

.release-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(18%) contrast(1.05) brightness(0.93);
}

.email-section .window-body {
    padding: 10px;
}

.email-wrapper {
    border: 1px solid #8d877f;
    background: #141414;
    min-height: 78px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: copy;
    position: relative;
    padding: 10px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.email-wrapper:hover {
    border-color: var(--line);
    background: #1a1a1a;
}

.email-icon {
    font-size: 18px;
    color: var(--text-main);
}

.email-text {
    font-family: "Press Start 2P", monospace;
    font-size: 8px;
    text-align: center;
    color: var(--text-dim);
    line-height: 1.5;
    word-break: break-word;
}

.copy-feedback {
    position: absolute;
    top: -22px;
    font-family: "Press Start 2P", monospace;
    font-size: 7px;
    color: #c69ba0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.copy-feedback.show {
    opacity: 1;
}

.meta-panel .window-body {
    padding: 9px 10px 10px;
}

.beat-link-card {
    border: 1px solid #8d877f;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    min-height: 96px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.beat-link-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.beat-link-card:hover {
    transform: translateY(-2px);
    border-color: var(--line);
    background: linear-gradient(180deg, #212121 0%, #151515 100%);
}

.beat-link-icon {
    font-size: 28px;
    line-height: 1;
}

.beat-link-label {
    font-family: "Press Start 2P", monospace;
    font-size: 8px;
    line-height: 1.5;
    text-align: center;
    color: var(--text-main);
    text-transform: uppercase;
}

.beat-link-description {
    margin-top: 8px;
    font-family: "Press Start 2P", monospace;
    font-size: 7px;
    line-height: 1.6;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer {
    margin-top: 12px;
}

.footer .window-body {
    padding: 9px 10px 10px;
}

.footer p {
    font-family: "Press Start 2P", monospace;
    font-size: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.release-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 999;
}

.release-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.76);
}

.modal-content {
    width: min(760px, 92vw);
    position: relative;
    z-index: 2;
}

.modal-close {
    width: 17px;
    height: 17px;
    border: 1px solid #9d7478;
    background: var(--accent-soft);
    color: var(--line);
    font-size: 11px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--accent);
}

.modal-cover {
    width: min(300px, 100%);
    aspect-ratio: 1;
    border: 1px solid #8d877f;
    margin: 2px auto 12px;
    overflow: hidden;
}

.modal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(14%) contrast(1.04);
}

.modal-info {
    display: grid;
    gap: 10px;
}

.modal-title {
    font-family: "Press Start 2P", monospace;
    font-size: clamp(10px, 2vw, 13px);
    line-height: 1.5;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-main);
}

.modal-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.modal-platform-link {
    min-height: 62px;
    border: 1px solid #8d877f;
    background: #141414;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.modal-platform-link:hover {
    transform: translateY(-2px);
    border-color: var(--line);
    background: #1a1a1a;
}

.modal-platform-link i {
    font-size: 16px;
}

.modal-platform-link span {
    font-family: "Press Start 2P", monospace;
    font-size: 7px;
    text-transform: uppercase;
    color: var(--text-dim);
}

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: #0b0b0b;
}

::-webkit-scrollbar-thumb {
    background: #3d3a37;
    border: 1px solid #64605b;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b4641;
}

@media (max-width: 1080px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "links"
            "releases"
            "side";
    }

    .links-grid {
        grid-template-columns: repeat(3, minmax(110px, 1fr));
    }

    .side-stack {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .container {
        width: 96vw;
        padding-top: 10px;
    }

    .window-body {
        padding: 8px;
    }

    .hero-content {
        min-height: 82px;
    }

    .artist-name {
        font-size: clamp(16px, 6.4vw, 24px);
    }

    .links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .link-card {
        min-height: 78px;
    }

    .releases-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .side-stack {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95vw;
    }

    .modal-platforms {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
