/**
 * 2ph Gaming Platform - Main Stylesheet
 * CSS class prefix: pgd2-
 * Color palette: #34495E (dark), #FFE135 (accent), #FF8C00 (highlight)
 * @version 1.0.0
 */

/* ===== CSS Variables ===== */
:root {
    --pgd2-primary: #34495E;
    --pgd2-secondary: #FFE135;
    --pgd2-accent: #FF8C00;
    --pgd2-dark: #1a252f;
    --pgd2-darker: #0f161c;
    --pgd2-light: #ecf0f1;
    --pgd2-white: #ffffff;
    --pgd2-gray: #95a5a6;
    --pgd2-shadow: rgba(0, 0, 0, 0.3);
    --pgd2-header-height: 60px;
    --pgd2-bottom-nav-height: 64px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--pgd2-darker);
    color: var(--pgd2-light);
    line-height: 1.6;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ===== Typography ===== */
.pgd2-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pgd2-secondary);
    margin-bottom: 1rem;
}

.pgd2-subheading {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pgd2-white);
    margin-bottom: 0.75rem;
}

.pgd2-text {
    font-size: 0.95rem;
    color: var(--pgd2-light);
    margin-bottom: 1rem;
}

/* ===== Header ===== */
.pgd2-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    height: var(--pgd2-header-height);
    background: linear-gradient(135deg, var(--pgd2-dark) 0%, var(--pgd2-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--pgd2-shadow);
    transition: all 0.3s ease;
}

.pgd2-header-scrolled {
    background: rgba(26, 37, 47, 0.95);
    backdrop-filter: blur(10px);
}

.pgd2-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.pgd2-logo img {
    width: 32px;
    height: 32px;
}

.pgd2-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pgd2-secondary);
    letter-spacing: 1px;
}

.pgd2-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pgd2-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pgd2-btn-login {
    background: transparent;
    color: var(--pgd2-white);
    border: 2px solid var(--pgd2-secondary);
}

.pgd2-btn-login:hover {
    background: var(--pgd2-secondary);
    color: var(--pgd2-dark);
}

.pgd2-btn-register {
    background: linear-gradient(135deg, var(--pgd2-secondary) 0%, var(--pgd2-accent) 100%);
    color: var(--pgd2-dark);
    font-weight: 700;
}

.pgd2-btn-register:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 225, 53, 0.4);
}

.pgd2-menu-toggle {
    background: none;
    border: none;
    color: var(--pgd2-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* ===== Mobile Menu ===== */
.pgd2-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--pgd2-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.xd200-menu-active {
    right: 0;
}

.pgd2-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: all 0.3s ease;
}

.xd200-overlay-active {
    opacity: 1;
    visibility: visible;
}

.pgd2-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--pgd2-white);
    font-size: 1.8rem;
    cursor: pointer;
}

.pgd2-menu-nav {
    list-style: none;
}

.pgd2-menu-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pgd2-menu-nav a {
    display: block;
    padding: 15px 10px;
    color: var(--pgd2-light);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.pgd2-menu-nav a:hover {
    color: var(--pgd2-secondary);
    padding-left: 20px;
}

/* ===== Main Content ===== */
.pgd2-main {
    padding-top: calc(var(--pgd2-header-height) + 15px);
    padding-bottom: 80px;
    min-height: 100vh;
}

/* ===== Hero Section ===== */
.pgd2-hero {
    background: linear-gradient(135deg, var(--pgd2-primary) 0%, var(--pgd2-dark) 100%);
    padding: 30px 15px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    margin-bottom: 20px;
}

.pgd2-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pgd2-secondary);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px var(--pgd2-shadow);
}

.pgd2-hero-subtitle {
    font-size: 1rem;
    color: var(--pgd2-light);
    margin-bottom: 20px;
}

