/* ========================================
   GAME PLAYER STYLES
======================================== */

.single-game-content {
    padding: 0;
}

/* Game Player Wrapper */
.game-player-wrapper {
    background: #000;
    background-size: cover;
    background-position: center;
    padding-top: 60px;
    /* Adjusted to match header height */
    position: relative;
    /* min-height removed to restore original size */
}

.game-player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

.game-player-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

#game-player {
    position: relative !important;
    width: 100% !important;
    /* Fixed 600px height as requested */
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    aspect-ratio: auto !important;
    background: #000;
    overflow: hidden;
    margin: 0 auto !important;
    display: block !important;
}

/* Game Canvas */
#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

/* Loading Screen */
.game-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.game-loading.active {
    display: flex;
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.spinner-large {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(189, 0, 255, 0.2);
    border-top-color: var(--neon-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
    box-shadow: var(--glow-purple);
}

.loading-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--neon-purple);
    text-shadow: var(--glow-purple);
}

.progress-bar-wrapper {
    max-width: 400px;
    margin: 0 auto 1rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-purple);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--neon-purple);
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
}

.loading-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Start Game Overlay */
.start-game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.start-game-btn {
    background: #ffffff;
    border: none;
    color: #000000;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: #f0f0f0;
}

.start-game-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

.start-game-btn .play-icon {
    color: #ff0055;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-game-btn svg {
    display: none;
}

/* Game Controls */
.game-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 90;
}

.control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-purple);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: var(--neon-purple);
    box-shadow: var(--glow-purple);
    transform: translateY(-2px);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

/* No Game File Message */
.no-game-file {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border: 2px solid var(--neon-red);
}

.no-game-file p {
    color: var(--neon-red);
    font-size: 1.2rem;
}

/* ========================================
   GAME INFO SECTION
======================================== */

.game-info-section {
    padding: 1rem 0;
}

.game-info-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Main Info Column */
.game-main-info {
    /* Removed border and background to separate card and comments */
    background: transparent;
    border: none;
    padding: 0;
}

.game-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #333;
}

.game-title-main {
    font-size: 2rem;
    color: #ff0055;
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.game-meta-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    color: #ccc;
    font-size: 0.95rem;
}

.meta-item strong {
    color: #fff;
}

.rating-large .stars-large {
    color: #ff0055;
    font-size: 1.2rem;
}

/* Taxonomies */
.game-taxonomies {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tax-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.tax-group strong {
    color: #fff;
    margin-right: 0.5rem;
}

.tax-link {
    background: rgba(255, 0, 85, 0.1);
    color: #ff0055;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #ff0055;
    transition: var(--transition-fast);
}

.tax-link:hover {
    background: #ff0055;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
}

/* Game Description */
.game-description {
    margin-top: 2rem;
}

.game-description h2 {
    font-size: 1.3rem;
    color: #ff0055;
    margin-bottom: 1rem;
}

.game-description p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Sidebar */
.game-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-featured-image {
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #333;
}

.game-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Related Games Widget */
.related-games-widget {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 1.5rem;
}

.related-games-widget h3 {
    font-size: 1rem;
    color: #ff0055;
    margin-bottom: 1.5rem;
}

.related-games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-game-item {
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.related-game-item:hover {
    border-color: #ff0055;
    transform: translateX(5px);
}

.related-game-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
}

.related-game-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.related-game-item h4 {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1024px) {
    .game-info-grid {
        grid-template-columns: 1fr;
    }

    .game-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .game-title-main {
        font-size: 1.5rem;
    }

    .game-meta-main {
        flex-direction: column;
        gap: 0.75rem;
    }

    .start-game-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .start-game-btn svg {
        display: none;
    }

    .game-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .game-main-info {
        padding: 1rem;
    }

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

    .related-game-item img {
        width: 60px;
        height: 45px;
    }
}

/* ========================================
   FULLSCREEN MODE
======================================== */

#game-player.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    min-height: 100vh;
}

#game-player.fullscreen #game-canvas {
    width: 100vw;
    height: 100vh;
}

/* ========================================
   NEW GAME INFO CARD STYLES
======================================== */

