@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=DM+Mono:wght@300;400&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-weight: 300;
    background: #0b0d08;
    color: #b0b898;
    min-height: 100vh;
    line-height: 1.7;
    position: relative;
}

/* Murky fog overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(25, 40, 20, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 30%, rgba(15, 30, 25, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(20, 25, 15, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Film grain */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

a {
    color: #88aa68;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #c0e090;
}

/* Layout */

header {
    border-bottom: 1px solid rgba(60, 70, 45, 0.2);
    padding: 1.5rem 0;
    position: relative;
    z-index: 2;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-family: 'Special Elite', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #d8e8b8;
}

header h1 a { color: inherit; }
header h1 a:hover { color: inherit; opacity: 0.6; }

header nav a {
    margin-left: 2rem;
    font-size: 0.7rem;
    text-transform: lowercase;
    letter-spacing: 0.15em;
    color: #6a7a58;
}

header nav a:hover { color: #a8c880; }

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

section {
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

section + section {
    border-top: 1px solid rgba(60, 70, 45, 0.15);
}

section h3 {
    font-family: 'Special Elite', cursive;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #7a8a60;
    margin-bottom: 1.5rem;
}

footer {
    border-top: 1px solid rgba(60, 70, 45, 0.15);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.68rem;
    color: #4a5438;
    position: relative;
    z-index: 2;
}

footer a { color: #4a5438; }
footer a:hover { color: #6a7a58; }

footer span.origin {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.6rem;
    color: #3a4430;
    font-style: italic;
}

/* Track list & player (shared) */

.track-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.track-item {
    padding: 0.85rem 1rem;
    background: rgba(15, 20, 10, 0.5);
    border-left: 2px solid #1a2010;
    transition: all 0.2s;
}

.track-item:hover {
    border-left-color: #5a7a3a;
    background: rgba(20, 28, 14, 0.6);
}

.track-item.active {
    border-left-color: #5a7a3a;
    background: rgba(20, 28, 14, 0.6);
}

.track-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.track-number {
    font-size: 0.65rem;
    color: #50603a;
    margin-right: 1.2rem;
    min-width: 1.5rem;
}

.track-title {
    font-weight: 400;
    color: #b0c890;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.88rem;
    flex: 1;
}

.track-title:hover { color: #d8f0b8; }

.track-date {
    font-size: 0.6rem;
    color: #50603a;
    margin-left: 1rem;
    white-space: nowrap;
}

.track-actions {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.download-link {
    font-size: 0.65rem;
    color: #50603a;
    transition: color 0.2s;
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.08em;
}

.download-link:hover { color: #88aa68; }

.track-player {
    display: none;
    margin-top: 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
}

.track-item.active .track-player { display: flex; }

.track-player:has(.track-art) {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.track-player .track-art {
    width: 64px;
    height: 64px;
    min-width: 64px;
    overflow: hidden;
}

.track-player .track-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.8) contrast(1.05);
}

.track-player-controls {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

.track-player audio {
    width: 100%;
    filter: sepia(0.2) hue-rotate(60deg) saturate(0.5) brightness(0.8);
}

.track-nav {
    display: flex;
    gap: 0.75rem;
}

.track-nav button {
    background: transparent;
    border: 1px solid rgba(60, 70, 45, 0.3);
    color: #6a7a58;
    font-family: inherit;
    font-size: 0.65rem;
    text-transform: lowercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.track-nav button:hover {
    border-color: #5a7a3a;
    color: #b0c890;
}

.track-nav button:disabled {
    opacity: 0.2;
    cursor: default;
}

.track-nav button:disabled:hover {
    border-color: rgba(60, 70, 45, 0.3);
    color: #6a7a58;
}

/* Album page (index.html) */

.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.album-cover {
    width: 400px;
    max-width: 100%;
    margin: 0 auto 2.5rem;
    position: relative;
}

.album-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.album-cover img {
    width: 100%;
    display: block;
    filter: saturate(0.8) contrast(1.05);
}

.album-title {
    font-family: 'Special Elite', cursive;
    font-size: 2.2rem;
    font-weight: 400;
    color: #d0e0a8;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.album-artist {
    font-size: 0.8rem;
    color: #708058;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 0.4rem;
}

.album-meta {
    font-size: 0.7rem;
    color: #5a6848;
    letter-spacing: 0.1em;
    font-style: italic;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1px;
}

.link-card {
    padding: 1rem;
    background: rgba(15, 20, 10, 0.5);
    border-left: 2px solid #1a2010;
    text-align: left;
    transition: border-color 0.2s;
}

.link-card:hover { border-left-color: #2a3520; }
.link-card .label {
    display: block;
    font-size: 0.6rem;
    color: #50603a;
    text-transform: lowercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.3rem;
}

.link-card .value {
    color: #6a7a58;
    font-size: 0.78rem;
    font-style: italic;
}

.demos-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.demo-item {
    padding: 0.85rem 1rem;
    background: rgba(15, 20, 10, 0.5);
    border-left: 2px solid #1a2010;
    transition: all 0.2s;
}

.demo-item:hover {
    border-left-color: #3a4a2a;
    background: rgba(20, 28, 14, 0.6);
}

.demo-item a {
    color: #88a068;
    font-size: 0.85rem;
}

.demo-item a:hover { color: #c0e090; }

.demo-item .demo-desc {
    font-size: 0.68rem;
    color: #5a6848;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Demo pages */

.page-header {
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.tv-icon {
    width: 120px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    filter: saturate(0) brightness(0.6) contrast(1.2);
    opacity: 0.7;
}

.page-title {
    font-family: 'Special Elite', cursive;
    font-size: 1.6rem;
    font-weight: 400;
    color: #d0e0a8;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.page-desc {
    font-size: 0.75rem;
    color: #6a7a58;
    font-style: italic;
}

.back-link {
    display: inline-block;
    font-size: 0.7rem;
    color: #6a7a58;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

.back-link:hover { color: #a8c880; }

.notes {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(15, 20, 10, 0.3);
    border-left: 2px solid #1a2010;
    font-size: 0.75rem;
    color: #6a7a58;
}

.notes a {
    display: block;
    margin-bottom: 0.3rem;
}

/* Player dock — floating pill pinned to viewport bottom */

.player-dock {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    z-index: 10000;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(8, 10, 5, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(60, 70, 45, 0.3);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(1.5rem);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.player-dock.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.dock-active {
    padding-bottom: 5rem;
}

.dock-progress {
    height: 3px;
    background: rgba(60, 70, 45, 0.2);
    cursor: pointer;
    transition: height 0.15s;
}

.dock-progress:hover {
    height: 5px;
}

.dock-progress-fill {
    height: 100%;
    background: #5a7a3a;
    width: 0%;
    pointer-events: none;
    transition: background 0.15s;
}

.dock-progress:hover .dock-progress-fill {
    background: #88aa68;
}

.dock-content {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 0.65rem;
}

.dock-art {
    width: 36px;
    height: 36px;
    min-width: 36px;
    overflow: hidden;
    border-radius: 4px;
}

.dock-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.8) contrast(1.05);
}

.dock-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.dock-title {
    font-size: 0.78rem;
    color: #d0e0a8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dock-artist {
    font-size: 0.58rem;
    color: #50603a;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dock-controls {
    display: flex;
    align-items: center;
    gap: 0.1rem;
}

.dock-btn {
    background: none;
    border: none;
    color: #6a7a58;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    transition: color 0.2s;
    line-height: 1;
    font-family: inherit;
}

.dock-btn:hover {
    color: #b0c890;
}

.dock-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

.dock-btn:disabled:hover {
    color: #6a7a58;
}

.dock-btn.dock-play {
    font-size: 1.2rem;
    color: #88aa68;
    padding: 0.25rem 0.5rem;
}

.dock-btn.dock-play:hover {
    color: #c0e090;
}

.dock-time {
    font-size: 0.6rem;
    color: #50603a;
    white-space: nowrap;
    text-align: right;
}

.dock-sep {
    color: #3a4430;
}

/* Responsive */

@media (max-width: 600px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    header nav a {
        margin-left: 0;
        margin-right: 1.5rem;
    }

    .album-title { font-size: 1.6rem; }
    .album-cover { width: 320px; }
    .hero { padding: 3rem 0 2rem; }
    .page-title { font-size: 1.3rem; }

    .player-dock { max-width: calc(100% - 1.5rem); bottom: 0.75rem; }
    .dock-content { padding: 0.45rem 0.6rem; gap: 0.5rem; }
    .dock-art { width: 32px; height: 32px; min-width: 32px; }
    .dock-title { font-size: 0.72rem; }
    .dock-time { display: none; }
    body.dock-active { padding-bottom: 4.5rem; }
}
