/*
Theme Name: ArcadeX
Theme URI: https://example.com/arcadex
Author: Antigravity
Author URI: https://example.com
Description: High-performance, Friv-style Arcade Gaming WordPress Theme using Tailwind CSS.
Version: 1.0.0
Text Domain: arcadex
*/

/* 
   Tailwind CSS is loaded via CDN for development speed as requested.
   Custom styles can be added here or in assets/css/custom.css 
*/

/* Pop-out hover animation */
.game-card {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0s;
    z-index: 1;
}

.game-card:hover {
    transform: scale(1.15);
    z-index: 50;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

.game-title-overlay {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.game-card:hover .game-title-overlay {
    opacity: 1;
}

/* Horizontal Scroll - Hide Scrollbars */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Theater Mode Enhancements */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Game Container Shadow Glow Effect */
#game-container {
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 8px 10px -6px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(59, 130, 246, 0.15);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Description Collapse */
.max-h-32 {
    max-height: 8rem;
}

/* Star Button Hover Effect */
.star-btn:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px currentColor);
}

.star-btn {
    cursor: pointer;
    transition: all 0.2s;
}

/* Action Button Hover Effects */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.95);
}

/* Backdrop Blur Support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

/* SVG Safety Override for Sidebar */
.sidebar-icon svg {
    width: 100% !important;
    height: 100% !important;
    fill: currentColor;
}

/* Recent Play Feature Styles */
#arcadex-recent-plays {
    display: none;
}

#arcadex-recent-plays.has-items {
    display: block;
}

#arcadex-recent-plays h3,
.recent-play-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.recent-game-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.recent-game-item a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.recent-game-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.recent-game-item a:hover img {
    transform: scale(1.05);
}

/* Homepage Specifics (Horizontal Strip) */
body.home #arcadex-recent-plays.has-items {
    display: flex;
    flex-direction: column;
}

body.home #arcadex-recent-plays.has-items .recent-list-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body.home #arcadex-recent-plays.has-items .recent-list-container::-webkit-scrollbar {
    display: none;
}

body.home .recent-game-item {
    width: 221px;
    height: 124px;
    flex-shrink: 0;
}

/* Single Game Page Specifics (Sidebar Grid) */
body.single-games #arcadex-recent-plays.has-items .recent-list-container,
body.single-game #arcadex-recent-plays.has-items .recent-list-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

body.single-games .recent-game-item,
body.single-game .recent-game-item {
    aspect-ratio: 1 / 1;
}

/* New Game Info Styles (Modern Metadata) */
.game-info-modern {
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    margin: 20px 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
}

.meta-label {
    width: 140px;
    color: #8b8ea5;
    font-weight: 500;
}

.meta-value {
    color: #fff;
    font-weight: 600;
}

.game-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-tag-pill {
    background: #24263b;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

.game-tag-pill:hover {
    background: #4f46e5;
    color: #fff;
    transform: translateY(-2px);
}

/* Sidebar Related Games Styles */
aside .related-games-sidebar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

aside .related-games-sidebar h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
    text-transform: uppercase;
}

/* Force 2-column grid for the sidebar */
aside .related-games-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    width: 100%;
}

/* Individual Game Item in Sidebar */
aside .related-game-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Image Constraint */
aside .related-game-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

aside .related-game-item:hover img {
    transform: scale(1.05);
}

/* Hide titles in sidebar to keep it clean */
aside .related-game-item .game-title {
    display: none;
}

/* Homepage All Games Grid - Custom Card Size 221x124px */
body.home #games-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

body.home #games-grid .game-card {
    width: 221px;
    height: 124px;
    aspect-ratio: auto;
}

/* Responsive adjustments for homepage game cards */
@media (max-width: 640px) {
    body.home #games-grid .game-card {
        width: calc(50% - 0.5rem);
        height: auto;
        aspect-ratio: 16 / 9;
    }
}