/* ============================================================================
   Coliseo - Video Game Collection Browser Stylesheet
   ========================================================================= */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1e40af;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --primary-color-subtle: rgba(37, 99, 235, 0.08);
    --hover-bg: rgba(0, 0, 0, 0.04);
    --text-light: #94a3b8;
    --surface-dark: #1c2333;
    --surface-dark-raised: #252d44;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.container .title-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(2px);
    padding: 0 1rem 0.5rem;
    border-radius: var(--radius-lg);
}

/* Header */
.site-header {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
                url('default-header.webp') center / cover no-repeat;
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.site-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.site-header .subtitle {
    margin: -1rem 0 0;
    padding: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.8;
    cursor: default;
}

/* Header Navigation Button */
.header-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    height: 2.4rem;
}

.header-nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.header-nav-btn--icon {
    padding: 0.4rem;
}

.header-nav-btn--icon img {
    height: 100%;
    width: auto;
    filter: none;
}

.collection-stats {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
}

.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Main Content */
main {
    flex: 1;
    margin-bottom: 3rem;
}

/* Controls Section */
.controls {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: border-radius 0.3s ease, box-shadow 0.3s ease;
}

/* Sticky controls wrapper */
.controls-sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 200;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.controls-sticky-wrap.is-stuck {
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.controls-sticky-wrap.is-stuck .controls {
    border-radius: 0;
    box-shadow: none;
}

/* Site icon that slides in when sticky bar is active */
.sticky-icon-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin-right: 0;
    transition: max-width 0.3s ease, opacity 0.25s ease, margin-right 0.3s ease;
}

.sticky-icon-link img.sticky-icon {
    width: auto;
    height: auto;
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
    display: block;
}

.controls-sticky-wrap.is-stuck .sticky-icon-link {
    max-width: 44px;
    opacity: 1;
    margin-right: 0.25rem;
}

/* Search & Filters Form */
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-box {
    width: 100%;
    position: relative;
}

