/* === DANCING PRESIDENTS STOREFRONT CSS === */
/* 100% Identical to Bite Club Standards */

:root {
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Luckiest Guy', cursive;
    /* Preserved display font */

    /* Brand Colors (Dancing Presidents Yellow) */
    --brand-color-main: #f59e0b;
    /* Amber/Yellow */
    --brand-color-accent: #fbbf24;
    /* Lighter Yellow */
    --brand-color-secondary: #00ff9d;
    /* Green Glow (Bite Club Standard) */
    --brand-text-on-main: #fff;

    /* Base Colors from Standard */
    --color-background: #051014;
    --container-bg: #051014;
    --text-color: #e0f7ff;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-radius: 12px;
    --glow-color: #00ff9d;
    --header-bg: rgba(0, 0, 0, 0.95);
}

/* === GENERAL LAYOUT === */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 10px 40px !important;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #051014 0%, #002b36 50%, #001a23 100%) !important;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.gameweb.io/images/bg_pattern.jpg');
    background-size: 25%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: radial-gradient(circle at top center, rgba(0, 242, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.page-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    box-sizing: border-box;
    padding-top: 0 !important;
}

#content-wrapper {
    width: calc(100% - 20px);
    max-width: 800px;
    margin: 0 10px;
    background: var(--brand-color-main);
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    border: 1px solid var(--brand-color-accent);
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* === STOREFRONT VIEW === */
#storefront-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    background: transparent !important;
}

/* HERO SECTION */
#hero-section {
    display: flex;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid #452a00;
}

#media-carousel {
    flex: 6;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#main-image-wrapper {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
}

#carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
}

/* THUMBNAIL ROW */
.thumbnail-row {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #051014;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    border-top: 1px solid #452a00;
    height: 80px;
}

.thumbnail {
    height: 60px;
    width: auto;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    border: 2px solid transparent;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--brand-color-accent);
}

#game-info-panel {
    flex: 4;
    padding: 25px;
    background: rgba(5, 16, 20, 0.95);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--brand-color-main);
    box-sizing: border-box;
}

#game-info-panel h1 {
    margin: 0 0 10px 0;
    font-family: var(--font-display);
    color: var(--brand-color-main);
    font-size: 1.8rem;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.rating-summary {
    color: var(--brand-color-main);
    margin-bottom: 15px;
    font-weight: bold;
}

.short-description {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #e0f7ff;
}

.action-buttons {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.secondary-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.store-btn {
    width: 100%;
    min-height: 48px;
    padding: 10px 5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-family: var(--font-display) !important;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: all 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.secondary-actions .store-btn {
    flex: 1;
}

.store-btn.primary {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
    border: 1px solid #b45309;
}

.store-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(245, 158, 11, 0.6);
    background: linear-gradient(to bottom, #fbbf24, #f59e0b);
}

.store-btn.secondary {
    background: transparent;
    border: 2px solid var(--brand-color-main);
    color: var(--brand-color-accent);
    opacity: 0.9;
}

.store-btn.secondary:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #fff;
    border-color: var(--brand-color-accent);
}

/* === DETAILS SECTION === */
#details-section {
    padding: 25px;
    background: #051013;
    border-radius: 12px;
    color: var(--text-color);
    border: 1px solid var(--brand-color-main);
    margin-top: 20px;
}

#details-section h2 {
    font-family: var(--font-display);
    color: var(--brand-color-main);
    margin-top: 0;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 25px;
}