.game-info-card {
    display: flex;
    gap: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    /* Changed from purple to dark grey */
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.game-poster .poster-image {
    width: 250px;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
}

.game-details-content {
    flex: 1;
}

.game-title {
    color: #fff;
    /* Changed from purple to white */
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.game-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.badge.version {
    background: #333;
}

.badge.hot {
    background: #e50914;
}

.badge.premium {
    background: #333;
    color: #ccc;
}

.badge.status.ongoing {
    background: #46d369;
    color: #000;
}

.badge.status.completed {
    background: #ff0055;
}

.badge.platform {
    background: #333;
    color: #ccc;
}

.game-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.9rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item.rating .icon {
    color: #ffd700;
}

.game-description-text {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.game-meta-rows {
    margin-bottom: 20px;
}

.meta-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.meta-label {
    color: #808080;
    width: 80px;
    flex-shrink: 0;
}

.creator-link {
    color: #ff0055;
    /* Changed from purple to red */
    font-weight: 600;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.genre-tag {
    color: #ff0055;
    /* Changed from purple to red */
    background: rgba(255, 0, 85, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.genre-tag:hover {
    background: #ff0055;
    color: #fff;
}

.game-actions-row {
    display: flex;
    gap: 10px;
}

.btn-support {
    background: #e50914;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.btn-like {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar Widget */
.sidebar-widget {
    background: #1a1a1a;
    border: 1px solid #333;
    /* Changed from purple to dark grey */
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    color: #fff;
    /* Changed from purple to white */
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.widget-title span {
    color: #e50914;
    font-weight: 900;
}

.related-game-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.related-game-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-game-link {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.related-game-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #666;
    width: 20px;
}

.related-game-info {
    flex: 1;
}

.related-game-title {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #fff;
}

.related-game-meta {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: #999;
}

@media (max-width: 768px) {
    .game-info-card {
        flex-direction: column;
    }

    .game-poster .poster-image {
        width: 100%;
    }
}


/* ========================================
   PLAYER SIDE CONTROLS
======================================== */

.player-side-controls {
    position: absolute;
    top: 50%;
    right: 20px;
    /* Changed from -60px to 20px to stay inside */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.side-control-btn {
    width: 45px;
    height: 45px;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #e50914;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.side-control-btn:hover {
    background: #e50914;
    color: #fff;
    box-shadow: 0 0 15px rgba(238, 48, 48, 0.5);
    transform: scale(1.1);
}

.side-control-btn svg {
    width: 20px;
    height: 20px;
}

/* Download Offline Button States */
#btn-download-offline {
    position: relative;
}

#btn-download-offline.downloading {
    background: rgba(255, 193, 7, 0.3);
    border-color: #ffc107;
    animation: pulse 1.5s infinite;
}

#btn-download-offline.cached {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
}

#btn-download-offline.cached:hover {
    background: #4caf50;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
}

.download-status {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #4caf50;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid #1a1a1a;
}

/* Cache Notification */
.cache-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    z-index: 10000;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.cache-notification.error {
    background: linear-gradient(135deg, #e50914, #c00813);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4);
}

.cache-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Cache Confirmation Modal */
.cache-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cache-modal-overlay.show {
    opacity: 1;
}

.cache-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid rgba(229, 9, 20, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.cache-modal-overlay.show .cache-modal {
    transform: scale(1);
}

.cache-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(229, 9, 20, 0.1));
    border: 2px solid rgba(229, 9, 20, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #e50914;
}

.cache-modal h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cache-modal-desc {
    color: #b3b3b3;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cache-modal-benefits {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #fff;
    font-size: 0.95rem;
}

.benefit-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cache-modal-note {
    color: #808080;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.cache-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cache-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.cache-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #b3b3b3;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cache-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.cache-btn-confirm {
    background: linear-gradient(135deg, #e50914, #c00813);
    color: #fff;
    box-shadow: 0 5px 20px rgba(229, 9, 20, 0.4);
}

.cache-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .cache-modal {
        padding: 1.5rem;
        max-width: 95%;
    }

    .cache-modal h3 {
        font-size: 1.25rem;
    }

    .cache-modal-actions {
        flex-direction: column;
    }

    .cache-btn {
        width: 100%;
    }
}

/* Lights Off Mode */
.lights-off-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lights-off-layer.active {
    display: block;
    opacity: 1;
}

.game-player-wrapper.lights-off-active {
    z-index: 1000;
}

.game-player-wrapper.lights-off-active .game-player-container {
    z-index: 1001;
}

/* Chapter Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.custom-modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    border: 2px solid rgba(255, 0, 85, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 0, 85, 0.15);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 2px solid rgba(255, 0, 85, 0.2);
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
    color: #ff0055;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    background: #e50914;
    transform: rotate(90deg);
}

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

.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-list li {
    margin-bottom: 12px;
}

.chapter-list li:last-child {
    margin-bottom: 0;
}

.chapter-link {
    display: block;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    color: #ccc;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.chapter-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ff0055;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.chapter-link:hover {
    background: rgba(255, 0, 85, 0.1);
    color: #fff;
    border-color: rgba(255, 0, 85, 0.3);
    transform: translateX(5px);
}

.chapter-link:hover::before {
    transform: scaleY(1);
}

@media (max-width: 1500px) {
    .player-side-controls {
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        padding: 10px;
        border-radius: 30px;
    }
}


/* ========================================
   FULLSCREEN MODE OVERRIDES
======================================== */

/* Standard syntax */
.game-player-wrapper:fullscreen {
    background-image: none !important;
    background-color: #000 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:fullscreen .game-player-overlay {
    display: none !important;
}

.game-player-wrapper:fullscreen .game-player-container {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:fullscreen .game-embed-wrapper {
    width: 100% !important;
    height: 100% !important;
}

.game-player-wrapper:fullscreen .game-embed-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-player-wrapper:fullscreen .player-side-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2147483647;
}

/* Webkit syntax (Chrome, Safari, Opera) */
.game-player-wrapper:-webkit-full-screen {
    background-image: none !important;
    background-color: #000 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:-webkit-full-screen .game-player-overlay {
    display: none !important;
}

.game-player-wrapper:-webkit-full-screen .game-player-container {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:-webkit-full-screen .game-embed-wrapper {
    width: 100% !important;
    height: 100% !important;
}

.game-player-wrapper:-webkit-full-screen .game-embed-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:-webkit-full-screen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-player-wrapper:-webkit-full-screen .player-side-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2147483647;
}

/* IE/Edge syntax */
.game-player-wrapper:-ms-fullscreen {
    background-image: none !important;
    background-color: #000 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:-ms-fullscreen .game-player-overlay {
    display: none !important;
}

.game-player-wrapper:-ms-fullscreen .game-player-container {
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-player-wrapper:-ms-fullscreen .player-side-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2147483647;
}


/* ========================================
   SCREENSHOTS CAROUSEL
======================================== */
.game-screenshots-section {
    margin-top: 30px;
    margin-bottom: 30px;
    width: 100%;
}

.screenshots-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ff0055 #1a1a1a;
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background-color: #ff0055;
    border-radius: 4px;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 300px;
    height: 169px;
    /* 16:9 aspect ratio */
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #333;
    transition: all 0.3s ease;
    position: relative;
}

.screenshot-item:hover {
    border-color: #ff0055;
    box-shadow: 0 5px 15px rgba(255, 0, 85, 0.3);
    transform: translateY(-3px);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.screenshot-item:hover img {
    transform: scale(1.1);
}

/* Lightbox Styles (Simple) */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: #ff0055;
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}


/* ========================================
   FULL WIDTH SCREENSHOTS GRID
======================================== */
.game-screenshots-section.full-width-grid {
    margin-top: 40px;
    margin-bottom: 40px;
    width: 100%;
    border-top: 1px solid #333;
    padding-top: 30px;
}

.game-screenshots-section.full-width-grid .screenshots-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    overflow-x: visible;
    /* Disable horizontal scroll for grid view */
    padding-bottom: 0;
}

/* Override previous carousel styles if needed */
.game-screenshots-section.full-width-grid .screenshot-item {
    width: 100%;
    /* Full width of grid cell */
    height: 160px;
    flex: none;
}

@media (min-width: 1200px) {
    .game-screenshots-section.full-width-grid .screenshots-carousel {
        grid-template-columns: repeat(5, 1fr);
        /* 5 items per row on large screens */
    }
}


/* ========================================
   COMMENTS SECTION SEPARATION
======================================== */
#comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #333;
}

.comment-respond {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

.comment-reply-title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.comment-form label {
    color: #ccc;
}

.comment-form-comment textarea {
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
}

.form-submit .submit {
    background: #e50914;
    /* Red button */
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s;
}

.form-submit .submit:hover {
    background: #ff0055;
}

/* ========================================
   MOBILE & VIRTUAL GAMEPAD
======================================== */

.virtual-gamepad {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    pointer-events: none;
    z-index: 95;
    display: none;
    /* Shown via JS detection */
}

.virtual-gamepad.active {
    display: block;
}

/* Joystick Base */
.joystick-wrapper {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(189, 0, 255, 0.3);
    border-radius: 50%;
    pointer-events: auto;
    touch-action: none;
    backdrop-filter: blur(5px);
}

.joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--neon-purple);
    cursor: grab;
}

.joystick-knob:active {
    cursor: grabbing;
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    gap: 20px;
    pointer-events: auto;
}

.action-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.3);
    touch-action: none;
    user-select: none;
}

.action-btn:active {
    background: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
    transform: scale(0.9);
}

.action-btn[data-key="Enter"] {
    width: 70px;
    height: 70px;
    background: rgba(189, 0, 255, 0.2);
    border-color: var(--neon-purple);
}

/* Toggle for Mobile Controls */
#btn-mobile-controls {
    display: none;
    /* Only show if touch support */
}

.has-touch #btn-mobile-controls {
    display: flex;
}

.btn-mobile-controls.active {
    background: var(--neon-pink) !important;
    border-color: #fff !important;
    box-shadow: var(--glow-pink) !important;
}

/* Responsive adjustments for mobile gamepad */
@media (max-width: 768px) {
    .joystick-wrapper {
        bottom: 20px;
        left: 20px;
        width: 100px;
        height: 100px;
    }

    .action-buttons {
        bottom: 20px;
        right: 20px;
        gap: 15px;
    }

    .action-btn {
        width: 50px;
        height: 50px;
    }
}