/**
 * JLJL55 Layout Stylesheet
 * All classes use pgeb- prefix for namespace isolation
 * Mobile-first responsive design with max-width: 430px
 */

/* CSS Custom Properties */
:root {
    --pgeb-primary: #8A2BE2;
    --pgeb-secondary: #FF7F50;
    --pgeb-accent: #FF69B4;
    --pgeb-dark: #2E4057;
    --pgeb-gray: #495057;
    --pgeb-bg: #1a1a2e;
    --pgeb-bg-light: #16213e;
    --pgeb-text: #e4e4e7;
    --pgeb-text-light: #a1a1aa;
    --pgeb-border: #3f3f46;
    --pgeb-gradient: linear-gradient(135deg, #8A2BE2 0%, #FF7F50 100%);
    --pgeb-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --pgeb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
}

/* Reset and Base Styles */
* {
    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, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pgeb-text);
    background-color: var(--pgeb-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.pgeb-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.pgeb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--pgeb-dark) 0%, rgba(46, 64, 87, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pgeb-border);
    padding: 0.8rem 1rem;
    box-shadow: var(--pgeb-shadow);
}

.pgeb-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.pgeb-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--pgeb-text);
    font-size: 1.8rem;
    font-weight: 700;
}

.pgeb-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.pgeb-header-buttons {
    display: flex;
    gap: 0.8rem;
}

.pgeb-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 44px;
}

.pgeb-btn-primary {
    background: var(--pgeb-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.4);
}

.pgeb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.6);
}

.pgeb-btn-secondary {
    background: transparent;
    color: var(--pgeb-secondary);
    border: 2px solid var(--pgeb-secondary);
}

.pgeb-btn-secondary:hover {
    background: var(--pgeb-secondary);
    color: #fff;
}

.pgeb-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
}

.pgeb-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--pgeb-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.pgeb-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--pgeb-dark);
    z-index: 9999;
    padding: 5rem 1.5rem 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.pgeb-mobile-menu.pgeb-menu-open {
    right: 0;
}

.pgeb-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--pgeb-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgeb-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pgeb-menu-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--pgeb-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.pgeb-menu-nav a:hover {
    background: rgba(138, 43, 226, 0.2);
    color: var(--pgeb-secondary);
}

.pgeb-menu-nav i {
    font-size: 1.8rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.pgeb-main {
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Carousel */
.pgeb-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 12px;
}

.pgeb-carousel-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Section Styles */
.pgeb-section {
    background: var(--pgeb-bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--pgeb-border);
}

.pgeb-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pgeb-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pgeb-section-title i {
    color: var(--pgeb-secondary);
}

/* Game Grid */
.pgeb-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.pgeb-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--pgeb-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.pgeb-game-item:hover {
    transform: scale(1.05);
}

.pgeb-game-item:active {
    transform: scale(0.95);
}

.pgeb-game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--pgeb-gray);
    box-shadow: var(--pgeb-shadow);
}

.pgeb-game-name {
    font-size: 1.1rem;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card */
.pgeb-card {
    background: var(--pgeb-bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--pgeb-border);
    box-shadow: var(--pgeb-shadow);
}

.pgeb-card h3 {
    font-size: 1.8rem;
    color: var(--pgeb-secondary);
    margin-bottom: 1rem;
}

.pgeb-card p {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--pgeb-text-light);
}

/* Links */
.pgeb-link {
    color: var(--pgeb-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.pgeb-link:hover {
    color: var(--pgeb-primary);
    text-decoration: underline;
}

/* Footer */
.pgeb-footer {
    background: var(--pgeb-dark);
    border-top: 1px solid var(--pgeb-border);
    padding: 2rem 1rem 7rem;
    margin-top: 2rem;
}

.pgeb-footer-description {
    text-align: center;
    color: var(--pgeb-text-light);
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.pgeb-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pgeb-footer-links a {
    color: var(--pgeb-text-light);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pgeb-footer-links a:hover {
    background: rgba(138, 43, 226, 0.2);
    color: var(--pgeb-secondary);
}

.pgeb-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pgeb-partner-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pgeb-partner-logo:hover {
    opacity: 1;
}

.pgeb-copyright {
    text-align: center;
    color: var(--pgeb-text-light);
    font-size: 1.2rem;
}

/* Bottom Navigation */
.pgeb-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--pgeb-dark) 0%, #1a1a2e 100%);
    border-top: 2px solid var(--pgeb-primary);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

.pgeb-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.pgeb-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--pgeb-text-light);
    padding: 0.5rem;
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
}

.pgeb-nav-item:hover {
    color: var(--pgeb-secondary);
    background: rgba(255, 127, 80, 0.1);
}

.pgeb-nav-item.active {
    color: var(--pgeb-primary);
}

.pgeb-nav-item i {
    font-size: 24px;
}

.pgeb-nav-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive - Hide bottom nav on desktop */
@media (min-width: 769px) {
    .pgeb-bottom-nav {
        display: none;
    }

    .pgeb-main {
        padding-bottom: 2rem;
    }
}

/* Utility Classes */
.pgeb-text-center {
    text-align: center;
}

.pgeb-mt-1 { margin-top: 1rem; }
.pgeb-mt-2 { margin-top: 2rem; }
.pgeb-mb-1 { margin-bottom: 1rem; }
.pgeb-mb-2 { margin-bottom: 2rem; }

.pgeb-touched {
    opacity: 0.7;
}

.pgeb-loaded body {
    opacity: 1;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pgeb-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
