/**
 * Filbet App - Main Stylesheet
 * Mobile-first responsive design for Philippines market
 * Prefix: pgd3-
 * @version 1.0.0
 */

/* ========================================
   CSS Variables & Root Configuration
======================================== */
:root {
    --pgd3-primary: #ff6b35;
    --pgd3-primary-dark: #e55a2b;
    --pgd3-primary-light: #ff8a5c;
    --pgd3-secondary: #1a1a2e;
    --pgd3-secondary-light: #252542;
    --pgd3-accent: #ffd700;
    --pgd3-accent-light: #ffed4a;
    --pgd3-dark: #0f0f1a;
    --pgd3-dark-light: #16162b;
    --pgd3-text: #ffffff;
    --pgd3-text-muted: #b8b8c8;
    --pgd3-text-dark: #8888a0;
    --pgd3-success: #00d26a;
    --pgd3-warning: #ffb800;
    --pgd3-error: #ff4757;
    --pgd3-gradient-primary: linear-gradient(135deg, var(--pgd3-primary) 0%, var(--pgd3-primary-dark) 100%);
    --pgd3-gradient-hero: linear-gradient(180deg, var(--pgd3-dark) 0%, var(--pgd3-secondary) 50%, var(--pgd3-dark) 100%);
    --pgd3-gradient-card: linear-gradient(145deg, var(--pgd3-secondary-light) 0%, var(--pgd3-dark-light) 100%);
    --pgd3-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --pgd3-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --pgd3-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --pgd3-shadow-glow: 0 0 20px rgba(255, 107, 53, 0.4);
    --pgd3-radius-sm: 8px;
    --pgd3-radius-md: 12px;
    --pgd3-radius-lg: 16px;
    --pgd3-radius-xl: 24px;
    --pgd3-transition: all 0.3s ease;
    --pgd3-header-height: 64px;
    --pgd3-bottom-nav-height: 64px;
}

/* ========================================
   Reset & Base Styles
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--pgd3-dark);
    color: var(--pgd3-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--pgd3-primary);
    text-decoration: none;
    transition: var(--pgd3-transition);
}

a:hover {
    color: var(--pgd3-primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ========================================
   Header Styles
======================================== */
.pgd3-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pgd3-header-height);
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    transition: var(--pgd3-transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pgd3-header.pgd3-scrolled {
    background: rgba(15, 15, 26, 0.98);
    box-shadow: var(--pgd3-shadow-md);
}

.pgd3-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgd3-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--pgd3-gradient-primary);
    border-radius: var(--pgd3-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: white;
}

.pgd3-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--pgd3-text);
    background: var(--pgd3-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pgd3-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pgd3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--pgd3-radius-md);
    transition: var(--pgd3-transition);
    white-space: nowrap;
}

.pgd3-btn-primary {
    background: var(--pgd3-gradient-primary);
    color: white;
    box-shadow: var(--pgd3-shadow-sm);
}

.pgd3-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--pgd3-shadow-glow);
}

.pgd3-btn-outline {
    background: transparent;
    color: var(--pgd3-text);
    border: 2px solid var(--pgd3-primary);
}

.pgd3-btn-outline:hover {
    background: var(--pgd3-primary);
    color: white;
}

.pgd3-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--pgd3-text);
    font-size: 24px;
}

/* ========================================
   Mobile Bottom Navigation
======================================== */
.pgd3-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--pgd3-bottom-nav-height);
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 26, 0.99) 100%);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    border-top: 1px solid rgba(255, 107, 53, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.pgd3-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 56px;
    padding: 6px 8px;
    color: var(--pgd3-text-muted);
    transition: var(--pgd3-transition);
    border-radius: var(--pgd3-radius-md);
    position: relative;
}

.pgd3-nav-item:hover,
.pgd3-nav-item.pgd3-active {
    color: var(--pgd3-primary);
    background: rgba(255, 107, 53, 0.1);
}

.pgd3-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.pgd3-nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.pgd3-nav-item.pgd3-promo {
    color: var(--pgd3-accent);
}

.pgd3-nav-item.pgd3-promo:hover {
    color: var(--pgd3-accent-light);
    background: rgba(255, 215, 0, 0.1);
}

/* ========================================
   Mobile Menu
======================================== */
.pgd3-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--pgd3-transition);
}

.pgd3-menu-overlay.pgd3-active {
    opacity: 1;
    visibility: visible;
}

.pgd3-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--pgd3-secondary);
    z-index: 9999;
    padding: 80px 20px 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: var(--pgd3-shadow-lg);
}

.pgd3-mobile-menu.pgd3-active {
    right: 0;
}

.pgd3-mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pgd3-text);
    font-size: 24px;
    border-radius: 50%;
    transition: var(--pgd3-transition);
}

.pgd3-mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pgd3-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pgd3-mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--pgd3-text);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--pgd3-radius-md);
    transition: var(--pgd3-transition);
}

.pgd3-mobile-nav a:hover {
    background: rgba(255, 107, 53, 0.15);
    color: var(--pgd3-primary);
}

.pgd3-mobile-nav a i {
    width: 24px;
    font-size: 18px;
}

/* ========================================
   Main Content
======================================== */
.pgd3-main {
    padding-top: var(--pgd3-header-height);
    min-height: 100vh;
}

/* ========================================
   Hero Section
======================================== */
.pgd3-hero {
    background: var(--pgd3-gradient-hero);
    padding: 40px 16px 60px;
    position: relative;
    overflow: hidden;
}

