/**
 * FB7 Gaming Platform - Main Stylesheet
 * Class Prefix: g548-
 * @version 1.0.0
 */

/* ========================================
   CSS Variables & Root
   ======================================== */
:root {
    --g548-primary: #FFD700;
    --g548-primary-dark: #E6B800;
    --g548-secondary: #1A1A2E;
    --g548-accent: #E94560;
    --g548-success: #00D26A;
    --g548-bg-dark: #0F0F1A;
    --g548-bg-card: #1A1A2E;
    --g548-bg-lighter: #252542;
    --g548-text-light: #FFFFFF;
    --g548-text-muted: #A0A0B0;
    --g548-border: #2A2A45;
    --g548-gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --g548-gradient-dark: linear-gradient(180deg, #1A1A2E 0%, #0F0F1A 100%);
    --g548-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --g548-shadow-gold: 0 4px 20px rgba(255, 215, 0, 0.3);
    --g548-radius: 12px;
    --g548-radius-sm: 8px;
    --g548-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', 'Roboto', sans-serif;
    background: var(--g548-bg-dark);
    color: var(--g548-text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--g548-transition);
}

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

ul, ol {
    list-style: none;
}

/* ========================================
   Header
   ======================================== */
.g548-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--g548-border);
    transition: var(--g548-transition);
}

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

.g548-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.g548-logo-img {
    width: 40px;
    height: 40px;
}

.g548-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--g548-gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.g548-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--g548-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: var(--g548-transition);
}

.g548-btn-primary {
    background: var(--g548-gradient-gold);
    color: var(--g548-secondary);
    box-shadow: var(--g548-shadow-gold);
}

.g548-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
}

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

.g548-btn-outline:hover {
    background: var(--g548-primary);
    color: var(--g548-secondary);
}

.g548-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--g548-text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* ========================================
   Desktop Navigation
   ======================================== */
.g548-desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.g548-nav-link {
    color: var(--g548-text-muted);
    font-weight: 500;
    position: relative;
}

.g548-nav-link:hover {
    color: var(--g548-primary);
}

.g548-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--g548-primary);
    transition: var(--g548-transition);
}

.g548-nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Mobile Menu
   ======================================== */
.g548-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    transition: var(--g548-transition);
}

.g548-menu-overlay.g548-active {
    display: block;
    opacity: 1;
}

.g548-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--g548-bg-card);
    z-index: 9999;
    padding: 80px 24px 24px;
    transition: right 0.3s ease;
    overflow-y: auto;
}

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

.g548-mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--g548-text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.g548-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.g548-mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: var(--g548-text-light);
    background: var(--g548-bg-lighter);
    border-radius: var(--g548-radius-sm);
    font-weight: 500;
}

.g548-mobile-nav-link:hover {
    background: var(--g548-primary);
    color: var(--g548-secondary);
}

/* ========================================
   Main Content
   ======================================== */
