/**
 * JL567 Gaming Platform - Main Stylesheet
 * Version: 1.0.0
 * Prefix: pg9a-
 * All classes use pg9a prefix for namespace isolation
 */

/* CSS Variables */
:root {
    --pg9a-primary: #FFCC33;
    --pg9a-secondary: #48D1CC;
    --pg9a-bg-dark: #0D1117;
    --pg9a-bg-light: #FFEBCD;
    --pg9a-accent: #AFEEEE;
    --pg9a-text-light: #FFEBCD;
    --pg9a-text-dark: #0D1117;
    --pg9a-gold: #FFCC33;
    --pg9a-success: #48D1CC;
    --pg9a-gradient: linear-gradient(135deg, #FFCC33 0%, #48D1CC 100%);
    --pg9a-shadow: 0 4px 20px rgba(255, 204, 51, 0.3);
    --pg9a-radius: 12px;
    --pg9a-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --vh: 1vh;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pg9a-text-light);
    background: var(--pg9a-bg-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container & Wrapper */
.pg9a-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.6rem;
}

.pg9a-wrapper {
    width: 100%;
    padding: 2rem 0;
}

/* Header Styles */
.pg9a-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.98) 0%, rgba(13, 17, 23, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 204, 51, 0.2);
    transition: var(--pg9a-transition);
}

.pg9a-header-scrolled {
    background: rgba(13, 17, 23, 0.99);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.pg9a-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.6rem;
    max-width: 430px;
    margin: 0 auto;
}

.pg9a-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.pg9a-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.pg9a-logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: var(--pg9a-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pg9a-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg9a-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--pg9a-radius);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pg9a-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.pg9a-register-btn {
    background: var(--pg9a-gradient);
    color: var(--pg9a-text-dark);
    box-shadow: var(--pg9a-shadow);
}

.pg9a-register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 204, 51, 0.4);
}

.pg9a-login-btn {
    background: transparent;
    border: 2px solid var(--pg9a-primary);
    color: var(--pg9a-primary);
}

.pg9a-login-btn:hover {
    background: rgba(255, 204, 51, 0.1);
}

/* Menu Toggle */
.pg9a-menu-toggle {
    background: none;
    border: none;
    color: var(--pg9a-primary);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu */
.pg9a-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #0D1117 0%, #1a1f2e 100%);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 8rem 2rem 2rem;
    overflow-y: auto;
}

.pg9a-menu-open {
    right: 0;
}

.pg9a-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--pg9a-transition);
}

.pg9a-overlay-active {
    opacity: 1;
    visibility: visible;
}

.pg9a-menu-list {
    list-style: none;
}

.pg9a-menu-item {
    margin-bottom: 0.5rem;
}

.pg9a-menu-link {
    display: block;
    padding: 1.2rem 1.6rem;
    color: var(--pg9a-text-light);
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 8px;
    transition: var(--pg9a-transition);
}

.pg9a-menu-link:hover {
    background: rgba(255, 204, 51, 0.1);
    color: var(--pg9a-primary);
}

/* Main Content */
main {
    padding-top: 70px;
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

/* Hero Section */
.pg9a-hero {
    position: relative;
    overflow: hidden;
}

.pg9a-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 240px;
}

.pg9a-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.pg9a-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 20px 20px;
}

.pg9a-slideshow-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
}

.pg9a-slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 235, 205, 0.5);
    cursor: pointer;
    transition: var(--pg9a-transition);
}

.pg9a-dot-active {
    background: var(--pg9a-primary);
    transform: scale(1.2);
}

/* Section Styles */
.pg9a-section {
    padding: 3rem 0;
}

.pg9a-section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--pg9a-primary);
    text-align: center;
    position: relative;
}

.pg9a-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--pg9a-gradient);
    border-radius: 2px;
}

/* Game Grid */
.pg9a-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg9a-game-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(72, 209, 204, 0.1) 0%, rgba(255, 204, 51, 0.1) 100%);
    cursor: pointer;
    transition: var(--pg9a-transition);
    aspect-ratio: 1;
}

.pg9a-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 204, 51, 0.3);
}

.pg9a-game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--pg9a-transition);
}

.pg9a-game-card:hover img {
    transform: scale(1.05);
}

.pg9a-game-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.8rem 0.5rem;
    background: linear-gradient(0deg, rgba(13, 17, 23, 0.95) 0%, transparent 100%);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--pg9a-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Tabs */
