/* CSS Custom Properties */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 0px;
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "jgs7", "Courier New", monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

marquee {
    background-color: lightgray;
}

code {
    font-family: jgs5;
    letter-spacing: 0.2rem;
}

/* Layout Components */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 140px);
}

/* Header Navigation */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.status {
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.main-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm) 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.nav-cart {
    flex-shrink: 0;
}

.site-title a {
    font-size: 2.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 2rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface-color) 0%, #ffffff 100%);
    margin: -20px -20px var(--spacing-xl) -20px;
}

.hero h1 {
    font-size: clamp(1.6rem, 8vw, 4rem);
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.5rem);
    text-align: center;
    margin-right: 33%;
    color: var(--text-light);
}

/* Button System */
.btn {
    display: inline-block;
    padding: 0.8rem var(--spacing-md);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 2px ridge transparent;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: white;
}

/* Album Styles */
.album-header {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    align-items: start;
}

.album-cover {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 2px ridge var(--border-color);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.album-info {
    flex-grow: 1;
}

.album-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.album-artist {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
}

.album-description {
    margin-bottom: var(--spacing-xl);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Tracklist */
.tracklist {
    margin-bottom: var(--spacing-xl);
}

.tracklist h2 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.tracks {
    list-style: none;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 2px ridge var(--border-color);
    overflow: hidden;
}

.track {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.track:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.track:last-child {
    border-bottom: none;
}

.track-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 0;
    width: 100%;
}

.track-number {
    font-weight: bold;
    color: var(--text-light);
    min-width: 2rem;
    flex-shrink: 0;
}

.track-title {
    font-weight: 500;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-duration {
    color: var(--text-light);
    font-size: 0.9rem;
    flex-shrink: 0;
    text-align: right;
}


/* Artist Styles */
.artist {
    //max-width: 800px;
    margin: 0 auto;
}

.artist-header {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.artist-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.artist-info {
    flex: 1;
}

.artist-name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.artist-location {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.artist-genres {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.artist-website {
    margin-bottom: var(--spacing-sm);
}

.artist-website a {
    color: var(--secondary-color);
    text-decoration: none;
}

.artist-website a:hover {
    text-decoration: underline;
}

.artist-social {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.25rem var(--spacing-xs);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: white;
}

.artist-bio {
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
    line-height: 1.7;
}

.artist-content {
    margin-bottom: var(--spacing-lg);
}

.artist-discography {
    margin-bottom: var(--spacing-lg);
}

.artist-discography h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-xs);
}

/* Footer */
.site-footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-light);
    margin-top: 4rem;
}

/* Persistent Footer Player */
.footer-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-top: 2px ridge var(--border-color);
    padding: 0.4rem var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 200;
    font-family: "jgs7", monospace;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    min-height: 56px;
}

.footer-player.active {
    transform: translateY(0);
}

body.player-active {
    padding-bottom: 62px;
}

.fp-cover-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px ridge var(--border-color);
    flex-shrink: 0;
}

.fp-info {
    min-width: 0;
    flex: 1 1 120px;
    max-width: 200px;
    overflow: hidden;
}

