/**
 * PH4 Gaming Platform CSS
 * Mobile-first responsive design
 * All classes prefixed with pgb4- for namespace isolation
 */

/* CSS Variables */
:root {
    --pgb4-primary: #1B263B;
    --pgb4-secondary: #BDB76B;
    --pgb4-accent: #000080;
    --pgb4-highlight: #F0E68C;
    --pgb4-gold: #FFE135;
    --pgb4-light: #EEEEEE;
    --pgb4-dark: #1B263B;
    --pgb4-text: #EEEEEE;
    --pgb4-text-dark: #1B263B;
    --pgb4-border-radius: 8px;
    --pgb4-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --pgb4-transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--pgb4-primary) 0%, #0d1321 100%);
    color: var(--pgb4-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--pgb4-transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.pgb4-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(27, 38, 59, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 1px solid rgba(189, 183, 107, 0.2);
    transition: var(--pgb4-transition);
}

.pgb4-header.pgb4-scrolled {
    background: rgba(27, 38, 59, 0.98);
    box-shadow: var(--pgb4-shadow);
}

.pgb4-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgb4-logo img {
    height: 40px;
    width: auto;
}

.pgb4-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pgb4-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pgb4-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgb4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--pgb4-border-radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--pgb4-transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pgb4-btn-primary {
    background: linear-gradient(135deg, var(--pgb4-gold) 0%, var(--pgb4-highlight) 100%);
    color: var(--pgb4-text-dark);
}

.pgb4-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 225, 53, 0.4);
}

.pgb4-btn-secondary {
    background: transparent;
    color: var(--pgb4-light);
    border: 2px solid var(--pgb4-secondary);
}

.pgb4-btn-secondary:hover {
    background: var(--pgb4-secondary);
    color: var(--pgb4-text-dark);
}

.pgb4-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--pgb4-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Desktop Navigation */
.pgb4-desktop-nav {
    display: none;
}

@media (min-width: 769px) {
    .pgb4-menu-toggle {
        display: none;
    }

    .pgb4-desktop-nav {
        display: flex;
        align-items: center;
        gap: 25px;
    }

    .pgb4-desktop-nav a {
        color: var(--pgb4-light);
        font-weight: 500;
        padding: 5px 0;
        position: relative;
    }

    .pgb4-desktop-nav a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--pgb4-gold);
        transition: width 0.3s ease;
    }

    .pgb4-desktop-nav a:hover::after {
        width: 100%;
    }
}

/* Mobile Menu */
.pgb4-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--pgb4-primary);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.pgb4-mobile-menu.pgb4-active {
    right: 0;
}

.pgb4-mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--pgb4-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.pgb4-mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pgb4-mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--pgb4-border-radius);
    color: var(--pgb4-light);
    font-weight: 500;
}

.pgb4-mobile-menu-nav a:hover {
    background: rgba(189, 183, 107, 0.2);
}

.pgb4-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--pgb4-transition);
}

.pgb4-menu-overlay.pgb4-active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.pgb4-main {
    padding-top: 60px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .pgb4-main {
        padding-bottom: 80px;
    }
}

/* Banner Slider */
.pgb4-banner {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

@media (min-width: 431px) {
    .pgb4-banner {
        height: 300px;
    }
}

.pgb4-banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.pgb4-banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pgb4-banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.pgb4-banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--pgb4-transition);
}

.pgb4-banner-dot.pgb4-active {
    background: var(--pgb4-gold);
    transform: scale(1.2);
}

/* Hero Section */
.pgb4-hero {
    padding: 40px 15px;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(27, 38, 59, 0.8) 100%);
}

.pgb4-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pgb4-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pgb4-hero-subtitle {
    font-size: 1rem;
    color: var(--pgb4-light);
    margin-bottom: 25px;
    opacity: 0.9;
}

.pgb4-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.pgb4-hero-buttons .pgb4-btn {
    padding: 12px 30px;
    font-size: 1rem;
}

/* Section Styles */
.pgb4-section {
    padding: 30px 15px;
}

.pgb4-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pgb4-gold);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.pgb4-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--pgb4-secondary);
    margin: 10px auto 0;
}

/* Category Tabs */
.pgb4-category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.pgb4-category-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(189, 183, 107, 0.3);
    border-radius: 25px;
    color: var(--pgb4-light);
    font-weight: 500;
    cursor: pointer;
    transition: var(--pgb4-transition);
}

.pgb4-category-tab:hover,
.pgb4-category-tab.pgb4-active {
    background: var(--pgb4-secondary);
    color: var(--pgb4-text-dark);
    border-color: var(--pgb4-secondary);
}

/* Game Grid */
.pgb4-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 431px) {
    .pgb4-game-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
}

@media (min-width: 769px) {
    .pgb4-game-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

.pgb4-game-card {
    position: relative;
    border-radius: var(--pgb4-border-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--pgb4-transition);
}

.pgb4-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pgb4-game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.pgb4-game-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.pgb4-game-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pgb4-light);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pgb4-game-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: var(--pgb4-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pgb4-text-dark);
    font-size: 1.25rem;
    transition: var(--pgb4-transition);
}

.pgb4-game-card:hover .pgb4-game-card-play {
    transform: translate(-50%, -50%) scale(1);
}

/* Category Content */
.pgb4-category-content {
    display: none;
}

.pgb4-category-content.pgb4-active {
    display: block;
}

