/**
 * Game Page Styles - Infinite Loom
 * Hero-focused layout with sliding backgrounds and store button overlays
 */

/* Font Declarations */
@font-face {
    font-family: 'Uncial Antiqua';
    src: url('/fonts/UncialAntiqua-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cormorant';
    src: url('/fonts/Cormorant-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Cormorant';
    src: url('/fonts/Cormorant-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

/* Game Page Layout */
.game-page {
    margin: 0;
    padding: 0;
}

/* Hero Banner Section (90% screen height) */
.hero-banner {
    height: 90vh;
    min-height: 600px;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #000;
    /* Background color for letterboxing */
}

/* Announcement Banner */
.announcement-banner {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #ff6b35;
}

/* Hero Content Overlay */
.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 20px;
}

/* Store Buttons Container */
.store-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 0px;
    /* Bring buttons up quite a bit more */
}

/* Store Button Base Styling - Icon-focused compact design */
.store-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    width: 100px;
    height: 100px;
    text-align: center;
    gap: 6px;
}

.store-btn i {
    font-size: 56px;
    margin-bottom: 2px;
}

.store-btn .store-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 2px;
    filter: brightness(1.1);
    /* Slight brightness boost for visibility */
}

.store-btn .store-text {
    font-size: 14px;
    line-height: 1.1;
    font-weight: bold;
}

.store-btn .store-date {
    font-size: 14px;
    opacity: 0.9;
    font-weight: bold;
    margin-top: 1px;
}

