/* ============================================
   GAMEZONE - Detail Page Styles
   Bright & Modern Light Theme
   ============================================ */

/* ---- Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::selection {
    background: rgba(79, 124, 255, 0.2);
    color: #1e293b;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f4ff;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 124, 255, 0.4);
}

body {
    overflow-x: hidden;
}

/* ---- Detail Hero Background ---- */
.detail-hero-bg {
    background:
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(79, 124, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 70% 10%, rgba(124, 92, 255, 0.04) 0%, transparent 50%);
}

/* ---- Game Embed ---- */
.game-embed-wrapper {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow:
        0 4px 20px rgba(79, 124, 255, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    background: #fff;
}

.game-embed-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.game-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* ---- Game Info Panel ---- */
.game-info-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---- Detail Section ---- */
.detail-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---- Game Card (reused from homepage) ---- */
.game-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow:
        0 12px 32px rgba(79, 124, 255, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

/* Card Thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f4ff;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
}

.game-card:hover .card-thumb img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Card Overlay with Play Button */
.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    transition: background 0.35s ease;
}

.game-card:hover .card-overlay {
    background: rgba(255, 255, 255, 0.35);
}

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(79, 124, 255, 0);
    color: rgba(255, 255, 255, 0);
    transform: scale(0.6);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .play-icon {
    background: #4f7cff;
    color: #ffffff;
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(79, 124, 255, 0.4);
}

/* Card Badge */
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.card-badge.action {
    background: rgba(255, 92, 160, 0.12);
    color: #e0245e;
    border: 1px solid rgba(255, 92, 160, 0.25);
}

.card-badge.racing {
    background: rgba(79, 124, 255, 0.12);
    color: #3b6cf5;
    border: 1px solid rgba(79, 124, 255, 0.25);
}

.card-badge.puzzle {
    background: rgba(124, 92, 255, 0.12);
    color: #6d3cff;
    border: 1px solid rgba(124, 92, 255, 0.25);
}

.card-badge.casual {
    background: rgba(255, 138, 76, 0.12);
    color: #e06520;
    border: 1px solid rgba(255, 138, 76, 0.25);
}

/* Card Info */
.card-info {
    padding: 14px 16px 16px;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .game-embed-container {
        padding-top: 75%; /* 4:3 on mobile */
    }

    .game-info-panel {
        padding: 16px;
    }

    .card-thumb {
        aspect-ratio: 4 / 3;
    }

    .card-info {
        padding: 10px 12px 12px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-desc {
        display: none;
    }

    .play-icon {
        width: 44px;
        height: 44px;
    }

    .detail-section {
        padding: 16px;
    }
}

@media (max-width: 1024px) {
    .game-embed-container {
        padding-top: 62.5%; /* slightly taller on tablets */
    }
}