.pg9a-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2.5rem 0 1.5rem;
    color: var(--pg9a-secondary);
    padding-left: 1rem;
    border-left: 3px solid var(--pg9a-primary);
}

/* Content Cards */
.pg9a-card {
    background: linear-gradient(135deg, rgba(72, 209, 204, 0.05) 0%, rgba(255, 204, 51, 0.05) 100%);
    border-radius: var(--pg9a-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 204, 51, 0.2);
}

.pg9a-card-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg9a-primary);
    margin-bottom: 1.5rem;
}

.pg9a-card-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--pg9a-text-light);
    margin-bottom: 1rem;
}

/* Promo Button */
.pg9a-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.4rem;
    background: var(--pg9a-gradient);
    color: var(--pg9a-text-dark);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--pg9a-radius);
    text-decoration: none;
    cursor: pointer;
    transition: var(--pg9a-transition);
    box-shadow: var(--pg9a-shadow);
}

.pg9a-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 204, 51, 0.5);
}

/* Footer */
.pg9a-footer {
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.98) 0%, #0D1117 100%);
    padding: 3rem 0 2rem;
    border-top: 1px solid rgba(255, 204, 51, 0.2);
}

.pg9a-footer-content {
    padding: 0 1.6rem;
}

.pg9a-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.pg9a-footer-link {
    color: var(--pg9a-text-light);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--pg9a-transition);
}

.pg9a-footer-link:hover {
    background: rgba(255, 204, 51, 0.1);
    color: var(--pg9a-primary);
}

.pg9a-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.pg9a-partner-logo {
    height: 24px;
    width: auto;
    opacity: 0.6;
    transition: var(--pg9a-transition);
    filter: grayscale(30%);
}

.pg9a-partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.pg9a-copyright {
    text-align: center;
    color: rgba(255, 235, 205, 0.6);
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* Mobile Bottom Navigation */
.pg9a-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(13, 17, 23, 0.99) 0%, #0D1117 100%);
    border-top: 1px solid rgba(255, 204, 51, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.5rem;
}

@media (min-width: 769px) {
    .pg9a-bottom-nav {
        display: none;
    }
}

.pg9a-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.8rem;
    border: none;
    background: none;
    color: var(--pg9a-text-light);
    cursor: pointer;
    transition: var(--pg9a-transition);
    text-decoration: none;
    border-radius: 12px;
}

.pg9a-nav-btn:hover,
.pg9a-nav-btn:focus {
    color: var(--pg9a-primary);
    background: rgba(255, 204, 51, 0.1);
}

.pg9a-nav-btn.active {
    color: var(--pg9a-primary);
}

.pg9a-nav-icon {
    font-size: 24px;
    margin-bottom: 0.3rem;
}

.pg9a-nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* Ripple Effect */
.pg9a-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: pg9a-ripple-anim 0.6s ease-out;
    pointer-events: none;
}

@keyframes pg9a-ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Lists */
.pg9a-list {
    list-style: none;
    padding: 0;
}

.pg9a-list-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 204, 51, 0.1);
    font-size: 1.4rem;
    line-height: 1.6;
}

.pg9a-list-item:last-child {
    border-bottom: none;
}

/* Grid Layout */
.pg9a-grid {
    display: grid;
    gap: 1.5rem;
}

.pg9a-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.pg9a-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Text Utilities */
.pg9a-text-center {
    text-align: center;
}

.pg9a-text-gold {
    color: var(--pg9a-primary);
}

.pg9a-text-cyan {
    color: var(--pg9a-secondary);
}

/* Spacing */
.pg9a-mb-1 { margin-bottom: 1rem; }
.pg9a-mb-2 { margin-bottom: 2rem; }
.pg9a-mb-3 { margin-bottom: 3rem; }

.pg9a-mt-1 { margin-top: 1rem; }
.pg9a-mt-2 { margin-top: 2rem; }
.pg9a-mt-3 { margin-top: 3rem; }

/* Responsive Typography */
@media (max-width: 430px) {
    html {
        font-size: 58%;
    }
}

/* Touch Device Optimization */
.pg9a-touch-device .pg9a-btn,
.pg9a-touch-device .pg9a-game-card,
.pg9a-touch-device .pg9a-nav-btn {
    min-height: 44px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 17, 23, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--pg9a-primary) 0%, var(--pg9a-secondary) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pg9a-primary);
}