.pgd3-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    animation: pgd3-pulse 8s ease-in-out infinite;
}

@keyframes pgd3-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.pgd3-hero-content {
    position: relative;
    z-index: 1;
    max-width: 430px;
    margin: 0 auto;
    text-align: center;
}

.pgd3-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    color: var(--pgd3-accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pgd3-hero-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, var(--pgd3-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pgd3-hero-subtitle {
    font-size: 16px;
    color: var(--pgd3-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.pgd3-hero-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pgd3-hero-cta .pgd3-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
}

/* ========================================
   Games Section
======================================== */
.pgd3-section {
    padding: 40px 16px;
}

.pgd3-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.pgd3-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--pgd3-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgd3-section-title i {
    color: var(--pgd3-primary);
}

.pgd3-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.pgd3-category-tabs::-webkit-scrollbar {
    display: none;
}

.pgd3-category-tab {
    flex-shrink: 0;
    padding: 10px 18px;
    background: var(--pgd3-secondary-light);
    color: var(--pgd3-text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--pgd3-radius-lg);
    transition: var(--pgd3-transition);
    white-space: nowrap;
}

.pgd3-category-tab:hover {
    color: var(--pgd3-text);
    background: var(--pgd3-secondary);
}

.pgd3-category-tab.pgd3-active {
    background: var(--pgd3-gradient-primary);
    color: white;
}

.pgd3-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pgd3-game-card {
    background: var(--pgd3-gradient-card);
    border-radius: var(--pgd3-radius-md);
    overflow: hidden;
    transition: var(--pgd3-transition);
    cursor: pointer;
    position: relative;
}

.pgd3-game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--pgd3-shadow-md);
}

.pgd3-game-card-image {
    aspect-ratio: 1;
    overflow: hidden;
}

.pgd3-game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pgd3-game-card:hover .pgd3-game-card-image img {
    transform: scale(1.1);
}

.pgd3-game-card-name {
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pgd3-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pgd3-game-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 107, 53, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--pgd3-transition);
}

.pgd3-game-card:hover .pgd3-game-card-overlay {
    opacity: 1;
}

.pgd3-game-card-overlay .pgd3-btn {
    padding: 10px 20px;
    font-size: 13px;
}

/* ========================================
   Features Section
======================================== */
.pgd3-features {
    background: var(--pgd3-secondary);
    padding: 40px 16px;
}

.pgd3-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.pgd3-feature-card {
    background: var(--pgd3-gradient-card);
    padding: 24px 16px;
    border-radius: var(--pgd3-radius-lg);
    text-align: center;
    transition: var(--pgd3-transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pgd3-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 53, 0.3);
}

.pgd3-feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--pgd3-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.pgd3-feature-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--pgd3-text);
    margin-bottom: 8px;
}

.pgd3-feature-desc {
    font-size: 13px;
    color: var(--pgd3-text-muted);
    line-height: 1.5;
}

/* ========================================
   Stats Section
======================================== */
.pgd3-stats {
    background: var(--pgd3-gradient-primary);
    padding: 32px 16px;
}

.pgd3-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}

.pgd3-stat-item {
    padding: 12px;
}

.pgd3-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}

.pgd3-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Footer
======================================== */
.pgd3-footer {
    background: var(--pgd3-dark);
    padding: 40px 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pgd3-footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.pgd3-footer-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--pgd3-text);
    margin-bottom: 12px;
}

.pgd3-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pgd3-footer-links a {
    font-size: 14px;
    color: var(--pgd3-text-muted);
    transition: var(--pgd3-transition);
}

.pgd3-footer-links a:hover {
    color: var(--pgd3-primary);
}

.pgd3-footer-partners {
    margin-bottom: 24px;
}

.pgd3-footer-partners h4 {
    font-size: 14px;
    color: var(--pgd3-text-muted);
    margin-bottom: 12px;
}

.pgd3-partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.pgd3-partner-logo {
    height: 24px;
    opacity: 0.6;
    transition: var(--pgd3-transition);
}

.pgd3-partner-logo:hover {
    opacity: 1;
}

.pgd3-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pgd3-footer-copyright {
    font-size: 12px;
    color: var(--pgd3-text-dark);
    margin-bottom: 8px;
}

.pgd3-footer-legal {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
}

.pgd3-footer-legal a {
    color: var(--pgd3-text-muted);
}

/* ========================================
   Utilities
======================================== */
.pgd3-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px;
}

.pgd3-text-center { text-align: center; }
.pgd3-text-primary { color: var(--pgd3-primary); }
.pgd3-text-accent { color: var(--pgd3-accent); }
.pgd3-mb-16 { margin-bottom: 16px; }
.pgd3-mb-24 { margin-bottom: 24px; }
.pgd3-mt-24 { margin-top: 24px; }

/* ========================================
   Responsive Styles
======================================== */
@media (max-width: 768px) {
    .pgd3-main {
        padding-bottom: 80px;
    }
}

@media (min-width: 769px) {
    .pgd3-bottom-nav {
        display: none;
    }

    .pgd3-header-actions .pgd3-btn {
        padding: 10px 24px;
    }

    .pgd3-hero-content {
        max-width: 600px;
    }

    .pgd3-hero-title {
        font-size: 48px;
    }

    .pgd3-games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }

    .pgd3-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pgd3-footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .pgd3-games-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .pgd3-hero-cta {
        flex-direction: row;
        justify-content: center;
    }

    .pgd3-hero-cta .pgd3-btn {
        width: auto;
    }
}