main {
    padding-top: 70px;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

.g548-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================
   Hero Section
   ======================================== */
.g548-hero {
    background: var(--g548-gradient-dark);
    padding: 60px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.g548-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

.g548-hero-content {
    position: relative;
    z-index: 1;
}

.g548-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--g548-gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.g548-hero-subtitle {
    font-size: 1.1rem;
    color: var(--g548-text-muted);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.g548-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.g548-hero-btn {
    padding: 14px 32px;
    font-size: 1rem;
}

/* ========================================
   Games Section
   ======================================== */
.g548-section {
    padding: 48px 0;
}

.g548-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--g548-text-light);
}

.g548-section-title span {
    color: var(--g548-primary);
}

.g548-filter-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.g548-filter-btn {
    padding: 10px 20px;
    background: var(--g548-bg-card);
    border: 1px solid var(--g548-border);
    border-radius: 50px;
    color: var(--g548-text-muted);
    cursor: pointer;
    transition: var(--g548-transition);
    font-size: 0.9rem;
}

.g548-filter-btn:hover,
.g548-filter-btn.g548-active {
    background: var(--g548-primary);
    color: var(--g548-secondary);
    border-color: var(--g548-primary);
}

.g548-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.g548-game-item {
    background: var(--g548-bg-card);
    border-radius: var(--g548-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--g548-transition);
    border: 1px solid var(--g548-border);
}

.g548-game-item:hover {
    transform: translateY(-4px);
    border-color: var(--g548-primary);
    box-shadow: var(--g548-shadow-gold);
}

.g548-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.g548-game-name {
    padding: 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.g548-fade-in {
    animation: g548_fadeIn 0.3s ease;
}

@keyframes g548_fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Features Section
   ======================================== */
.g548-features {
    background: var(--g548-bg-card);
    padding: 48px 16px;
}

.g548-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.g548-feature-card {
    background: var(--g548-bg-lighter);
    padding: 24px;
    border-radius: var(--g548-radius);
    text-align: center;
    transition: var(--g548-transition);
    border: 1px solid var(--g548-border);
}

.g548-feature-card:hover {
    border-color: var(--g548-primary);
    transform: translateY(-4px);
}

.g548-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.g548-feature-icon {
    font-size: 2.5rem;
    color: var(--g548-primary);
    margin-bottom: 16px;
}

.g548-feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.g548-feature-desc {
    color: var(--g548-text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Promotional Banner
   ======================================== */
.g548-promo-banner {
    background: linear-gradient(135deg, var(--g548-accent) 0%, #FF6B6B 100%);
    padding: 40px 16px;
    text-align: center;
    margin: 32px 0;
}

.g548-promo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.g548-promo-desc {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* ========================================
   Footer
   ======================================== */
.g548-footer {
    background: var(--g548-bg-card);
    padding: 48px 16px 24px;
    border-top: 1px solid var(--g548-border);
}

.g548-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.g548-footer-section h4 {
    color: var(--g548-primary);
    margin-bottom: 16px;
    font-size: 1rem;
}

.g548-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.g548-footer-links a {
    color: var(--g548-text-muted);
    font-size: 0.9rem;
}

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

.g548-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.g548-partner-logo {
    height: 32px;
    opacity: 0.7;
    transition: var(--g548-transition);
}

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

.g548-footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--g548-border);
    color: var(--g548-text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Mobile Bottom Navigation
   ======================================== */
.g548-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 26, 1) 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid var(--g548-border);
    padding-bottom: env(safe-area-inset-bottom);
}

.g548-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    cursor: pointer;
    transition: var(--g548-transition);
    color: var(--g548-text-muted);
    border-radius: 12px;
    padding: 8px;
}

.g548-bottom-nav-item:hover,
.g548-bottom-nav-item.g548-active {
    color: var(--g548-primary);
    background: rgba(255, 215, 0, 0.1);
}

.g548-bottom-nav-item i,
.g548-bottom-nav-item .material-icons {
    font-size: 24px;
    margin-bottom: 2px;
}

.g548-bottom-nav-item ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.g548-bottom-nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* ========================================
   Back to Top
   ======================================== */
.g548-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: var(--g548-primary);
    color: var(--g548-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--g548-transition);
    z-index: 999;
    box-shadow: var(--g548-shadow-gold);
}

.g548-back-to-top.g548-visible {
    opacity: 1;
    visibility: visible;
}

.g548-back-to-top:hover {
    transform: translateY(-4px);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 768px) {
    .g548-desktop-nav {
        display: none;
    }

    .g548-menu-toggle {
        display: block;
    }

    .g548-header-actions {
        gap: 8px;
    }

    .g548-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .g548-hero-title {
        font-size: 1.75rem;
    }

    .g548-hero-subtitle {
        font-size: 1rem;
    }

    .g548-section-title {
        font-size: 1.4rem;
    }

    .g548-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .g548-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

@media (max-width: 430px) {
    .g548-container {
        padding: 0 12px;
    }

    .g548-hero {
        padding: 40px 12px;
    }

    .g548-hero-title {
        font-size: 1.5rem;
    }

    .g548-filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .g548-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