/* --- AD PLACHOLDERS --- */
.skyscraper-ad {
    width: 160px;
    height: 600px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    box-sizing: border-box;
    flex-shrink: 0;
    position: sticky;
    top: 125px;
    overflow: hidden;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-ad-banner {
    display: none;
    width: 324px;
    margin: 10px auto 25px;
    border: 1px solid rgba(245, 158, 11, 0.1);
    box-sizing: border-box;
    background: rgba(245, 158, 11, 0.05);
    position: relative;
    z-index: 10;
}

@media (max-width: 1380px) {
    .page-container {
        flex-direction: column;
        align-items: center;
        gap: 20px !important;
    }

    .skyscraper-ad {
        display: none;
    }

    .mobile-ad-banner {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto 10px auto !important;
        width: 324px;
        max-width: 100%;
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    body {
        padding: 80px 10px 20px !important;
    }

    #hero-section {
        flex-direction: column;
        height: auto;
    }

    #media-carousel {
        height: auto;
        overflow: visible;
    }

    #main-image-wrapper {
        width: 100%;
        aspect-ratio: 16/9;
        height: auto;
    }

    #carousel-image {
        border-radius: 12px 12px 0 0;
        height: 100%;
    }

    #media-carousel,
    #game-info-panel {
        flex: auto;
        width: 100%;
    }

    #game-info-panel {
        border-radius: 0;
        border-left: none;
        border-top: 2px solid var(--brand-color-main);
        padding: 15px;
        text-align: center;
    }
}

/* === SITE FOOTER (Standardized) === */
.site-footer {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 40px 0;
    margin-top: 60px;
    margin-bottom: -40px;
    /* Counteract body padding */
    background: rgba(5, 16, 20, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-family: 'Poppins', sans-serif;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0077be, #00ff9d, transparent);
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--brand-color-main);
}

.footer-copyright {
    color: #666;
    font-size: 0.8em;
    margin: 0;
}

/* === MODALS & OVERLAYS === */
.sf-lb-modal,
#how-to-play-overlay,
#modal-overlay,
#leaderboard-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    padding: 20px;
    display: none;
}

.sf-lb-modal.open,
#how-to-play-overlay.show,
#modal-overlay.show,
#leaderboard-container.show {
    display: flex !important;
}

.sf-lb-modal-box,
#how-to-play-content,
.modal-content {
    background: radial-gradient(circle at center, #0a1f26 0%, #051014 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    outline: 3px solid var(--brand-color-main);
    outline-offset: -10px;
    border-radius: 20px;
    width: min(550px, 95vw);
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.2);
    position: relative;
    color: #fff;
}

.instruction-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.instruction-box h3 {
    color: var(--brand-color-main);
    margin-top: 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.pro-tip {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #fff;
    margin: 25px 0;
    text-align: center;
    position: relative;
}

.pro-tip strong {
    color: var(--brand-color-accent);
}

#close-how-to-play-button,
#modal-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #92400e;
}

#close-how-to-play-button:hover,
#modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #92400e;
}

#close-how-to-play-button:active,
#modal-button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #92400e;
}

/* === REVIEWS === */
#reviews-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--brand-color-main);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.2s, background 0.2s;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    color: var(--brand-color-accent);
    font-family: var(--font-display);
}

.review-rating {
    color: var(--brand-color-main);
    font-size: 0.9rem;
}

.review-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e0f7ff;
    font-style: italic;
}

#show-review-form-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

#show-review-form-btn:hover {
    transform: translateY(-2px);
    background: var(--brand-color-accent);
}

/* --- LEADERBOARD LIST --- */
.sf-lb-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sf-lb-list li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    margin-bottom: 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sf-lb-list li:hover {
    background: rgba(245, 158, 11, 0.05);
}

.sf-lb-rank {
    width: 35px;
    font-family: var(--font-display);
    color: var(--brand-color-main);
    font-size: 1.1rem;
}

.sf-lb-name {
    flex-grow: 1;
    color: #fff;
    font-weight: 500;
}

.sf-lb-score {
    font-family: var(--font-display);
    color: var(--brand-color-accent);
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
}

/* Rank Icons for top 3 */
.sf-lb-list li:nth-child(1) .sf-lb-rank::before {
    content: '🥇 ';
}

.sf-lb-list li:nth-child(2) .sf-lb-rank::before {
    content: '🥈 ';
}

.sf-lb-list li:nth-child(3) .sf-lb-rank::before {
    content: '🥉 ';
}

/* Modal Header Refinement */
.sf-lb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 15px;
}

.sf-lb-modal-header h2 {
    margin: 0;
    font-family: var(--font-display);
    color: var(--brand-color-main);
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.sf-lb-close {
    background: transparent;
    border: none;
    color: #666;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.sf-lb-close:hover {
    color: #fff;
}

/* === UTILITY === */
.hidden {
    display: none !important;
}