.fp-track-title {
    display: block;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-album-title {
    display: block;
    color: var(--text-light);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fp-controls {
    display: flex;
    gap: 0.2rem;
    align-items: center;
    flex-shrink: 0;
}

.fp-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0.15rem 0.3rem;
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.fp-controls button:hover {
    color: var(--secondary-color);
}

.fp-mode-btn {
    color: var(--text-light);
    font-size: 0.8rem;
}

.fp-mode-btn.active {
    color: var(--secondary-color);
}

.fp-progress-area {
    flex: 2 1 100px;
    min-width: 0;
    cursor: pointer;
    overflow: hidden;
}

.fp-progress-bar {
    font-family: "jgs5", monospace;
    font-size: 0.8rem;
    white-space: nowrap;
    letter-spacing: 0;
    display: block;
    overflow: hidden;
    color: var(--text-color);
}

.fp-time {
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 0.78rem;
    white-space: nowrap;
}

.fp-volume {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: var(--text-light);
}

.fp-vol-bar {
    font-family: "jgs5", monospace;
    font-size: 0.8rem;
    letter-spacing: 0;
    cursor: pointer;
    user-select: none;
    color: var(--text-color);
}

.fp-vol-bar:hover {
    color: var(--secondary-color);
}

/* Track playing state */
.track.playing {
    background-color: rgba(52, 152, 219, 0.08);
    border-left: 3px solid var(--secondary-color);
}

.track.playing .track-title {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ASCII player controls in track list */
.track-controls {
    font-family: "jgs5", monospace;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    margin-top: 0.2rem;
}

.ascii-play-btn {
    color: var(--secondary-color);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
}

.ascii-play-btn:hover {
    color: var(--accent-color);
}

.ascii-progress {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    display: inline-block;
    white-space: nowrap;
}

.ascii-progress a {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.ascii-progress a:hover {
    color: var(--secondary-color);
}

.ascii-duration {
    color: var(--text-light);
    margin-left: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.ascii-volume-row {
    padding: var(--spacing-sm) 0 var(--spacing-xs) 0;
    font-family: "jgs5", monospace;
    font-size: 0.9rem;
    color: var(--text-light);
}

.ascii-volume-row a {
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.ascii-volume-row a:hover {
    color: var(--secondary-color);
}

/* Active nav link */
.nav-links a.active {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Component Mappings */
.album-grid,
.artists-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.album-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.artists-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.album-card,
.artist-card,
.album-preview {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 2px ridge var(--border-color);
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.album-card:hover,
.artist-card:hover,
.album-preview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.album-card-cover img,
.album-cover-thumb,
.artist-image-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.album-card-info,
.artist-card-info {
    padding: var(--spacing-md);
}

.album-card-info h3,
.album-card-info .album-title,
.artist-card-info .artist-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.artist-card-info .artist-name {
    font-size: 1.3rem;
}

.album-card-info .artist,
.album-card-info .release-date,
.album-date,
.artist-card-info .artist-location,
.artist-card_info .artist-genres {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
}

.album-link,
.artist-link {
    //display: block;
    color: inherit;
    text-decoration: none;
}

.artist-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.artist-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.view-album-btn {
    background: var(--secondary-color);
    color: white;
    padding: 0.8rem var(--spacing-md);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 2px ridge transparent;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}

.view-album-btn:hover {
    background: #2980b9;
}

/* Special album card overlay for homepage */
.album-card {
    position: relative;
}

.album-card-cover {
    position: relative;
    overflow: hidden;
}

.album-card-cover img {
    transition: transform 0.3s ease;
}

.album-card:hover .album-card-cover img {
    transform: scale(1.05);
}

.album-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.album-card:hover .album-card-overlay {
    opacity: 1;
}

/* Audio list layout */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.album-preview {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.album-preview-cover img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 2px ridge var(--border-color);
}

.album-preview-details {
    flex-grow: 1;
}

.album-preview-details h2 {
    margin-bottom: var(--spacing-xs);
}

.album-preview-details h2 a {
    text-decoration: none;
    color: var(--primary-color);
}

.album-preview-details .artist,
.album-preview-details .release-date,
.album-preview_details .genre,
.album-preview-details .track-count {
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.album-preview-details .description {
    margin-top: var(--spacing-sm);
    line-height: 1.6;
}

.view-all-audio {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.album-shop-link {
    margin-top: var(--spacing-sm);
}

.release-date,
.genre {
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

.album-artists,
.album-artist {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

/* About Page Styles */
.about-page {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-page h1 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: var(--spacing-xs);
}

.about-page h2 {
    color: var(--primary-color);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
}

.about-page h3 {
    color: var(--secondary-color);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.about-page p {
    margin-bottom: var(--spacing-md);
}

.about-page ul,
.about-page ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.about-page li {
    margin-bottom: var(--spacing-xs);
}

.about-page strong {
    color: var(--primary-color);
    font-weight: 600;
}

.about-page code {
    background: var(--surface-color);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.about-page a {
    color: var(--secondary-color);
    text-decoration: none;
}

.about-page a:hover {
    text-decoration: underline;
}

.about-page pre {
    overflow-x: auto;
    max-width: 100%;
}

.about-page hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-xl) 0;
}

/* Radio Page Styles */
.radio-page {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--spacing-xl) 0;
}

h1:not(.site-title):not(.status) {
    font-family: "FlorDeRuina-Semilla", serif;
    font-weight: normal;
    text-shadow:
        4px  4px 0 #aaa,
        8px  8px 0 #ccc,
        12px 12px 0 #e5e5e5;
}

.radio-title {
    font-size: clamp(5rem, 22vw, 14rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xl);
}

.radio-player-box {
    border: 2px ridge var(--border-color);
    background: var(--surface-color);
    padding: var(--spacing-lg);
    font-family: "jgs5", monospace;
}

.radio-player-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    color: var(--text-light);
}

.radio-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.radio-dot--on {
    background: #e74c3c;
    box-shadow: 0 0 6px #e74c3c;
    animation: radio-blink 1.2s ease-in-out infinite;
}

.radio-dot--off {
    background: var(--border-color);
}

@keyframes radio-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.radio-freq {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-light);
}

.radio-now-playing {
    margin-bottom: var(--spacing-md);
    min-height: 3.5rem;
}

.radio-label {
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.radio-track-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-track-artist {
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-controls {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.radio-btn {
    font-family: "jgs5", monospace;
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    padding: 0.5rem var(--spacing-md);
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    display: inline-block;
}

.radio-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.radio-btn--outline {
    background: transparent;
    color: var(--primary-color);
}

.radio-btn--outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.radio-vu {
    font-family: "jgs5", monospace;
    font-size: 0.85rem;
    color: var(--secondary-color);
    letter-spacing: 0.05rem;
    overflow: hidden;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .album-header,
    .artist-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: var(--spacing-md);
    }

    .album-cover,
    .artist-image {
        width: 250px;
        height: 250px;
    }

    .artist-name,
    .album-title {
        font-size: 2rem;
    }

    .artist-social {
        justify-content: center;
    }

    .album-grid,
    .artists-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--spacing-sm);
    }

    .album-preview {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-title {
        order: 1;
    }

    .nav-links {
        order: 2;
        flex-basis: 100%;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .nav-links a {
        font-size: 1.3rem;
    }

    .nav-cart {
        order: 3;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero p {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .main-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }

    .nav-links {
        gap: var(--spacing-xs) var(--spacing-sm);
        justify-content: center;
    }

    .nav-cart {
        align-self: center;
    }

    .album-grid,
    .artists-grid {
        grid-template-columns: 1fr;
    }

    .album-cover,
    .artist-image {
        width: 200px;
        height: 200px;
    }

    .ascii-duration {
        display: none;
    }
}

/* Contribute page — styled boxes */
.cjc-box {
    border: 1px solid #ccc;
    background: #fafafa;
    color: #222;
    margin: 1.2rem 0;
    overflow-x: auto;
    font-family: jgs5, "Courier New", monospace;
}

.cjc-box__label {
    border-bottom: 1px solid #ccc;
    padding: 0.2rem 0.8rem;
    font-size: 0.72rem;
    color: #aaa;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
}

.cjc-box pre {
    margin: 0;
    padding: 1rem 1.2rem;
    font-family: jgs5, "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre;
    overflow-x: auto;
    background: transparent;
    color: #222;
}

.cjc-box__list {
    list-style: none;
    margin: 0;
    padding: 0.8rem 1.2rem;
}

.cjc-box__list li {
    padding: 0.35rem 0;
    border-bottom: 1px dotted #ddd;
    font-size: 0.9rem;
    color: #222;
}

.cjc-box__list li:last-child {
    border-bottom: none;
}

.cjc-box__list code {
    font-weight: bold;
    background: transparent;
    letter-spacing: normal;
}

/* YAML syntax highlighting — minimal */
.sh-key    { font-weight: bold; }
.sh-val    { color: #555; }
.sh-string { color: #222; }
.sh-url    { text-decoration: underline; }
.sh-delim  { color: #bbb; }
.sh-pipe   { color: #888; }
.sh-dash   { color: #888; }
.sh-text   { color: #555; }