/* Status-based Button Styling */
.store-btn.status-available {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.store-btn.status-available:hover {
    background: linear-gradient(135deg, #00ff88, #00aa55);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
}

.store-btn.status-preorder {
    background: linear-gradient(135deg, #ffaa00, #ff8800);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.3);
}

.store-btn.status-preorder:hover {
    background: linear-gradient(135deg, #ffaa00, #ee7700);
    box-shadow: 0 6px 20px rgba(255, 170, 0, 0.5);
    transform: translateY(-2px);
}

.store-btn.status-coming-soon {
    background: linear-gradient(135deg, #666, #444);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

.store-btn.status-coming-soon:hover {
    background: linear-gradient(135deg, #777, #555);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.5);
    transform: translateY(-2px);
}

/* In-development titles reuse the muted grey treatment of coming-soon. */
.store-btn.status-in-development {
    background: linear-gradient(135deg, #666, #444);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 102, 102, 0.3);
}

.store-btn.status-in-development:hover {
    background: linear-gradient(135deg, #777, #555);
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.5);
    transform: translateY(-2px);
}

/* Platform-specific Icon Colors */
.store-btn.store-btn-steam i {
    color: #1b2838;
}

.store-btn.store-btn-epic i {
    color: #fff;
}

.store-btn.store-btn-xbox i {
    color: #107c10;
}

/* Store-logo trademark attributions: small subscript notices under the logos on
   the hero banner. Kept muted but legible over the key-art background. */
.store-attributions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 760px;
    margin: 12px auto 0;
    text-align: center;
}

.store-attribution {
    font-size: 9px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

/* Show the attribution under the hero logos by default; suppress the duplicate
   copy under the secondary CTA so the notice appears once on desktop. */
.secondary-cta .store-attributions {
    display: none;
}

/* Game Overview Section */
.game-overview {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Override for grimoire theme to ensure proper centering */
.grimoire-limbo-theme .game-overview {
    text-align: center;
    min-height: auto;
    /* Override the base section min-height: 80vh */
    padding: 40px 20px;
    /* Reduce padding for more compact layout */
}

.overview-content h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.overview-content h4 {
    font-size: 1.8rem;
    margin: 40px 0 20px 0;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    font-size: 1.1rem;
}

/* Media Gallery Section */
.media-gallery {
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.05);
}

.gallery-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.gallery-content h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot-placeholder {
    background: rgba(0, 0, 0, 0.1);
    border: 2px dashed #ccc;
    padding: 60px 20px;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* Media Gallery Items */
.media-item {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.media-item.trailer {
    grid-column: 1 / -1;
    /* Span full width */
    aspect-ratio: 16 / 9;
    /* Maintain 16:9 aspect ratio */
    position: relative;
}

.media-item.trailer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.media-item.screenshot img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-item.screenshot img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Image Overlay/Lightbox */
.image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.overlay-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.overlay-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.overlay-close:hover {
    background: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .overlay-close {
        top: 20px;
        right: 20px;
    }
}

/* Secondary CTA Section */
.secondary-cta {
    padding: 80px 20px 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    min-height: auto;
    /* Override the base section min-height: 80vh */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 800px;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
}

/* Secondary store buttons - clean icons only */
.store-buttons.secondary {
    gap: 30px;
}

.store-buttons.secondary .store-btn {
    background: none;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 10px;
    opacity: 0.8;
}

.store-buttons.secondary .store-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: none;
    box-shadow: none;
}

.store-buttons.secondary .store-btn i {
    font-size: 48px;
    color: #666;
}

.store-buttons.secondary .store-btn .store-logo {
    width: 48px;
    height: 48px;
    filter: brightness(0.6);
    /* Make logos match icon color */
}

.store-buttons.secondary .store-btn:hover i {
    color: #333;
}

.store-buttons.secondary .store-btn:hover .store-logo {
    filter: brightness(0.8);
}

/* Hide text and dates in secondary buttons */
.store-buttons.secondary .store-btn .store-text,
.store-buttons.secondary .store-btn .store-date {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title h1 {
        font-size: 2.5rem;
    }

    .game-title h2 {
        font-size: 1.2rem;
    }

    .store-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Hide hero CTA buttons on mobile to save space */
    .hero-content .store-buttons {
        display: none;
    }

    /* Hero CTA is hidden on mobile, so its attribution goes too; the notices
       instead appear under the secondary CTA where the store logos are shown. */
    .hero-content .store-attributions {
        display: none;
    }

    .secondary-cta .store-attributions {
        display: flex;
    }

    .store-btn {
        min-width: 250px;
    }

    .hero-banner {
        background-attachment: scroll;
        height: 90vh;
        min-height: 500px;
    }

    .overview-content h3,
    .gallery-content h2,
    .cta-content h2 {
        font-size: 2rem;
    }
}

/* Grimoire Limbo Theme (Dark/Etching Style) */
.grimoire-limbo-theme {
    /* Grimoire Color Palette */
    --gl-black: #000000;
    --gl-dark-grey: #404040;
    --gl-med-grey: #808080;
    --gl-white: #ffffff;
    --gl-parchment: #f4e6d1;
    --gl-blood-red: #8b0000;
    --gl-void-purple: #4b0082;
    --gl-necrotic-green: #6b6b47;
    --gl-radiant-gold: #ffd700;
    --gl-arcane-blue: #4169e1;
    --gl-ember-orange: #ff4500;
    --gl-bone-white: #faf0e6;
    --gl-rotten-green: #8b8b00;
    --gl-ethereal-cyan: #00ced1;

    /* Theme Usage */
    --gl-primary: var(--gl-black);
    --gl-secondary: var(--gl-dark-grey);
    --gl-accent: var(--gl-radiant-gold);
    --gl-text: var(--gl-parchment);
    --gl-text-muted: var(--gl-med-grey);
}

/* Grimoire Limbo Typography */
.grimoire-limbo-theme h1,
.grimoire-limbo-theme h2,
.grimoire-limbo-theme h3,
.grimoire-limbo-theme h4 {
    font-family: 'Uncial Antiqua', serif;
    font-weight: normal;
    text-align: center;
    color: var(--gl-rotten-green);
    text-shadow: 2px 2px 4px var(--gl-black);
}

.grimoire-limbo-theme p,
.grimoire-limbo-theme body {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    color: var(--gl-parchment);
    text-align: justify;
}

.grimoire-limbo-theme li {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    color: var(--gl-parchment);
}

.grimoire-limbo-theme .feature-list {
    text-align: left;
}

.grimoire-limbo-theme h1 {
    color: var(--gl-necrotic-green);
    text-shadow: 3px 3px 6px var(--gl-black);
    font-size: 3rem;
}

.grimoire-limbo-theme h2 {
    font-size: 2.5rem;
}

.grimoire-limbo-theme h3 {
    font-size: 2rem;
}

/* Ensure proper centering for all headers */
.grimoire-limbo-theme .overview-content h3 {
    text-align: center !important;
    margin: 0 auto;
    padding: 0;
    display: block;
}

/* Fix secondary CTA text wrapping */
.grimoire-limbo-theme .cta-content h2 {
    font-size: 2.2rem;
    /* Slightly smaller to fit on one line */
}

.grimoire-limbo-theme .game-overview {
    background: var(--gl-primary);
    color: var(--gl-text);
}

.grimoire-limbo-theme .media-gallery {
    background: var(--gl-secondary);
    color: var(--gl-text);
}

.grimoire-limbo-theme .secondary-cta {
    background: linear-gradient(135deg, var(--gl-primary), var(--gl-secondary));
    color: var(--gl-text);
}