/* Features Section */
.pgb4-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px 15px;
}

@media (min-width: 431px) {
    .pgb4-features {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pgb4-feature-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--pgb4-border-radius);
    border: 1px solid rgba(189, 183, 107, 0.2);
}

.pgb4-feature-icon {
    font-size: 2rem;
    color: var(--pgb4-gold);
    margin-bottom: 10px;
}

.pgb4-feature-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pgb4-light);
    margin-bottom: 5px;
}

.pgb4-feature-desc {
    font-size: 0.75rem;
    color: var(--pgb4-light);
    opacity: 0.7;
}

/* Partners Section */
.pgb4-partners {
    padding: 30px 15px;
    background: rgba(0, 0, 0, 0.3);
}

.pgb4-partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (min-width: 431px) {
    .pgb4-partners-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

.pgb4-partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--pgb4-border-radius);
}

.pgb4-partner-item img {
    max-height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--pgb4-transition);
}

.pgb4-partner-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* Mobile Bottom Navigation */
.pgb4-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(27, 38, 59, 0.98) 0%, rgba(13, 19, 33, 1) 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid rgba(189, 183, 107, 0.3);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
    .pgb4-bottom-nav {
        display: none;
    }
}

.pgb4-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 50px;
    color: var(--pgb4-light);
    cursor: pointer;
    transition: var(--pgb4-transition);
    position: relative;
}

.pgb4-bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--pgb4-gold);
    transition: width 0.3s ease;
}

.pgb4-bottom-nav-item:hover,
.pgb4-bottom-nav-item.pgb4-active {
    color: var(--pgb4-gold);
}

.pgb4-bottom-nav-item:hover::before,
.pgb4-bottom-nav-item.pgb4-active::before {
    width: 30px;
}

.pgb4-bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.pgb4-bottom-nav-text {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
.pgb4-footer {
    background: rgba(0, 0, 0, 0.5);
    padding: 40px 15px 20px;
    border-top: 1px solid rgba(189, 183, 107, 0.2);
}

@media (max-width: 768px) {
    .pgb4-footer {
        padding-bottom: 80px;
    }
}

.pgb4-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 431px) {
    .pgb4-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .pgb4-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pgb4-footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pgb4-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.pgb4-footer-section ul {
    list-style: none;
}

.pgb4-footer-section ul li {
    margin-bottom: 8px;
}

.pgb4-footer-section ul li a {
    color: var(--pgb4-light);
    opacity: 0.8;
    font-size: 0.875rem;
}

.pgb4-footer-section ul li a:hover {
    opacity: 1;
    color: var(--pgb4-gold);
}

.pgb4-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(189, 183, 107, 0.2);
}

.pgb4-footer-bottom p {
    font-size: 0.75rem;
    color: var(--pgb4-light);
    opacity: 0.7;
    margin-bottom: 10px;
}

/* FAQ Styles */
.pgb4-faq-item {
    margin-bottom: 15px;
    border-radius: var(--pgb4-border-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(189, 183, 107, 0.2);
}

.pgb4-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
    color: var(--pgb4-light);
    transition: var(--pgb4-transition);
}

.pgb4-faq-question:hover {
    background: rgba(189, 183, 107, 0.1);
}

.pgb4-faq-icon {
    font-size: 1.25rem;
    color: var(--pgb4-gold);
    transition: transform 0.3s ease;
}

.pgb4-faq-item.pgb4-active .pgb4-faq-icon {
    transform: rotate(180deg);
}

.pgb4-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.pgb4-faq-item.pgb4-active .pgb4-faq-answer {
    max-height: 500px;
}

.pgb4-faq-answer-content {
    padding: 15px;
    color: var(--pgb4-light);
    opacity: 0.9;
    font-size: 0.875rem;
    line-height: 1.7;
    border-top: 1px solid rgba(189, 183, 107, 0.1);
}

/* Content Page Styles */
.pgb4-content-page {
    padding: 80px 15px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.pgb4-content-page h1 {
    font-size: 1.75rem;
    color: var(--pgb4-gold);
    margin-bottom: 20px;
    text-align: center;
}

.pgb4-content-page h2 {
    font-size: 1.25rem;
    color: var(--pgb4-secondary);
    margin: 25px 0 15px;
}

.pgb4-content-page p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--pgb4-light);
}

.pgb4-content-page ul,
.pgb4-content-page ol {
    margin: 15px 0;
    padding-left: 25px;
}

.pgb4-content-page li {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Toast Notification */
.pgb4-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--pgb4-gold);
    color: var(--pgb4-text-dark);
    padding: 12px 25px;
    border-radius: var(--pgb4-border-radius);
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: var(--pgb4-transition);
}

.pgb4-toast.pgb4-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Utility Classes */
.pgb4-text-center { text-align: center; }
.pgb4-text-gold { color: var(--pgb4-gold); }
.pgb4-text-secondary { color: var(--pgb4-secondary); }
.pgb4-mb-10 { margin-bottom: 10px; }
.pgb4-mb-20 { margin-bottom: 20px; }
.pgb4-mb-30 { margin-bottom: 30px; }
.pgb4-mt-20 { margin-top: 20px; }
.pgb4-hidden { display: none !important; }

/* Animations */
@keyframes pgb4-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pgb4-animate-in {
    animation: pgb4-fadeIn 0.5s ease forwards;
}
