/* Game Detail Page Styles */

.game-detail-section {
    padding: 4rem var(--body-padding) 2rem;
    min-height: 100vh;
}

.game-detail-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Comfortable side padding on mobile so content isn't flush to the edges */
@media (max-width: 768px) {
    .game-detail-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 2rem;
    transition: var(--transition);
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.back-link:hover {
    color: var(--secondary-color);
    transform: translateX(-8px);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Game Header */
.game-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
}

.game-header-image {
    position: relative;
    overflow: visible;
    border-radius: var(--border-radius);
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 0; /* allow the grid track to shrink below the image's intrinsic width */
}

.game-header-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: var(--border-radius);
    border: 2px solid rgba(30, 255, 0, 0.4);
    box-shadow: 0 0 50px rgba(30, 255, 0, 0.4), 0 0 30px rgba(0, 217, 255, 0.2);
    transition: var(--transition);
}

.game-header-image img:hover {
    box-shadow: 0 0 70px rgba(30, 255, 0, 0.6), 0 0 40px rgba(0, 217, 255, 0.3);
    transform: scale(1.05);
}

.game-header-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

.game-motto {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem !important;
    font-weight: 500;
}

.game-motto strong {
    color: var(--accent-color);
    font-weight: 700;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

#demoLink[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

#demoLink[disabled]:hover {
    transform: none !important;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3) !important;
}

/* Game Details Grid */
.game-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.detail-item {
    background: linear-gradient(135deg, rgba(15, 17, 29, 0.85), rgba(21, 13, 46, 0.6));
    border: 2px solid rgba(30, 255, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 255, 0, 0.1), rgba(0, 217, 255, 0.08));
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.detail-item:hover::before {
    top: 0;
}

.detail-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 50px rgba(30, 255, 0, 0.5), 0 8px 25px rgba(30, 255, 0, 0.3);
    transform: translateY(-8px);
}

.detail-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.detail-value {
    font-size: 1.3rem;
    color: var(--accent-color);
    font-weight: 900;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* More Games Section */
.more-games {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid rgba(30, 255, 0, 0.2);
}

/* Media Section - Screenshots Carousel */
.media-section {
    margin: 4rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(15, 17, 29, 0.7), rgba(21, 13, 46, 0.5));
    border: 2px solid rgba(30, 255, 0, 0.2);
    border-radius: var(--border-radius);
}

.media-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Video Container */
.video-container {
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* Screenshots Carousel */
.screenshots-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(30, 255, 0, 0.2);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    aspect-ratio: 16 / 9;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.carousel-btn {
    background: rgba(30, 255, 0, 0.2);
    border: 2px solid rgba(30, 255, 0, 0.5);
    color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: rgba(30, 255, 0, 0.4);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(30, 255, 0, 0.5);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: rgba(30, 255, 0, 0.2);
    border-color: rgba(30, 255, 0, 0.5);
    box-shadow: none;
    transform: scale(1);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(30, 255, 0, 0.3);
    border: 1px solid rgba(30, 255, 0, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--accent-color);
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(30, 255, 0, 0.6);
}

.indicator:hover {
    background: rgba(30, 255, 0, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-detail-section {
        padding: 2rem var(--body-padding) 1rem;
    }

    .game-header {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .game-header-content h1 {
        font-size: 1.8rem;
    }

    .game-motto {
        font-size: 1rem;
    }

    .game-details-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .detail-item {
        padding: 1rem;
    }

    .detail-label {
        font-size: 0.8rem;
    }

    .detail-value {
        font-size: 1rem;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
    }

    .media-section {
        margin: 2rem 0;
        padding: 1.5rem;
    }

    .media-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .carousel-controls {
        bottom: 0.75rem;
        gap: 0.75rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-indicators {
        bottom: 0.75rem;
        right: 0.75rem;
        gap: 0.35rem;
    }

    .indicator {
        width: 6px;
        height: 6px;
    }

    .video-container {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .game-detail-section {
        padding: 1.5rem 1rem;
    }

    .back-link {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .game-header {
        gap: 1rem;
    }

    .game-header-content h1 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .game-motto {
        font-size: 0.95rem;
        margin-bottom: 1.5rem !important;
    }

    .game-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .detail-item {
        padding: 0.8rem;
    }

    .detail-label {
        font-size: 0.75rem;
    }

    .detail-value {
        font-size: 0.95rem;
    }

    .more-games {
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .media-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }

    .media-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .carousel-controls {
        bottom: 0.5rem;
        gap: 0.5rem;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .carousel-indicators {
        bottom: 0.5rem;
        right: 0.5rem;
        gap: 0.25rem;
    }

    .indicator {
        width: 5px;
        height: 5px;
    }

    .video-container {
        margin-bottom: 1.5rem;
    }
}
