/* ========================================
   BOARD GAME PAGE STYLES
   ======================================== */

/* ===== GAME PAGE CONTAINER ===== */
.game-page-container {
    /* No top gap — the banner expands upward to just under the sticky header */
    padding-top: 0;
    /* Mobile: horizontal drags are the swipe-nav gesture (handled in JS). Tell
       the browser this container only pans vertically so the page never shifts
       sideways or rubber-bands during a swipe. pinch-zoom kept for a11y. */
    touch-action: pan-y pinch-zoom;
    overscroll-behavior-x: none;
}

/* ===== BANNER SECTION ===== */
.game-banner {
    width: 100%;
    margin-bottom: var(--spacing-xl);
    touch-action: pan-y; /* Allow vertical scroll, prevent horizontal */
    user-select: none; /* Prevent text selection during swipe */
}

.banner-image {
    width: 100%;
    /* Banners are 2200x400. The box matches that ratio, so between ~1100px and
       2200px wide the whole image shows with no crop. Below 1100px (phones) the
       aspect would make it too flat, so min-height:200 holds the height and
       `cover` (centered) crops the sides instead. Caps at 400px on wide screens. */
    aspect-ratio: 2200 / 400;
    min-height: 200px;
    max-height: 400px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

.banner-placeholder {
    width: 100%;
    max-width: 2200px;
    height: 100%;
    position: relative;
    z-index: 1;
    background: var(--gradient-primary);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    font-weight: bold;
    color: white;
}

/* Wide screens (>2200px, e.g. 4K): the crisp banner stays capped at
   2200px and the empty sides are filled with a mirrored, blurred copy of
   the image that fades ~100px into the original. Only active when a real
   banner image is present. */
@media (min-width: 2201px) {
    .banner-image.has-banner-image::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        background-image: var(--banner-img);
        background-size: cover;
        background-position: center;
        transform: scaleX(-1) scale(1.15);
        filter: blur(20px);
    }

    .banner-image.has-banner-image .banner-placeholder {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 200px, #000 calc(100% - 200px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 200px, #000 calc(100% - 200px), transparent 100%);
    }
}


/* Banner Navigation Arrows — anchored to the (centered, capped) banner box so
   the arrows + side labels follow the banner as the window width scales,
   instead of sticking to the viewport edges. */
.banner-nav-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 2200px;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.banner-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: all;
    z-index: 9999;
}

.banner-nav-arrow:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Chevron: draw a crisp, perfectly centered arrow instead of the ‹ › glyph
   (the glyphs render off-centre). Hide the glyph text, draw with borders. */
.banner-nav-arrow > span:first-child {
    display: block;
    width: 24px;
    height: 24px;
    font-size: 0;                 /* hide the ‹ › character */
    position: relative;
}

.banner-nav-arrow > span:first-child::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-style: solid;
    border-color: currentColor;
    border-width: 4px 4px 0 0;     /* top + right edges = a chevron */
}

.banner-nav-arrow.right > span:first-child::before {
    transform: translate(-70%, -50%) rotate(45deg);   /* points › */
}

.banner-nav-arrow.left > span:first-child::before {
    transform: translate(-30%, -50%) rotate(-135deg); /* points ‹ */
}

.banner-nav-arrow.left {
    left: 50px;
}

.banner-nav-arrow.right {
    right: 50px;
}

.banner-nav-text {
    position: absolute;
    top: 50%;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9998;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
}

/* Labels sit ~50px on the INNER side of each arrow (toward the centre). The
   translate(±50%) centres the rotated label on its anchor point, so the gap to
   the arrow is the same regardless of how long the game name is. Mirrored L/R. */
.banner-nav-arrow.left .banner-nav-text {
    left: calc(100% + 55px);
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
}

.banner-nav-arrow.right .banner-nav-text {
    right: calc(100% + 55px);
    transform: translate(50%, -50%) rotate(-90deg);
    transform-origin: center center;
}

/* Mobile responsive banner navigation */
@media (max-width: 768px) {
    /* Hide nav arrows on mobile (swipe works). !important beats the inline
       display:flex that game-loader.js sets when navigation data exists. */
    .banner-nav-arrow {
        display: none !important;
    }

    .banner-nav-text {
        display: none !important;
    }
}

/* ===== GAME HEADER SECTION ===== */
.game-header-section {
    margin-bottom: var(--spacing-lg);
}

.game-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.game-title-area {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.game-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--color-gold);
    margin: 0;
    line-height: 1.2;
    text-shadow: 2px 2px 8px var(--color-shadow);
}

