/* ============================================================
   Pirate Piggies — Dedicated Game Page Style
   Aesthetics: Premium, Dark mode, Glassmorphism, Gold details
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: #050e1a;
    color: #fff;
    overflow-x: hidden;
}

.pp-game-page {
    position: relative;
    min-height: 100vh;
    height: auto;
}

/* ── Background Wrapper & Layers ── */
.pp-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.pp-bg-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.pp-bg {
    position: absolute;
    inset: -3%; /* Bleed area to prevent edge clipping during mouse parallax */
    width: 106%;
    height: 106%;
    background: url('../img/BG_PIRATEPIGGIES_GAME.png') no-repeat center top;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

.pp-bg-blur {
    position: absolute;
    inset: -3%;
    width: 106%;
    height: 106%;
    background: url('../img/BG_PIRATEPIGGIES_GAME.png') no-repeat center top;
    background-size: cover;
    filter: blur(25px);
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50vh, rgba(0, 0, 0, 1) 100vh, rgba(0, 0, 0, 0) 100vh);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50vh, rgba(0, 0, 0, 1) 100vh, rgba(0, 0, 0, 0) 100vh);
    will-change: opacity, transform;
}

.pp-bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.pp-brand-glow {
    position: fixed;
    width: 60vw;
    height: 60vh;
    top: 20%;
    left: 20%;
    background: radial-gradient(circle, rgba(0, 115, 230, 0.08) 0%, transparent 70%);
    z-index: 2;
    pointer-events: none;
    filter: blur(80px);
}

.pp-bg-leme {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: min(126.5vw, 126.5vh);
    height: min(126.5vw, 126.5vh);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    opacity: 0.75;
    will-change: transform;
}

.pp-leme-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
}



/* ── Header Navigation ── */
.game-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-back-link-img {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 170px;
    width: 100%;
}

.nav-back-link-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.nav-back-link-img:hover img {
    transform: scale(1.04);
    filter: drop-shadow(0 6px 15px rgba(212, 175, 55, 0.3)) brightness(1.05);
}

.nav-back-link-img:active img {
    transform: scale(0.98);
}

.game-nav .brand-logo {
    max-width: 130px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.game-nav .brand-logo:hover {
    opacity: 1;
}

/* ── Main Layout Container ── */
.game-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 7rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1200px;
}

.game-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5rem;
    transform-style: preserve-3d;
}

/* ── Hero Section ── */
.game-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}

.game-hero-logo {
    max-width: 480px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.5));
    animation: ppLogoFloat 6s ease-in-out infinite;
}

@keyframes ppLogoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.game-hero-title {
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FFE89C 30%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-hero-desc {
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 3rem;
}

.game-hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
}

.game-cta-primary {
    background: #D4AF37;
    border: 1px solid #D4AF37;
    color: #050e1a;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.game-cta-primary:hover {
    background: transparent;
    color: #D4AF37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

.game-cta-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(5px);
}

.game-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ── Features Grid ── */
.game-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
    width: 100%;
}

.feature-card {
    background: rgba(5, 14, 26, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card:hover {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.04);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 50px;
    height: 50px;
    color: #D4AF37;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.feature-card p {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

/* ── Specifications ── */
.game-specifications {
    background: rgba(5, 14, 26, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.spec-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #D4AF37;
    text-align: center;
    margin-bottom: 2.5rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1rem;
}

.spec-item:last-child {
    border-right: none;
}

.spec-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

.spec-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

/* ── Responsive design ── */
@media (max-width: 950px) {
    .game-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .spec-item {
        border-right: none;
    }
    
    .spec-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 700px) {
    .game-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        background: rgba(5, 14, 26, 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-back-link-img {
        max-width: 140px;
        margin: 0 auto;
    }
    
    .game-container {
        padding-top: 12rem;
    }
    
    .game-hero-logo {
        max-width: 320px;
    }
    
    .game-hero-title {
        font-size: 1.8rem;
    }
    
    .game-hero-desc {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .game-hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-cta-primary, .game-cta-secondary {
        width: 100%;
        text-align: center;
    }
    
    .game-specifications {
        padding: 2rem 1.5rem;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .spec-item:nth-child(odd) {
        border-right: none;
    }
    
    .spec-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 1rem;
    }
    
    .spec-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* ── Tabletop Simulator Banner ── */
.game-tts-cta {
    background: rgba(5, 14, 26, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-tts-cta:hover {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-tts-title {
    font-size: 1.8rem;
    color: #D4AF37;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-tts-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    max-width: 750px;
}

.game-tts-btn {
    background: #D4AF37;
    border: 1px solid #D4AF37;
    color: #050e1a;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.game-tts-btn:hover {
    background: transparent;
    color: #D4AF37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.35);
    transform: translateY(-2px);
}

/* ── Cannonball Flyby Animation & Impact Effects ── */
.cannonball-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.cannonball {
    position: absolute;
    width: 200px;
    height: auto;
    will-change: transform;
    opacity: 0.95;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.65));
    z-index: 10;
}

.cannon-smoke {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.22) 0%, rgba(100, 100, 100, 0) 75%);
    filter: blur(5px);
    opacity: 0.6;
    will-change: transform, opacity;
    z-index: 3;
}

.cannon-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 180, 80, 0.25) 0%, transparent 80%);
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    will-change: opacity;
}

.shake {
    animation: screenShake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes screenShake {
    10%, 90% { transform: translate3d(-3px, -2px, 0); }
    20%, 80% { transform: translate3d(5px, 4px, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, -6px, 0); }
    40%, 60% { transform: translate3d(8px, 6px, 0); }
}

.cannon-warp {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.015);
    background: transparent;
    box-shadow: none;
    backdrop-filter: blur(3px) contrast(1.02);
    -webkit-backdrop-filter: blur(3px) contrast(1.02);
    will-change: transform, opacity;
    z-index: 2;
}

.cannon-flame {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, #fffaaa 0%, #ff8800 45%, #e62200 85%, transparent 100%);
    mix-blend-mode: screen;
    filter: blur(2px);
    will-change: transform, opacity;
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.6), 0 0 16px rgba(230, 34, 0, 0.4);
    z-index: 4;
}

.game-features-images {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: center;
}
.game-feature-img {
    width: 100%;
    height: auto;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-feature-img:hover {
    transform: translateY(-5px);
}
