/* ------------------------------
   GLOBAL
------------------------------ */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #0d1b3d 0%, #0a1533 100%);
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
}

/* PS4 Animated Waves */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: url("assets/ps4-waves.png") repeat-x;
    opacity: 0.18;
    animation: ps4waves 22s linear infinite;
    pointer-events: none;
}

@keyframes ps4waves {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* PS4 Particle Shimmer */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 3px 3px;
    opacity: 0.15;
    pointer-events: none;
    animation: shimmer 12s linear infinite;
}

@keyframes shimmer {
    from { transform: translateY(0); }
    to { transform: translateY(-8%); }
}

/* Smooth UI transitions */
* {
    transition: background 0.2s ease, color 0.2s ease,
                box-shadow 0.25s ease, transform 0.25s ease;
}

/* ------------------------------
   LAYOUT
------------------------------ */

.index-page .sidebar {
    width: 250px;
    background: rgba(0, 10, 40, 0.6);
    padding: 20px;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    backdrop-filter: blur(6px);
    z-index: 10;
}

.index-page .main-content {
    margin-left: 280px;
    padding: 20px;
}

.game-page .main-content {
    padding: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 18px;
    color: #4da3ff;
}

/* ------------------------------
   FILTERS
------------------------------ */

.filter-group {
    margin-bottom: 12px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 4px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
}

.ps4-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 3px 2px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.ps4-filter-item:hover {
    background: rgba(80, 120, 255, 0.15);
}

.ps4-filter-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #4da3ff;
    cursor: pointer;
}

.ps4-checkbox:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px #4da3ff,
                0 0 12px rgba(0, 140, 255, 0.7);
    border-radius: 4px;
    animation: ps4FocusPulse 0.35s ease-out;
}

@keyframes ps4FocusPulse {
    0% { box-shadow: 0 0 0 0px #4da3ff; }
    100% { box-shadow: 0 0 0 3px #4da3ff,
           0 0 12px rgba(0, 140, 255, 0.7); }
}

.ps4-filter-text {
    font-size: 12px;
}

.reset-btn {
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    background: #4da3ff;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.reset-btn:hover {
    background: #6bb6ff;
}

/* ------------------------------
   GAME GRID
------------------------------ */

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-right: 20px;
}

.game-card {
    background: rgba(10, 20, 60, 0.6);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 0 rgba(0, 140, 255, 0);
}

.game-card:hover {
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(0, 140, 255, 0.55);
}

.game-card:focus,
.game-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px #4da3ff,
                0 0 20px rgba(0, 140, 255, 0.7);
    transform: scale(1.08);
}

.game-card img {
    width: 100%;
    border-radius: 6px;
    transition: transform 0.25s ease;
}

.game-card:hover img {
    transform: scale(1.08);
}

.game-card h3 {
    margin-top: 10px;
    font-size: 16px;
}

/* ---------------------------------
   GAME ID + PS4-LIBRARY DLC BADGE
---------------------------------- */

.top-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.game-id-display {
    font-size: 12px;
    font-weight: 600;
    color: #9aa0a6;
    letter-spacing: 0.5px;
}

.dlc-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dlc-icon {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    image-rendering: pixelated;
}

.dlc-count {
    color: var(--id-color);
    font-size: 14px;
    font-weight: 600;
    margin-left: 2px;
}

.dlc-below-title {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding-right: 4px;
}

/* ------------------------------
   DLC GRID (NEW)
------------------------------ */

.dlc-grid {
    display: grid; 
    /* Turns the DLC section into a grid layout */

    grid-template-columns: repeat(3, max-content);
    /* Creates 3 columns.
       Each column is only as wide as the widest DLC card.
       Change "3" to 2 or 4 if you want more/less columns.
       Change "max-content" to "1fr" if you want full-width stretched cards. */

    gap: 18px;
    /* Space between each DLC card.
       Increase for more spacing, decrease for tighter layout. */

    justify-content: space-between;
    /* Spreads the 3 columns evenly across the row.
       Change to "start" if you want them left-aligned. */
}

.dlc-item {
    background: rgba(10, 20, 60, 0.6);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
    width: max-content;
    max-width: 360px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dlc-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 16px rgba(0, 120, 255, 0.45);
}

.dlc-cover {
    width: 110px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.dlc-info {
    text-align: left;
    max-width: 180px;
}

.dlc-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.dlc-info p {
    margin: 3px 0;
    font-size: 14px;
}

/* ============================================================
   NEW — PS4 AUTHENTIC GAME DETAILS PAGE
============================================================ */

/* ------------------------------
   HERO SECTION (UPDATED FOR H2)
------------------------------ */

.hero-header {
    position: relative;
    width: 100%;
    background-size: cover;
    background-position: center;
    padding: 40px 30px;
    border-radius: 12px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
    z-index: 2;
}

.hero-cover {
    width: 260px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: white;
    max-width: 900px;
}

.hero-info h1 {
    margin: 0;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-meta p,
.hero-file-details p {
    margin: 3px 0;
    font-size: 16px;
    line-height: 1.3;
}

.hero-icons {
    display: flex;
    gap: 10px;
}

.hero-icons img {
    width: 48px;
    height: 48px;
}

.hero-features h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-icon {
    width: 28px;
    height: 28px;
}

/* ------------------------------
   HERO FILE DETAILS + FEATURES
------------------------------ */

.hero-file-details {
    margin-top: 14px;
    text-align: right;
    font-size: 14px;
}

.hero-file-details p {
    margin: 2px 0;
}

.hero-features {
    margin-top: 18px;
}

.hero-features h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

/* ------------------------------
   SECTIONS
------------------------------ */

.section {
    background: rgba(10, 20, 60, 0.55);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 16px rgba(0, 80, 255, 0.25);
}

.section h2 {
    margin-top: 0;
}

/* ------------------------------
   BACK COVER
------------------------------ */

.backcover-img {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    display: block;
}

/* ------------------------------
   BACKGROUND GALLERY
------------------------------ */

.background-gallery {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bg-thumb {
    width: 240px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.bg-thumb:hover {
    transform: scale(1.05);
}

/* ------------------------------
   TRAILER
------------------------------ */

.trailer-container {
    width: 100%;
    max-width: 720px;
}

.trailer-container iframe {
    width: 100%;
    height: 405px;
    border-radius: 10px;
}