/* Small Donate / Rate buttons beside the title */
.title-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.title-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.8rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: white;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.title-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.title-action-btn.donate {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
}

.title-action-btn.rate-button {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    color: #1F2937;
}

.game-info-cards {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.info-card {
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm) var(--spacing-md);
    min-width: 100px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.info-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.info-value {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text-primary);
}

/* ===== LAUNCH SECTION ===== */
.launch-section {
    margin-bottom: var(--spacing-lg);
}

.launch-button {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
}

.launch-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(139, 92, 246, 0.55);
}

.launch-button .icon {
    font-size: 1.3em;
}

/* Primary action row: main CTA (Buy/Play) + Print & Play side by side */
.launch-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: stretch;
    flex-wrap: wrap;
}

.launch-row > .launch-button {
    flex: 1 1 300px;
    width: auto;
}

/* Print & Play button: title line + smaller note line inside the button */
.pnp-button {
    flex-direction: column;
    gap: 2px;
    text-align: center;
    background: var(--gradient-accent);
    padding: var(--spacing-sm) var(--spacing-lg);
}

/* Any two-line button, not just Print & Play: a title with a smaller note
   under it. The loader adds .btn-stacked when a button carries a note. */
.launch-button.btn-stacked {
    flex-direction: column;
    gap: 2px;
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-lg);
}

.pnp-button .btn-title,
.launch-button .btn-title {
    font-weight: 700;
}

.pnp-button .btn-subtitle,
.launch-button .btn-subtitle {
    font-size: var(--font-size-sm);
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.3;
}

/* Keep button text readable on hover (override the global pink link hover) */
.launch-button:hover,
.pnp-button:hover,
.video-button:hover,
.play-button:hover {
    color: #000;
}

/* ===== GAME DESCRIPTION ===== */
.game-description {
    margin-bottom: var(--spacing-lg);
    min-height: fit-content;
    /* Override main.css card truncation styles */
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
}

.game-description h2 {
    font-size: var(--font-size-3xl);
    color: var(--color-gold);
    margin-bottom: var(--spacing-md);
}

.game-description p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-secondary);
    max-width: 900px;
}