.search-preview {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.search-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.search-preview-item:hover {
    background: var(--background);
}

.search-preview-thumb {
    width: 36px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-preview-no-cover {
    font-size: 1.2rem;
    opacity: 0.4;
}

.search-preview-info {
    min-width: 0;
    flex: 1;
}

.search-preview-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.search-preview-platform {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-preview-more {
    border-top: 1px solid var(--border);
    justify-content: center;
}

.search-preview-more .search-preview-name {
    color: var(--primary-color);
    font-weight: 500;
    margin-left: 1rem;
}

.search-preview-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-row {
    display: flex;
    gap: 0.5rem;
    align-items: start;
}

.search-row .search-box {
    flex: 1;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.search-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.filter-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-toggle.has-active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.filter-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    text-decoration: none;
}

.filter-clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.filter-active-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
}

.filters-collapsible {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

.filters-collapsible-inner {
    overflow: hidden;
}

.filters-collapsible.open {
    grid-template-rows: 1fr;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.filter-list-box {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.filter-list-header {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.filter-list-header::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-top: -2px;
}

.filter-list-box.collapsed .filter-list-header {
    border-bottom: none;
}

.filter-list-box.collapsed .filter-list-header::after {
    transform: rotate(-45deg);
    margin-top: 2px;
}

.filter-list-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.2s ease;
}

.filter-list-body-inner {
    overflow: hidden;
}

.filter-list-box.collapsed .filter-list-body {
    grid-template-rows: 0fr;
}

.filter-list-search {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.filter-list-search-input {
    width: 100%;
    border: none;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    background: transparent;
}

.filter-list-search-clear {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.2rem;
    padding: 0.15rem 0.35rem;
    line-height: 1;
    border-radius: 50%;
    display: none;
    transition: color 0.15s;
}

.filter-list-search-clear:hover {
    color: var(--danger);
}

.filter-list-scroll {
    max-height: 20vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.filter-list-scroll::-webkit-scrollbar {
    width: 5px;
}

.filter-list-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.filter-list-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.filter-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.85rem;
    color: var(--text-primary);
    user-select: none;
}

.filter-list-item:hover {
    background: var(--background);
}

.filter-list-item input[type="checkbox"] {
    accent-color: var(--primary-color);
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.filter-list-item input:checked + .filter-list-item-text {
    color: var(--primary-color);
    font-weight: 600;
}

.filter-list-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background: #475569;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.results-info-subtle {
    opacity: 0.55;
    font-size: 0.85rem;
}

.per-page-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.per-page-selector label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.per-page-option {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.per-page-option:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.per-page-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.sort-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-selector label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.sort-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* View Toggle Controls */
.view-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-controls label {
    font-weight: 600;
    color: var(--text-secondary);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--background);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: var(--surface);
    color: var(--text-primary);
}

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

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ── Rich List View ─────────────────────────────────────────── */
.games-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.games-grid.list-view .game-card {
    flex-direction: row;
    height: 320px;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    background: var(--surface-dark);
    cursor: default;
    transition: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* No hover effect in list view — card clicks do nothing */
.games-grid.list-view .game-card:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.games-grid.list-view .game-cover {
    width: 220px;
    min-width: 220px;
    height: auto;
    aspect-ratio: unset;
    flex-shrink: 0;
    align-self: stretch;
}

/* Hide grid-only overlays in list view */
.games-grid.list-view .cib-grid-only,
.games-grid.list-view .cover-title,
.games-grid.list-view .game-info {
    display: none;
}

/* Hide list-view CIB column in grid view (kept for back-compat) */
.games-grid:not(.list-view) .cib-list-only {
    display: none;
}

/* ── List content wrapper (column: body + footer) ── */
.game-list-content {
    display: none;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.games-grid.list-view .game-list-content {
    display: flex;
}

.game-list-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── Middle: summary + chips ── */
.game-list-middle {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.game-list-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-list-title a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.game-list-title a:hover {
    color: #ffffff;
}

.game-summary {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.list-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.list-chips--genres {
    max-height: 2.1rem;
    overflow: hidden;
}

.list-chips--meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.list-meta-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.list-meta-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    min-width: 5.5rem;
}

/* ── Media column: video thumbnail + screenshots ── */
.game-list-media {
    width: 380px;
    flex-shrink: 0;
    display: grid;
    gap: 2px;
    overflow: hidden;
    background: var(--surface-dark);
    align-self: stretch;
}

/* With video: video spans full top row, 3 thumbs in bottom row */
.game-list-media[data-has-video="1"] {
    grid-template-rows: 60% 40%;
    grid-template-columns: repeat(3, 1fr);
}

.game-list-media[data-has-video="1"] .list-media-video {
    grid-column: 1 / -1;
}

/* Without video: 2×2 screenshot grid */
.game-list-media[data-has-video="0"] {
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 1fr);
}

.list-media-video {
    position: relative;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

.list-media-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.list-screenshot-slot {
    overflow: hidden;
    background: var(--surface-dark-raised);
    cursor: pointer;
}

/* Shimmer on slots that haven't loaded yet */
.list-screenshot-slot:not(:has(img)) {
    background: linear-gradient(
        90deg,
        var(--surface-dark-raised) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--surface-dark-raised) 100%
    );
    background-size: 200% 100%;
    animation: list-shimmer 1.6s ease-in-out infinite;
}

@keyframes list-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Slots confirmed to have no image — hide shimmer, show neutral dark */
.list-screenshot-slot[data-empty="1"] {
    background: var(--surface-dark);
    animation: none;
    cursor: default;
}

.list-screenshot-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.list-screenshot-slot:hover img {
    transform: scale(1.04);
}

/* ── Footer bar ── */
.game-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.9rem;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.list-footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.list-platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-platform-tag .platform-icon {
    width: 20px;
    height: 20px;
    max-width: none;
    object-fit: contain;
    opacity: 0.8;
    flex-shrink: 0;
    background-color: var(--surface);
    border-radius: 4px;
}

.list-see-more {
    padding: 0;
    background: none;
    border: none;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
}

.list-see-more:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* Hide game-info panel in grid view (info is overlaid on cover instead) */
.games-grid:not(.list-view) .game-info {
    display: none;
}

/* Game Card */
.game-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.game-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.game-cover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65%;
    height: 65%;
    background: url('coliseo-light.png') center / contain no-repeat;
    opacity: 0.2;
}

.game-cover img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: 0.3;
}

.cib-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    z-index: 2;
    display: none;
}

/* Platform badges overlaid on cover (top-left) */
.cover-platforms {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    z-index: 2;
    max-width: 70%;
}

.cover-platform-tag {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Title overlaid on cover (bottom) */
.cover-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.6rem 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    z-index: 2;
}

.cover-title span {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.game-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.game-title a {
    color: var(--text-primary);
}

.game-title a:hover {
    color: var(--primary-color);
}

.game-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.platform-icon {
    height: 0.85em;
    max-width: 1.2em;
    width: auto;
    /* vertical-align: middle; */
    object-fit: contain;
    filter: drop-shadow(0px 0px 1px var(--border));
}

.platform-tag {
    background: var(--background);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.game-rating {
    color: var(--warning);
    font-size: 0.9rem;
    font-weight: 600;
}

.game-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.game-id {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Pagination */
.scroll-loader {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    display: none;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.no-results p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.no-results p.search-error {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
}

.site-footer a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.site-footer a:hover {
    color: var(--primary-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 2rem;
    }

    .stats {
        gap: 1rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .game-title {
        font-size: 0.95rem;
    }

    .controls-sticky-wrap {
        max-height: 100dvh;
        overflow-y: auto;
    }

    .pagination-controls {
        flex-direction: row;
        align-items: center;
    }

    .pagination-controls .results-info {
        width: 100%;
        order: 1;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    /* List view: hide media column on tablets */
    .games-grid.list-view .game-list-media {
        display: none;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .container {
        padding: 0 15px;
    }

    /* List view: narrower cover on mobile, flex-shrink allows squeezing to min */
    .games-grid.list-view .game-cover {
        width: 90px;
        min-width: 70px;
        flex-shrink: 1;
    }

    /* Only show 2 genre chips on mobile */
    .list-chips--genres > :nth-child(n+3) {
        display: none;
    }

    .game-list-middle {
        padding: 0.6rem 0.75rem;
    }

    .game-summary {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* Print Styles */
@media print {
    .controls,
    .pagination,
    .site-footer {
        display: none;
    }

    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .game-card {
        break-inside: avoid;
    }
}

/* Game Detail Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.game-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.game-modal-content::-webkit-scrollbar {
    width: 6px;
}

.game-modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.game-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 3px;
}

.game-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

.game-modal-content::-webkit-scrollbar-button {
    display: none;
}

.modal-close-wrap {
    position: sticky;
    top: 0;
    height: 0;
    overflow: visible;
    z-index: 1001;
    text-align: right;
}

.modal-close {
    position: relative;
    top: 0.75rem;
    right: -0.25rem;
    margin-right: 0.75rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-lg);
}

.modal-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-body {
    padding: 0 2rem 2rem 2rem;
}

.modal-body .modal-hero + .modal-section {
    margin-top: 1.5rem;
}

/* Hero image header */
.modal-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e;
    border-radius: 0;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.modal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(6px);
    z-index: 1;
}

.modal-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.4) 60%, transparent);
}

.modal-hero-cover {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 3/4;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-cover .no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.3;
}

.modal-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.modal-hero-info h2 {
    font-size: 1.75rem;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.modal-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.modal-platform-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-platform-tag img {
    height: 1.1rem;
    max-width: 2rem;
}

.modal-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.4rem 1rem;
}

.modal-detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.modal-detail-spacer {
    flex: 1;
}

.modal-detail-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    text-align: left;
    cursor: default;
}

.modal-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.modal-detail-chip {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    cursor: default;
    /* display: inline-flex; */
    align-items: center;
    gap: 0.25rem;
}

.modal-detail-chip .platform-icon {
    height: 0.9em;
    max-width: 1.4em;
    filter: none;
}

.modal-detail-chip a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.modal-detail-chip a:hover {
    color: #fff;
}

.modal-detail-chip--link {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.modal-detail-chip--link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.modal-detail-chip--more {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    border-style: dashed;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.modal-detail-chip--more:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.modal-detail-chip--more::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.modal-detail-chip--more:hover::after {
    opacity: 1;
}

.modal-detail-chip--rating {
    color: var(--warning);
    font-weight: 700;
}

.modal-detail-chip--cib {
    background: var(--success);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.modal-id-copy {
    cursor: pointer;
    transition: color 0.15s;
}

.modal-id-copy:hover {
    color: rgba(255, 255, 255, 1);
}

.modal-title-row {
    display: flex;
    align-items: end;
    gap: 0.5rem;
}

.modal-admin-edit {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.15s;
}

.modal-admin-edit:hover {
    color: rgba(255, 255, 255, 0.85);
}

.copy-badge {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    animation: copyBadgeFade 1.5s ease forwards;
}

@keyframes copyBadgeFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    70% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

/* Coin toggle button */
.modal-coin-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    z-index: 3;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 0;
    transition: transform 0.2s;
}

.modal-coin-btn:hover {
    transform: scale(1.15);
}

.modal-coin-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

/* Collection info slide wrapper */
.modal-collection-info-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

.modal-collection-info-wrap.open {
    grid-template-rows: 1fr;
    margin-bottom: 2rem;
}

/* Collection info bar */
.modal-collection-info {
    overflow: hidden;
    background: var(--secondary-color);
    border-radius: 0 0 1rem 1rem;
    margin-bottom: 2rem;
}

.modal-collection-info > .modal-detail-row {
    padding: .5rem 2rem 1rem;
}

.modal-collection-info h3 {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-collection-info .modal-detail-chip {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    border-color: transparent;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.modal-section-collapsible .section-toggle {
    padding-bottom: 0.7rem;
    margin-bottom: 0;
    border: 1px solid var(--border);
}

.section-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    user-select: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    transition: all 0.2s;
}

.section-toggle:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.section-toggle-hint {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    margin-left: auto;
}

.modal-section-collapsible.expanded .section-toggle-hint {
    display: none;
}

.section-toggle-icon {
    transition: transform 0.2s;
    flex-shrink: 0;
}

.modal-section-collapsible.expanded .section-toggle {
    border-color: var(--primary-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
}

.modal-section-collapsible.expanded .section-toggle-icon {
    transform: rotate(180deg);
}

.section-collapsible-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
    overflow: hidden;
}

.section-collapsible-body > p {
    overflow: hidden;
}

.modal-section-collapsible.expanded .section-collapsible-body {
    grid-template-rows: 1fr;
}

.modal-section-collapsible.expanded .section-collapsible-body > p {
    border: 1px solid var(--primary-color);
    border-top: none;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    padding: 1rem;
}

.modal-section p {
    line-height: 1.7;
    color: var(--text-primary);
}

/* Notes section */
.notes-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.notes-edit-icon:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.notes-content {
    white-space: pre-wrap;
    line-height: 1.7;
    color: var(--text-primary);
}

.btn-add-notes {
    background: none;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color 0.15s, border-color 0.15s;
}

.btn-add-notes:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#modalNotesEditor textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0.6rem 0.75rem;
    resize: vertical;
    transition: border-color 0.15s;
}

#modalNotesEditor textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.notes-editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.btn-save-notes {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-save-notes:hover { opacity: 0.85; }

.btn-cancel-notes {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.btn-cancel-notes:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.gameplay-video-container {
    width: 100%;
    background: var(--background);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.gameplay-video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    background: #000;
}

.gameplay-video-embed {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    border: none;
    background: #000;
}

.modal-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.modal-screenshots a {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.modal-screenshots a:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.modal-screenshots img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.modal-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-item {
    background: var(--background);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

.video-item p {
    padding: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-error {
    padding: 2rem;
    text-align: center;
    color: var(--danger);
}

/* Modal Responsive Design */
@media (max-width: 768px) {
    .game-modal {
        padding: 1rem;
    }

    .modal-hero-content {
        padding: 1rem;
        gap: 1rem;
    }

    .modal-hero-cover {
        width: 80px;
        max-height: max-content;
    }

    .modal-hero-info h2 {
        font-size: 1.25rem;
    }

    .modal-detail-label {
        font-size: 0.55rem;
    }

    .modal-detail-chip {
        font-size: 0.65rem;
        padding: 0.1rem 0.4rem;
    }

    .modal-body {
        padding: 0 1rem 1rem 1rem;
    }

    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
        top: 0.5rem;
        right: 0;
        margin-right: 0.5rem;
    }

    .modal-screenshots {
        grid-template-columns: 1fr 1fr;
    }

    .modal-videos {
        grid-template-columns: 1fr;
    }

    .modal-coin-btn {
        right: auto;
        left: 0.75rem;
    }
}

/* Image Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.lightbox-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-lg);
}

.lightbox-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-lg);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    z-index: 2001;
    box-shadow: var(--shadow-lg);
}

/* ── Video Lightbox ─────────────────────────────────────────── */
.video-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.video-lightbox-inner iframe,
.video-lightbox-inner .plyr {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Plyr theme ──────────────────────────────────────────── */
.video-lightbox-inner .plyr {
    --plyr-color-main: #2563eb;
    --plyr-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --plyr-video-background: #000;
}

/* Lightbox Responsive Design */
@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-counter {
        bottom: 1rem;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

.external-link {
    height: 0.5rem;
    filter: invert(0.8);
}

.copyright-logo {
    height: 1.6rem;
    vertical-align: middle;
}
