/* MusicBee Clouseau Website Styles */
/* Based on TrueShuffle/MBXRemote pattern */

/* Cross-links (right side of nav) */
.cross-links {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.cross-links a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(233, 69, 96, 0.3);
}

.cross-links a:hover {
    background: rgba(233, 69, 96, 0.3);
    text-decoration: none;
}

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #0f3460;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent: #e94560;
    --accent-hover: #ff6b6b;
    --link: #4dabf7;
    --border: #2a2a4a;
    --code-bg: #0d1117;
    --success: #4ade80;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--bg-secondary);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

#logo img {
    display: block;
}

/* Navigation */
.mbx-nav {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mbx-nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.mbx-nav li a {
    display: block;
    padding: 12px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.mbx-nav li a:hover {
    color: var(--text-primary);
    background: rgba(233, 69, 96, 0.1);
}

.mbx-nav li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Polaroid hero card */
.polaroid {
    width: 280px;
    margin: 30px auto;
    background-color: white;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    padding: 15px 15px 10px 15px;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.polaroid:hover {
    transform: rotate(0deg);
}

.polaroid-images {
    width: 100%;
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.polaroid-images img {
    height: 180px;
    width: 180px;
    object-fit: contain;
}

.polaroid .container {
    text-align: center;
    padding: 10px 20px;
    background-color: white;
    color: #333;
}

.polaroid .container p {
    display: inline-block;
    margin: 4px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
}

/* Content */
.content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Headings */
h2 {
    font-size: 1.5rem;
    margin: 40px 0 20px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    color: var(--text-primary);
}

h4 {
    font-size: 1rem;
    margin: 15px 0 10px 0;
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 60px;
}

.hero-section .page-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-buttons {
    margin-top: 30px;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 25px;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.feature-card h3 {
    color: var(--accent);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* How It Works / Steps */
.how-it-works {
    margin: 60px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.step h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Log Preview */
.log-preview {
    margin: 40px 0;
}

.log-display {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: pre;
    overflow-x: auto;
}

/* Download Section */
.download-section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    border: 1px solid var(--border);
    text-align: center;
}

.download-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    margin: 10px 5px;
    transition: background 0.2s;
}

.download-button:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.version-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Install Steps */
.install-steps {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.install-step {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border);
}

.install-step h4 {
    color: var(--accent);
    margin: 0 0 10px;
}

.install-step p {
    margin: 0 0 10px;
    color: var(--text-secondary);
}

.install-step ul {
    margin: 10px 0 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(233, 69, 96, 0.05);
}

/* Code */
code {
    background: var(--code-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.9em;
    color: var(--link);
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
}

/* Lists */
ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin: 8px 0;
    color: var(--text-secondary);
}

/* Notes */
.note {
    background: rgba(77, 171, 247, 0.1);
    border-left: 4px solid var(--link);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.note strong {
    color: var(--link);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-radius: 12px;
    margin: 60px 0 40px;
    border: 1px solid var(--border);
}

.cta-section h2 {
    border: none;
    margin-top: 0;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer p {
    margin: 8px 0;
}

footer a {
    color: var(--link);
}

/* Manifesto */
.manifesto {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid var(--border);
    font-size: 1.05rem;
    line-height: 1.8;
}

.manifesto p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.manifesto p:last-child {
    margin-bottom: 0;
}

/* Event Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.category-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.category-badge h4 {
    color: var(--accent);
    margin: 0 0 5px;
    font-size: 0.95rem;
}

.category-badge p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85rem;
}

/* Screenshot Gallery - CSS-only click to expand */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.screenshot-item {
    text-align: center;
    position: relative;
}

.screenshot-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.screenshot-item .thumb-label {
    cursor: pointer;
    display: inline-block;
}

.screenshot-item .thumb {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.screenshot-item .thumb-label:hover .thumb {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.screenshot-item .caption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85em;
}

/* Fullscreen overlay - hidden by default */
.screenshot-item .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 10000;
    cursor: pointer;
}

.screenshot-item .overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.screenshot-item .overlay .close-hint {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 1.2em;
    opacity: 0.7;
}

/* When checkbox is checked, show overlay with animation */
.screenshot-item input[type="checkbox"]:checked + .thumb-label + .caption + .overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.screenshot-item input[type="checkbox"]:checked + .thumb-label + .caption + .overlay img {
    transform: scale(1);
}

.gallery-section {
    margin: 40px 0;
}

.gallery-section h3 {
    color: var(--accent);
    margin: 30px 0 15px 0;
    font-size: 1.1rem;
}

.gallery-hint {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        font-size: 0.95rem;
    }

    .mbx-nav ul {
        justify-content: center;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px;
    }
}

/* Track Metadata Tooltip - Wikipedia-style link with Now Playing popup */
.track-ref {
    position: relative;
    display: inline;
    color: var(--link);
    text-decoration: underline;
    text-decoration-style: dotted;
    cursor: help;
}

.track-ref:hover {
    color: var(--accent-hover);
}

.track-ref .track-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #0d1117 100%);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px;
    min-width: 280px;
    white-space: nowrap;
    font-size: 0.8rem;
    font-family: 'Consolas', 'Monaco', monospace;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
}

.track-ref:hover .track-tooltip {
    visibility: visible;
    opacity: 1;
}

.track-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--accent);
}

.track-tooltip .tt-title {
    display: block;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
}

.track-tooltip .tt-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 1px 0;
}

.track-tooltip .tt-label {
    color: #888;
}

.track-tooltip .tt-value {
    color: #10b981;
}

.track-tooltip:has(.tt-desc) {
    white-space: normal;
    min-width: 280px;
    max-width: 340px;
}

.track-tooltip .tt-desc {
    display: block;
    color: #e0e0e0;
    line-height: 1.5;
}