/* About + How to Play two-column layout */
.about-howto {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* No second column here any more. The videos are placed inside the About
   block's figure column instead, so videos and illustrations share one lane
   down the right-hand side and every heading rule spans the same width as on
   a page with no videos. */

/* In the grid the column already constrains width, so let text fill it */
.about-main p {
    max-width: none;
}

/* Body copy is split into one <p> per paragraph, so they need separating —
   without this, two paragraphs read as one run-on block. Descendant, not child:
   the details block and each additional section wrap their paragraphs in a div.
   Against .game-details p's own margin-bottom these collapse to a single 1rem. */
.about-main p + p {
    margin-top: 1rem;
}

.about-main .game-details,
.about-main .about-section {
    margin-top: var(--spacing-xl);
}

/* A block that has an illustration splits into text 3/4 and image 1/4, with
   the image against the right edge. Blocks with no image are not wrapped in
   .section-cols at all, so their text keeps the full width. */
.section-cols {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.about-figure {
    margin: 0;
}

.about-figure img {
    display: block;
    /* Height cap, not width: a portrait card at a quarter of the page is still
       taller than the few lines of text it illustrates, and the section would
       inherit all that empty space beside the text. */
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
    margin-left: auto;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
}

/* A stacked pair reads as before/after, so the images need to be told apart */
.about-figure.is-stacked img + img {
    margin-top: var(--spacing-sm);
}

.about-figure figcaption {
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    line-height: 1.4;
}

/* "Where to go next" links. Each row is a link plus the reason to follow it, so
   this reads as an invitation rather than a navigation strip. */
.related-links {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 3px solid var(--color-primary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
}

.related-links h3 {
    font-size: var(--font-size-lg);
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
}

.related-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.related-links li + li {
    margin-top: var(--spacing-sm);
}

.related-links a {
    font-weight: 600;
}

.related-note {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    line-height: 1.5;
}

/* One column: a quarter of a phone screen is not a usable image, so the
   illustration drops below the text of its own section. */
@media (max-width: 700px) {
    .section-cols {
        grid-template-columns: 1fr;
    }

    .about-figure img {
        max-height: none;
        width: 100%;
        margin-left: 0;
    }
}

.how-to-play h3 {
    font-size: var(--font-size-xl);
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
}

.how-to-play .video-button,
.how-to-play .video-card {
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

/* Sitting in the figure column, the heading should read like a caption rather
   than a section title. */
.section-cols .how-to-play h3 {
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-xs);
}

@media (max-width: 700px) {
    .section-cols .how-to-play {
        margin-top: var(--spacing-md);
    }
}

/* Game details — always visible.
   Replaced the "Show Details ▼" toggle 2026-08-07: on a game's own page every
   fact about it should already be on screen, and the three games that have a
   details block carry 254–547 characters, which is not worth a click. The
   toggle's button, arrow and max-height collapse animation went with it. */
.game-details {
    margin-top: 2rem;
}

.game-details h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.game-details h4 {
    color: var(--color-text-primary);
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
}

.game-details p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.game-details ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.game-details li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.game-details strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* ===== ACTION BUTTONS SECTION ===== */
.action-buttons-section {
    margin-bottom: var(--spacing-lg);
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.button-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.action-button {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    color: white;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--color-shadow);
}

/* Small note under the print-and-play download buttons */
.download-note {
    margin-top: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    text-align: center;
}

.action-button.download-free {
    background: var(--gradient-accent);
}

.action-button.download-premium {
    background: var(--gradient-gold);
}

.action-button.donate {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
}

.action-button.rate-button {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    color: #1F2937;
}

/* ===== VIDEOS SECTION ===== */
.videos-section {
    margin-bottom: var(--spacing-lg);
}

.videos-section h2 {
    font-size: var(--font-size-3xl);
    color: var(--color-gold);
    margin-bottom: var(--spacing-md);
}

.video-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.video-button {
    background: linear-gradient(135deg, #A78BFA 0%, #F472B6 100%);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.video-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.4);
}

/* ===== SCREENSHOTS SECTION ===== */
.screenshots-section {
    margin-bottom: var(--spacing-2xl);
}

.screenshots-section h2 {
    font-size: var(--font-size-3xl);
    color: var(--color-gold);
    margin-bottom: var(--spacing-md);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.screenshot-item {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 2px solid var(--color-border);
}

.screenshot-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px var(--color-shadow);
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    color: var(--color-text-tertiary);
    position: relative;
}

/* Placeholder Image (styled like main page) */
.screenshot-item .placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
}

/* Add subtle pattern overlay */
.screenshot-item .placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.05) 10px,
            rgba(255, 255, 255, 0.05) 20px
        );
    pointer-events: none;
}

.screenshot-item:hover .placeholder-image {
    filter: brightness(1.1);
}

/* Video Item with Play Icon */
.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: all var(--transition-base);
    position: relative;
    z-index: 2;
}

.video-item:hover .play-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    border-color: white;
}

/* ===== MEDIA MODAL (Images & Videos) ===== */
.media-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-modal.active {
    display: block;
    opacity: 1;
}

/* Backdrop with blur effect */
.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Modal Container */
.modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    z-index: 1;
}

/* Modal Content Area */
.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Styles */
.modal-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

/* Video Container */
.modal-video-container {
    position: relative;
    max-width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* Video Element */
.modal-video {
    max-width: 100%;
    max-height: calc(85vh - 60px);
    width: auto;
    height: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: #000;
    outline: none;
}

/* Custom Video Controls */
.video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.95);
    padding: 12px 20px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    font-size: 18px;
    line-height: 1;
}

