/**
 * kkkk ph - Main Stylesheet
 * Version: 1.0.0
 * All classes use pgd4- prefix for namespace isolation
 * Mobile-first design with max-width 430px
 */

/* CSS Variables */
:root {
    --pgd4-primary: #5F9EA0;
    --pgd4-secondary: #E5E5E5;
    --pgd4-bg: #262626;
    --pgd4-bg-light: #333333;
    --pgd4-text: #E5E5E5;
    --pgd4-text-dark: #262626;
    --pgd4-accent: #5F9EA0;
    --pgd4-accent-hover: #4a8a8c;
    --pgd4-border: #444444;
    --pgd4-shadow: rgba(0, 0, 0, 0.3);
    --pgd4-gradient: linear-gradient(135deg, #5F9EA0, #4a8a8c);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--pgd4-bg);
    color: var(--pgd4-text);
    line-height: 1.5;
    font-size: 1.4rem;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Container */
.pgd4-container {
    width: 100%;
    padding: 0 1.2rem;
    margin: 0 auto;
}

/* Header */
.pgd4-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: var(--pgd4-bg);
    border-bottom: 1px solid var(--pgd4-border);
    z-index: 1000;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.pgd4-header-scrolled {
    background: rgba(38, 38, 38, 0.95);
    box-shadow: 0 2px 10px var(--pgd4-shadow);
}

.pgd4-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pgd4-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.pgd4-logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.pgd4-logo-text {
    color: var(--pgd4-text);
    font-size: 1.6rem;
    font-weight: 700;
}

.pgd4-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pgd4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 36px;
}

.pgd4-btn-primary {
    background: var(--pgd4-gradient);
    color: white;
}

.pgd4-btn-primary:hover {
    background: var(--pgd4-accent-hover);
    transform: scale(1.02);
}

.pgd4-btn-outline {
    background: transparent;
    color: var(--pgd4-accent);
    border: 1px solid var(--pgd4-accent);
}

.pgd4-btn-outline:hover {
    background: var(--pgd4-accent);
    color: white;
}

.pgd4-menu-toggle {
    background: none;
    border: none;
    color: var(--pgd4-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.4rem;
}

/* Mobile Menu */
.pgd4-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--pgd4-bg-light);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 6rem 1.5rem 2rem;
    overflow-y: auto;
}

.xd4c3-menu-active {
    right: 0;
}

.pgd4-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.pgd4-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--pgd4-text);
    font-size: 2.4rem;
    cursor: pointer;
}

.pgd4-menu-nav {
    list-style: none;
}

.pgd4-menu-nav li {
    margin-bottom: 0.5rem;
}

.pgd4-menu-nav a {
    display: block;
    padding: 1rem;
    color: var(--pgd4-text);
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.pgd4-menu-nav a:hover {
    background: var(--pgd4-accent);
    color: white;
}

/* Main Content */
.pgd4-main {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Slider/Carousel */
.pgd4-slider {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.pgd4-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.xd4c3-slide-active {
    opacity: 1;
}

.pgd4-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Section Titles */
.pgd4-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pgd4-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pgd4-accent);
}

.pgd4-section {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
}

/* Game Grid */
.pgd4-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.pgd4-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pgd4-game-item:hover {
    transform: scale(1.05);
}

.pgd4-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.pgd4-game-name {
    font-size: 1.1rem;
    color: var(--pgd4-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Tabs */
.pgd4-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pgd4-accent);
    margin: 1.5rem 0 1rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--pgd4-accent);
}

/* Cards */
.pgd4-card {
    background: var(--pgd4-bg-light);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.pgd4-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--pgd4-accent);
    margin-bottom: 0.8rem;
}

.pgd4-card-text {
    font-size: 1.3rem;
    color: var(--pgd4-text);
    line-height: 1.6;
}

/* Features Grid */
.pgd4-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pgd4-feature-item {
    background: var(--pgd4-bg-light);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.pgd4-feature-icon {
    font-size: 2.4rem;
    color: var(--pgd4-accent);
    margin-bottom: 0.5rem;
}

.pgd4-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--pgd4-text);
}

/* Promo Link Styles */
.pgd4-promo-link {
    color: var(--pgd4-accent);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.pgd4-promo-link:hover {
    text-decoration: underline;
}

/* Testimonials */
.pgd4-testimonial {
    background: var(--pgd4-bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pgd4-testimonial-text {
    font-size: 1.2rem;
    color: var(--pgd4-text);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.pgd4-testimonial-author {
    font-size: 1.1rem;
    color: var(--pgd4-accent);
    font-weight: 600;
}

/* Payment Methods */
.pgd4-payment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pgd4-payment-item {
    background: var(--pgd4-bg-light);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    color: var(--pgd4-text);
}

/* Footer */
.pgd4-footer {
    background: var(--pgd4-bg-light);
    padding: 2rem 1rem;
    padding-bottom: 80px;
}

.pgd4-footer-brand {
    font-size: 1.4rem;
    color: var(--pgd4-text);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pgd4-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.pgd4-footer-link {
    background: var(--pgd4-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
}

.pgd4-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.pgd4-footer-nav a {
    color: var(--pgd4-text);
    text-decoration: none;
    font-size: 1.2rem;
}

.pgd4-footer-nav a:hover {
    color: var(--pgd4-accent);
}

.pgd4-copyright {
    font-size: 1.1rem;
    color: #888;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--pgd4-border);
}

/* Bottom Navigation */
.pgd4-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-top: 1px solid var(--pgd4-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    z-index: 1000;
}

.pgd4-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    color: #888;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pgd4-nav-item:hover,
.pgd4-nav-item.active {
    color: var(--pgd4-accent);
    transform: scale(1.1);
}

.pgd4-nav-icon {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
}

.pgd4-nav-text {
    font-size: 1rem;
}

/* Responsive */
@media (min-width: 769px) {
    .pgd4-bottom-nav {
        display: none;
    }

    .pgd4-main {
        padding-bottom: 2rem;
    }

    .pgd4-footer {
        padding-bottom: 2rem;
    }
}

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

/* Utility Classes */
.pgd4-text-center { text-align: center; }
.pgd4-text-left { text-align: left; }
.pgd4-mb-1 { margin-bottom: 1rem; }
.pgd4-mb-2 { margin-bottom: 2rem; }
.pgd4-py-1 { padding-top: 1rem; padding-bottom: 1rem; }
.pgd4-hidden { display: none; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pgd4-animate {
    animation: fadeIn 0.3s ease forwards;
}