.pgd2-hero-cta {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pgd2-btn-hero {
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 30px;
}

/* ===== Section Styles ===== */
.pgd2-section {
    padding: 20px 15px;
    margin-bottom: 20px;
}

.pgd2-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pgd2-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pgd2-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pgd2-view-all {
    color: var(--pgd2-accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Game Grid ===== */
.pgd2-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pgd2-game-item {
    background: var(--pgd2-dark);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.pgd2-game-item:hover {
    transform: translateY(-5px);
    border-color: var(--pgd2-secondary);
    box-shadow: 0 8px 20px rgba(255, 225, 53, 0.2);
}

.pgd2-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.pgd2-game-name {
    padding: 8px;
    font-size: 0.75rem;
    text-align: center;
    color: var(--pgd2-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Category Tabs ===== */
.pgd2-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 15px;
    scrollbar-width: none;
}

.pgd2-category-tabs::-webkit-scrollbar {
    display: none;
}

.pgd2-category-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--pgd2-dark);
    border: 2px solid var(--pgd2-primary);
    border-radius: 20px;
    color: var(--pgd2-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.xd200-tab-active,
.pgd2-category-tab:hover {
    background: var(--pgd2-secondary);
    color: var(--pgd2-dark);
    border-color: var(--pgd2-secondary);
}

/* ===== Features Section ===== */
.pgd2-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.pgd2-feature-card {
    background: linear-gradient(135deg, var(--pgd2-dark) 0%, var(--pgd2-primary) 100%);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.pgd2-feature-card:hover {
    transform: scale(1.02);
}

.pgd2-feature-icon {
    font-size: 2.5rem;
    color: var(--pgd2-secondary);
    margin-bottom: 10px;
}

.pgd2-feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pgd2-white);
    margin-bottom: 5px;
}

.pgd2-feature-desc {
    font-size: 0.8rem;
    color: var(--pgd2-gray);
}

/* ===== Promo Banner ===== */
.pgd2-promo-banner {
    background: linear-gradient(135deg, var(--pgd2-accent) 0%, #ff6b00 100%);
    padding: 20px 15px;
    border-radius: 12px;
    margin: 15px 0;
    text-align: center;
}

.pgd2-promo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pgd2-white);
    margin-bottom: 10px;
}

/* ===== Footer ===== */
.pgd2-footer {
    background: var(--pgd2-darker);
    padding: 30px 15px 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pgd2-partners {
    margin-bottom: 20px;
}

.pgd2-partners-title {
    font-size: 0.9rem;
    color: var(--pgd2-gray);
    margin-bottom: 10px;
    text-align: center;
}

.pgd2-partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pgd2-partner-logo {
    width: 50px;
    height: 30px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pgd2-partner-logo:hover {
    opacity: 1;
}

.pgd2-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.pgd2-footer-links a {
    color: var(--pgd2-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.pgd2-footer-links a:hover {
    color: var(--pgd2-secondary);
}

.pgd2-copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--pgd2-gray);
}

/* ===== Bottom Navigation ===== */
.pgd2-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    height: var(--pgd2-bottom-nav-height);
    background: linear-gradient(180deg, var(--pgd2-primary) 0%, var(--pgd2-dark) 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 15px var(--pgd2-shadow);
    border-top: 2px solid var(--pgd2-secondary);
}

.pgd2-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    padding: 5px;
}

.pgd2-nav-item:hover {
    background: rgba(255, 225, 53, 0.1);
}

.pgd2-nav-item.active {
    background: rgba(255, 225, 53, 0.2);
}

.pgd2-nav-item.active .pgd2-nav-icon {
    color: var(--pgd2-secondary);
}

.pgd2-nav-icon {
    font-size: 24px;
    color: var(--pgd2-light);
    margin-bottom: 3px;
    transition: color 0.3s ease;
}

.pgd2-nav-item:hover .pgd2-nav-icon {
    color: var(--pgd2-secondary);
}

.pgd2-nav-text {
    font-size: 10px;
    color: var(--pgd2-gray);
    transition: color 0.3s ease;
}

.pgd2-nav-item:hover .pgd2-nav-text,
.pgd2-nav-item.active .pgd2-nav-text {
    color: var(--pgd2-secondary);
}

/* ===== Utility Classes ===== */
.xd200-fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.xd200-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--pgd2-secondary);
    color: var(--pgd2-dark);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.xd200-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Responsive ===== */
@media (min-width: 769px) {
    .pgd2-bottom-nav {
        display: none;
    }

    .pgd2-main {
        padding-bottom: 20px;
    }

    .pgd2-footer {
        padding-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .pgd2-main {
        padding-bottom: calc(var(--pgd2-bottom-nav-height) + 20px);
    }
}

/* ===== Content Styles for Help Pages ===== */
.pgd2-content-section {
    background: var(--pgd2-dark);
    padding: 20px 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.pgd2-content-section h2 {
    font-size: 1.2rem;
    color: var(--pgd2-secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pgd2-primary);
}

.pgd2-content-section h3 {
    font-size: 1rem;
    color: var(--pgd2-accent);
    margin: 15px 0 10px;
}

.pgd2-content-section p {
    font-size: 0.9rem;
    color: var(--pgd2-light);
    margin-bottom: 12px;
    line-height: 1.7;
}

.pgd2-content-section ul,
.pgd2-content-section ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.pgd2-content-section li {
    font-size: 0.9rem;
    color: var(--pgd2-light);
    margin-bottom: 8px;
    line-height: 1.6;
}

.pgd2-content-section a {
    color: var(--pgd2-secondary);
    text-decoration: none;
    font-weight: 500;
}

.pgd2-content-section a:hover {
    text-decoration: underline;
}

/* FAQ Styles */
.pgd2-faq-item {
    background: var(--pgd2-primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.pgd2-faq-question {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pgd2-secondary);
    margin-bottom: 8px;
}

.pgd2-faq-answer {
    font-size: 0.85rem;
    color: var(--pgd2-light);
    line-height: 1.6;
}