.control-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.time-display {
    color: white;
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

/* Progress Bar Container */
.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    min-width: 100px;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    left: 0%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

/* Volume Controls */
.volume-slider-container {
    display: flex;
    align-items: center;
}

.volume-slider {
    width: 80px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Modal Close Button */
.modal-close {
    position: fixed;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 36px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg);
}

/* Modal Navigation Arrows */
.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 36px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
    line-height: 1;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.modal-nav-left {
    left: 40px;
}

.modal-nav-right {
    right: 40px;
}

/* Modal Counter */
.modal-counter {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: var(--font-size-lg);
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* Optional caption shown above the counter (can be a long single line).
   The counter sits at bottom:40 and is about 50px tall, so 104 leaves a small
   gap between the two instead of a stretch of empty image. */
.modal-caption {
    position: fixed;
    bottom: 104px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 92vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: var(--font-size-base);
    text-align: center;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* ===== COMMENTS SECTION =====
   Reduced to a single notice 2026-08-07. The whole comment system — form,
   list, replies, votes, sort, share button, rating badge — was deleted with its
   Blobs backend; it was all mockup content and commenting now needs a real
   account. Everything that styled those pieces went too: .comments-header-row,
   .comments-layout, .comment-form, .comments-list*, .comment-item, .comment-*,
   .response-*, .reply-*, .inline-reply-form, .collapse-toggle, .share-*,
   .rating-badge and their dark-mode twins. Style the new section against the
   signed-in markup; see docs/COMMENTS-PLAN.md. */
.comments-section {
    margin-bottom: var(--spacing-2xl);
}

.comments-section .container {
    max-width: 1400px;
    margin: 0 auto;
}

.comments-closed {
    background: #1e1e1e;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.comments-closed h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-gold);
    margin: 0 0 var(--spacing-sm);
}

.comments-closed p {
    margin: 0 0 var(--spacing-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    max-width: 70ch;
}

.comments-closed p:last-child {
    margin-bottom: 0;
}


/* Premium Button Price */
.action-button .price {
    font-size: var(--font-size-base);
    font-weight: 700;
    opacity: 0.9;
}

/* ===== DARK MODE STYLES ===== */


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .game-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-info-cards {
        width: 100%;
        justify-content: flex-start;
    }

    .button-grid,
    .button-grid-2x2,
    .video-buttons-grid {
        grid-template-columns: 1fr;
    }

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

}

@media (max-width: 768px) {
    .modal-container {
        padding: 20px;
    }

    .modal-nav,
    .modal-close {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .modal-nav-left {
        left: 20px;
    }

    .modal-nav-right {
        right: 20px;
    }

    .modal-close {
        top: 20px;
        right: 20px;
    }

    .modal-counter {
        bottom: 20px;
        font-size: var(--font-size-md);
        padding: 8px 16px;
    }

    /* Counter is lower and shorter here, so the caption comes down with it. */
    .modal-caption {
        bottom: 72px;
    }

    .video-controls {
        padding: 8px 12px;
        gap: 8px;
    }

    .control-btn {
        font-size: 16px;
        padding: 6px;
    }

    .time-display {
        font-size: 12px;
    }

    .volume-slider {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        padding: 10px;
    }

    .modal-nav,
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .modal-nav-left {
        left: 10px;
    }

    .modal-nav-right {
        right: 10px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
    }

    .video-controls {
        flex-wrap: wrap;
        padding: 8px;
        gap: 6px;
    }

    .progress-container {
        order: -1;
        width: 100%;
        flex-basis: 100%;
    }

    .volume-slider-container {
        display: none;
    }
}

/* ===== BACK TO THE ACTION ROW =====
   A block far down the page can offer a way back up to the play and download
   buttons, so a reader who just decided to try the game does not have to hunt
   for them. The arrow is set in the pseudo-element so the label stays text. */
.back-to-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.back-to-actions::before {
    content: "\2191";
    font-size: 1.1em;
    line-height: 1;
}

.back-to-actions:hover,
.back-to-actions:focus-visible {
    background: var(--color-primary);
    color: #fff;
}

/* ===== VIDEO POSTER CARDS =====
   A video link with a `thumb` renders as its own poster instead of a plain
   button. The image is a local copy of the YouTube thumbnail, because the CSP
   allows images from this site only. */
.video-card {
    display: block;
    position: relative;
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    line-height: 0;
}

.video-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-base);
}

/* Play badge, drawn rather than shipped as an asset. */
.video-card::after {
    content: "";
    position: absolute;
    top: calc(50% - 1.4rem);
    left: calc(50% - 1rem);
    border-style: solid;
    border-width: 1.1rem 0 1.1rem 1.8rem;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    transition: transform var(--transition-fast);
}

.video-card:hover img {
    transform: scale(1.03);
}

.video-card:hover::after {
    transform: scale(1.12);
}

.video-card-title {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.55);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    line-height: 1.35;
}

.video-card:hover .video-card-title {
    color: var(--color-primary);
}

/* ===== VIDEO ROW =====
   Videos given a section of their own (videoButtons.placement = 'section')
   sit just above the gallery and lay their posters out side by side, at the
   same width as a gallery tile. */
.video-row {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.how-to-play.is-row .video-card,
.how-to-play.is-row .video-button {
    width: auto;
    margin-bottom: 0;
}

/* Same track sizing as .screenshots-grid, so a poster lines up with a gallery
   tile directly below it. */
.how-to-play.is-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.how-to-play.is-row h3 {
    grid-column: 1 / -1;
    font-size: var(--font-size-3xl);
    color: var(--color-gold);
    margin-bottom: 0;
}
