/**
 * Game Pages Styles
 * 
 * Styles for individual game pages including hero sections,
 * tabs, content areas, and interactive elements.
 *
 * @package OutputLag
 * @since 1.0.0
 */

/* ==========================================================================
   Game Page Wrapper
   ========================================================================== */

.game-page-wrapper {
    min-height: 100vh;
    background: var(--dark-bg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.game-hero {
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.4) 0%,
        rgba(10, 10, 10, 0.7) 50%,
        rgba(10, 10, 10, 0.95) 100%
    );
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(3px);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem 0;
}

.hero-inner {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Game Cover */
.game-cover {
    flex-shrink: 0;
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    background: #121212;
}

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

.cover-placeholder {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: #666;
}

.cover-placeholder svg {
    width: 80px;
    height: 80px;
}

/* Game Info */
.game-info {
    flex: 1;
    color: #fff;
}

.game-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.game-meta {
    margin-bottom: 1.5rem;
}

.developer-publisher {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.9;
}

.developer-publisher strong {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.release-info {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.release-info strong {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.release-info .countdown {
    margin-left: 0.5rem;
    color: #FFD700;
    font-weight: 600;
}

/* Platform Badges */
.platform-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.platform-badge svg {
    width: 20px;
    height: 20px;
}

.platform-badge.platform-pc {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.5);
    color: #64B5F6;
}

.platform-badge.platform-playstation-5,
.platform-badge.platform-playstation-4 {
    background: rgba(0, 55, 145, 0.2);
    border-color: rgba(0, 55, 145, 0.5);
    color: #42A5F5;
}

.platform-badge.platform-xbox-series-x,
.platform-badge.platform-xbox-one {
    background: rgba(16, 124, 16, 0.2);
    border-color: rgba(16, 124, 16, 0.5);
    color: #66BB6A;
}

.platform-badge.platform-nintendo-switch {
    background: rgba(230, 0, 18, 0.2);
    border-color: rgba(230, 0, 18, 0.5);
    color: #EF5350;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 150px;
    text-align: center;
}

.stat-label {
    font-size: 0.875rem;
    color: #999;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stat-value .score {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
}

.opencritic-score .score {
    color: #00D4FF;
}

.metacritic-score .score {
    color: #FFD700;
}

.tier {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-mighty { background: #4CAF50; color: #fff; }
.tier-strong { background: #8BC34A; color: #fff; }
.tier-fair { background: #FFC107; color: #000; }
.tier-weak { background: #FF5722; color: #fff; }

.accredited-badge {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #00D4FF;
    font-weight: 500;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.game-nav-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.game-nav {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.game-nav::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 1.5rem 0;
    color: #999;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-tab:hover {
    color: #fff;
}

.nav-tab.active {
    color: var(--accent-color);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.game-content {
    padding: 3rem 0;
}

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

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Game Description */
.game-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #E8E8E8;
    margin-bottom: 3rem;
}

.game-description p {
    margin-bottom: 1.5rem;
}

/* Genres */
.game-genres {
    margin-bottom: 3rem;
}

.game-genres h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.genre-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.genre-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #E8E8E8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background: var(--accent-color);
    color: var(--dark-bg);
}

/* Media Section */
.media-section {
    margin-bottom: 3rem;
}

.media-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

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

.video-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    padding: 1rem;
    font-size: 1rem;
    margin: 0;
}

/* System Requirements */
.requirements-grid {
    display: grid;
    gap: 2rem;
}

.requirements-platform {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
}

.requirements-platform h4 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.requirements-section {
    margin-bottom: 1.5rem;
}

.requirements-section h5 {
    margin-bottom: 0.75rem;
    color: #E8E8E8;
}

.requirements-content {
    color: #B3B3B3;
    line-height: 1.6;
}

/* News Section */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.news-date {
    font-size: 0.875rem;
    color: #999;
}

.news-title {
    margin: 0.5rem 0;
    font-size: 1.125rem;
}

.news-title a {
    color: #E8E8E8;
    text-decoration: none;
}

.news-title a:hover {
    color: var(--accent-color);
}

.news-excerpt {
    color: #B3B3B3;
    font-size: 0.9375rem;
}

/* Discussion Section */
.discussion-section {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
}

.discussion-prompt {
    margin-top: 2rem;
}

.discussion-prompt h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

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

/* Info Card */
.info-card {
    padding: 2rem;
    border-radius: 16px;
}

.card-title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

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

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-size: 0.875rem;
}

.info-value {
    color: #E8E8E8;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-upcoming { background: #2196F3; color: white; }
.status-released { background: #4CAF50; color: white; }
.status-early-access { background: #FF9800; color: white; }

/* External Links */
.external-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.external-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #E8E8E8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.external-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.external-link svg {
    flex-shrink: 0;
}

.steam-link:hover { color: #00adee; }

/* ==========================================================================
   Steam Integration Widget
   ========================================================================== */

.steam-widget {
    margin-bottom: 2rem;
}

.steam-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.steam-logo {
    color: #00adee;
    flex-shrink: 0;
}

.steam-header .card-title {
    margin: 0;
}

/* Player Count Section */
.steam-player-count {
    background: rgba(0, 173, 238, 0.1);
    border: 1px solid rgba(0, 173, 238, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.player-count-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.player-count-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.count-number {
    font-size: 2rem;
    font-weight: 700;
    color: #00adee;
    transition: all 0.3s ease;
}

.count-number.updated {
    animation: count-update 0.5s ease;
}

@keyframes count-update {
    0% {
        transform: scale(1);
        color: #00adee;
    }
    50% {
        transform: scale(1.1);
        color: #66c0f4;
    }
    100% {
        transform: scale(1);
        color: #00adee;
    }
}

.count-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4ade80;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: #4ade80;
    border-radius: 50%;
    opacity: 0;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.85);
        opacity: 1;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* Price Section */
.steam-price-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.discount-badge {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.discount-badge.pulse {
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.original-price {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
}

.free-to-play {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4ade80;
    text-transform: uppercase;
}

/* No price data styling */
.current-price.no-price-data,
.price .no-price {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
}

/* Free price styling in price widget */
.price .free-price {
    color: #4ade80;
    font-weight: 600;
}

/* Achievements Section */
.steam-achievements {
    margin-bottom: 1.5rem;
}

.steam-achievements h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.achievement-stats {
    margin-bottom: 1rem;
}

.achievement-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.achievement-total svg {
    color: #FFD700;
}

.achievement-preview {
    display: flex;
    gap: 0.5rem;
}

.achievement-item {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.achievement-item:hover {
    border-color: #00adee;
    transform: scale(1.1);
}

.achievement-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Steam Actions */
.steam-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-steam {
    background: linear-gradient(135deg, #171a21 0%, #2a475e 100%);
    color: white;
    border: 1px solid #00adee;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-steam:hover {
    background: linear-gradient(135deg, #2a475e 0%, #66c0f4 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 173, 238, 0.3);
}
.opencritic-link:hover { color: #00D4FF; }
.metacritic-link:hover { color: #FFD700; }

/* Media Section */
.media-section {
    margin-bottom: 3rem;
}

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

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

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

.video-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* User Actions */
.user-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Price Card */
.price-card {
    padding: 2rem;
    border-radius: 16px;
}

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

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.store-name {
    font-weight: 500;
}

.price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #4CAF50;
}

.discount {
    padding: 0.125rem 0.5rem;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Related Games */
.related-games-card {
    padding: 2rem;
    border-radius: 16px;
}

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

.related-game-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: #E8E8E8;
    transition: all 0.3s ease;
}

.related-game-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.related-game-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.related-game-title {
    flex: 1;
    font-size: 0.9375rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .game-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .game-cover {
        width: 200px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .developer-publisher {
        justify-content: center;
    }
    
    .platform-badges {
        justify-content: center;
    }
    
    .quick-stats {
        justify-content: center;
    }
    
    .game-nav {
        padding: 0 1rem;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .game-cover {
        width: 150px;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 1rem;
    }
    
    .stat-value .score {
        font-size: 2rem;
    }
}