:root {
    --bg-body: #050811;
    --bg-card: #0d1322;
    --bg-nav: #070a14;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --input-bg: #0b0f19;
    --accent-rgb: #00f0ff;
}

/* ANIMATIONS RGB */
@keyframes rgbGlow {
    0% { border-color: #ff007f; box-shadow: 0 0 12px rgba(255, 0, 127, 0.3); }
    33% { border-color: #00f0ff; box-shadow: 0 0 12px rgba(0, 240, 255, 0.3); }
    66% { border-color: #7000ff; box-shadow: 0 0 12px rgba(112, 0, 255, 0.3); }
    100% { border-color: #ff007f; box-shadow: 0 0 12px rgba(255, 0, 127, 0.3); }
}

@keyframes textRgb {
    0% { color: #ff007f; }
    33% { color: #00f0ff; }
    66% { color: #7000ff; }
    100% { color: #ff007f; }
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.text-rgb {
    animation: textRgb 6s infinite linear;
    font-weight: 800;
}

.navbar {
    background-color: var(--bg-nav) !important;
    border-bottom: 2px solid #00f0ff;
}

/* RECHERCHE ET OVERLAY D'ARRIÈRE-PLAN */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9998;
    transition: opacity 0.3s ease;
}

.search-box {
    background-color: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: #fff !important;
    border-radius: 50px;
    padding-left: 48px;
}

.search-box:focus {
    border-color: #00f0ff !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5) !important;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid #00f0ff;
    border-radius: 16px;
    max-height: 380px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 15px 35px rgba(0,0,0,0.8);
    display: none;
    margin-top: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background-color: rgba(0, 240, 255, 0.1);
}

.search-result-item img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
}

/* CATEGORIES CHIPS */
.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.btn-category {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-category:hover, .btn-category.active {
    background: linear-gradient(45deg, #ff007f, #00f0ff);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* CARROUSEL JEUX POPULAIRES PLAY STORE */
.popular-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px 15px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.popular-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.popular-card:active {
    transform: scale(0.95);
}

.popular-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* CARTES DE JEUX D'ACCUEIL */
.game-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    animation: rgbGlow 10s infinite linear;
    transition: transform 0.2s ease;
}

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

.game-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.btn-download {
    background: linear-gradient(45deg, #00f0ff, #7000ff);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    font-weight: 700;
}

.btn-download:hover {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* BULLES DISCUSSION */
.chat-bubble {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.reply-bubble {
    background-color: var(--input-bg);
    border-left: 3px solid #00f0ff;
    border-radius: 12px;
    padding: 10px 14px;
    margin-left: 20px;
    margin-top: 8px;
}

.ad-container {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

footer {
    background-color: var(--bg-nav);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}
/* CORRECTION LISIBILITÉ TEXTES */
p, .text-muted, #detailGameDescription, .description-text {
    color: #e2e8f0 !important; /* Blanc lumineux pour remplacer le gris sombre */
    font-size: 0.95rem;
    line-height: 1.6;
}

small, .small {
    color: #cbd5e1 !important;
}

/* Ajustement spécifique pour les conteneurs de détails */
#detailGameDescription {
    color: #f1f5f9 !important;
    font-weight: 400;
}
/* ANTI-DÉCALAGE HORIZONTAL (BLOCAGE DE LA PAGE) */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* CONTENEUR DE PUBLICITÉ PROPRE ET CENTRÉ */
.ad-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 12px 0 !important;
}

/* RENDU FLUIDE DES IFRAMES */
.ad-container iframe {
    max-width: 100% !important;
    border: none !important;
}

/* AJUSTEMENT SPÉCIFIQUE MOBILE */
@media (max-width: 768px) {
    .ad-container iframe {
        transform: scale(0.95); /* Taille agrandie sur mobile */
        transform-origin: center center;
    }
}
/* ==========================================
   PAGINATION DYNAMIQUE GAMING iOS 
   ========================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 25px 0 15px 0;
    padding: 0 10px;
}

/* Capsule défilante en verre dépoli (Glassmorphism) */
.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* Masquer la barre de défilement par défaut */
.pagination-wrapper::-webkit-scrollbar {
    display: none;
}
.pagination-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Style des boutons/liens de page */
.pagination-wrapper .page-link,
.pagination-wrapper .page-item a,
.pagination-wrapper button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8 !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease-in-out;
    flex-shrink: 0;
}

/* État survol / clic */
.pagination-wrapper .page-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

/* Page active (Style Néon Cyan/Violet) */
.pagination-wrapper .page-item.active .page-link,
.pagination-wrapper .page-link.active,
.pagination-wrapper button.active {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #0f172a !important;
    font-weight: 800;
    border: none;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.6);
    transform: scale(1.1);
}
