/**
 * 789taya PH - Main Stylesheet
 * CSS class prefix: pge3-
 * Color Palette: #2C2C2C | #F8F8FF | #008B8B | #ECF0F1 | #ADB5BD | #AFEEEE
 */

/* ==================== CSS Variables ==================== */
:root {
    --pge3-primary-dark: #2C2C2C;
    --pge3-primary-light: #F8F8FF;
    --pge3-accent: #008B8B;
    --pge3-accent-light: #AFEEEE;
    --pge3-secondary: #ECF0F1;
    --pge3-muted: #ADB5BD;
    --pge3-text-dark: #1a1a1a;
    --pge3-text-light: #ffffff;
    --pge3-success: #27ae60;
    --pge3-warning: #f39c12;
    --pge3-error: #e74c3c;
    --pge3-shadow: rgba(0, 0, 0, 0.15);
    --pge3-transition: all 0.3s ease;
    --pge3-border-radius: 12px;
}

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--pge3-primary-light);
    color: var(--pge3-text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--pge3-transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

/* ==================== Header Styles ==================== */
.pge3-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--pge3-primary-dark);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--pge3-shadow);
}

.pge3-header-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pge3-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pge3-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--pge3-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pge3-text-light);
    font-weight: bold;
    font-size: 18px;
}

.pge3-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--pge3-text-light);
    letter-spacing: -0.5px;
}

.pge3-header-buttons {
    display: flex;
    gap: 8px;
}

.pge3-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--pge3-transition);
    white-space: nowrap;
}

.pge3-btn-login {
    background: transparent;
    color: var(--pge3-text-light);
    border: 1px solid var(--pge3-accent);
}

.pge3-btn-login:hover {
    background: var(--pge3-accent);
    border-color: var(--pge3-accent);
}

.pge3-btn-register {
    background: var(--pge3-accent);
    color: var(--pge3-text-light);
}

.pge3-btn-register:hover {
    background: #007a7a;
    transform: translateY(-1px);
}

.pge3-btn-menu {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--pge3-secondary);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.pge3-menu-bar {
    width: 20px;
    height: 2px;
    background: var(--pge3-primary-dark);
    border-radius: 2px;
    transition: var(--pge3-transition);
}

/* ==================== Mobile Menu ==================== */
.pge3-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--pge3-transition);
}

.pge3-overlay-active {
    opacity: 1;
    visibility: visible;
}

.pge3-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 100%;
    height: 100vh;
    background: var(--pge3-primary-dark);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.pge3-menu-open {
    right: 0;
}

.pge3-menu-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pge3-menu-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pge3-text-light);
    font-size: 20px;
}

.pge3-menu-links {
    padding: 16px;
}

.pge3-menu-link {
    display: block;
    padding: 14px 16px;
    color: var(--pge3-text-light);
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: var(--pge3-transition);
}

.pge3-menu-link:hover {
    background: rgba(255, 255, 255, 0.08);
    padding-left: 20px;
}

.pge3-menu-link-active {
    background: var(--pge3-accent);
}

/* ==================== Main Content ==================== */
.pge3-main {
    padding-top: 60px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.pge3-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ==================== Hero/Carousel Section ==================== */
.pge3-carousel-section {
    margin-bottom: 20px;
}

.pge3-carousel {
    position: relative;
    border-radius: var(--pge3-border-radius);
    overflow: hidden;
    background: var(--pge3-primary-dark);
}

.pge3-carousel-slide {
    display: none;
    position: relative;
}

.pge3-slide-active {
    display: block;
}

.pge3-slide-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--pge3-border-radius);
}

.pge3-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.pge3-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--pge3-transition);
}

.pge3-dot-active {
    background: var(--pge3-accent);
    width: 24px;
    border-radius: 4px;
}

/* ==================== Quick Actions ==================== */
.pge3-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.pge3-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--pge3-secondary);
    border-radius: 12px;
    transition: var(--pge3-transition);
}

.pge3-action-btn:hover {
    background: var(--pge3-accent-light);
    transform: translateY(-2px);
}

.pge3-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--pge3-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pge3-accent);
    font-size: 18px;
}

.pge3-action-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--pge3-primary-dark);
    text-align: center;
}

/* ==================== Section Titles ==================== */
.pge3-section {
    margin-bottom: 24px;
}

.pge3-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pge3-primary-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pge3-section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--pge3-accent);
    border-radius: 2px;
}

/* ==================== Game Category Tabs ==================== */
.pge3-game-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.pge3-game-tabs::-webkit-scrollbar {
    display: none;
}

.pge3-tab-btn {
    padding: 10px 16px;
    background: var(--pge3-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pge3-primary-dark);
    white-space: nowrap;
    transition: var(--pge3-transition);
}

.pge3-tab-btn:hover {
    background: var(--pge3-accent-light);
}

.pge3-tab-active {
    background: var(--pge3-accent);
    color: var(--pge3-text-light);
}

/* ==================== Game Grid ==================== */
.pge3-game-tab-content {
    display: none;
}

.pge3-tab-active {
    display: block;
}

.pge3-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pge3-game-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--pge3-secondary);
    cursor: pointer;
    transition: var(--pge3-transition);
    aspect-ratio: 1;
}

.pge3-game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px var(--pge3-shadow);
}

.pge3-game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pge3-game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: var(--pge3-transition);
}

.pge3-game-card:hover .pge3-game-overlay {
    opacity: 1;
}

.pge3-game-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--pge3-text-light);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.pge3-hot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--pge3-warning);
    color: var(--pge3-text-light);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ==================== Featured Games ==================== */
.pge3-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.pge3-featured-card {
    position: relative;
    border-radius: var(--pge3-border-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    transition: var(--pge3-transition);
}

.pge3-featured-card:hover {
    transform: scale(1.02);
}

.pge3-featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pge3-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.pge3-featured-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pge3-text-light);
    margin-bottom: 4px;
}

.pge3-featured-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== Promotional Banner ==================== */
.pge3-promo-banner {
    background: linear-gradient(135deg, var(--pge3-accent) 0%, #006666 100%);
    border-radius: var(--pge3-border-radius);
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.pge3-promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.pge3-promo-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--pge3-text-light);
    margin-bottom: 8px;
}

.pge3-promo-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.pge3-promo-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--pge3-text-light);
    color: var(--pge3-accent);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--pge3-transition);
}

.pge3-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ==================== Info Cards ==================== */
.pge3-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.pge3-info-card {
    background: var(--pge3-secondary);
    border-radius: var(--pge3-border-radius);
    padding: 16px;
    text-align: center;
}

.pge3-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pge3-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--pge3-accent);
    font-size: 22px;
}

.pge3-info-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--pge3-primary-dark);
    margin-bottom: 4px;
}

.pge3-info-text {
    font-size: 12px;
    color: var(--pge3-muted);
}

/* ==================== Footer ==================== */
.pge3-footer {
    background: var(--pge3-primary-dark);
    padding: 24px 12px;
    margin-top: auto;
}

.pge3-footer-content {
    max-width: 430px;
    margin: 0 auto;
    text-align: center;
}

.pge3-footer-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--pge3-text-light);
    margin-bottom: 16px;
}

.pge3-footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pge3-footer-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--pge3-transition);
}

.pge3-footer-link:hover {
    color: var(--pge3-accent-light);
}

.pge3-footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.pge3-footer-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    line-height: 1.8;
}

.pge3-footer-warning {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    line-height: 1.6;
}

/* ==================== Mobile Bottom Navigation ==================== */
.pge3-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--pge3-primary-dark);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    padding: 0 8px;
}

.pge3-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 60px;
    min-height: 50px;
    padding: 8px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--pge3-transition);
}

.pge3-nav-btn:hover,
.pge3-nav-btn-active {
    color: var(--pge3-accent-light);
    background: rgba(0, 139, 139, 0.15);
}

.pge3-nav-icon {
    font-size: 20px;
}

.pge3-nav-text {
    font-size: 10px;
    font-weight: 600;
}

.pge3-nav-btn.pge3-promo-btn-highlight {
    background: var(--pge3-accent);
    color: var(--pge3-text-light);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    margin-top: -10px;
}

.pge3-nav-btn.pge3-promo-btn-highlight:hover {
    background: #007a7a;
    color: var(--pge3-text-light);
}

/* ==================== Back to Top ==================== */
.pge3-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pge3-accent);
    color: var(--pge3-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--pge3-transition);
    z-index: 999;
    box-shadow: 0 4px 15px var(--pge3-shadow);
}

.pge3-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==================== Loading Animation ==================== */
.pge3-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.pge3-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--pge3-secondary);
    border-top-color: var(--pge3-accent);
    border-radius: 50%;
    animation: pge3-spin 1s linear infinite;
}

@keyframes pge3-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== Desktop Styles ==================== */
@media (min-width: 769px) {
    .pge3-header-container {
        max-width: 1200px;
        padding: 16px 24px;
    }

    .pge3-logo-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .pge3-logo-text {
        font-size: 24px;
    }

    .pge3-btn-menu {
        display: none;
    }

    .pge3-main {
        padding-top: 80px;
        padding-bottom: 0;
    }

    .pge3-container {
        max-width: 1200px;
        padding: 0 24px;
    }

    .pge3-bottom-nav {
        display: none;
    }

    .pge3-game-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }

    .pge3-featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pge3-quick-actions {
        max-width: 600px;
        margin: 0 auto 32px;
    }

    .pge3-info-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 800px;
        margin: 0 auto 32px;
    }

    .pge3-section-title {
        font-size: 22px;
    }
}

/* ==================== Internal Link Cards ==================== */
.pge3-internal-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.pge3-internal-card {
    background: var(--pge3-secondary);
    border-radius: var(--pge3-border-radius);
    padding: 16px;
    text-align: center;
    transition: var(--pge3-transition);
    border: 2px solid transparent;
}

.pge3-internal-card:hover {
    border-color: var(--pge3-accent);
    transform: translateY(-3px);
}

.pge3-internal-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.pge3-internal-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--pge3-primary-dark);
    margin-bottom: 4px;
}

.pge3-internal-desc {
    font-size: 11px;
    color: var(--pge3-muted);
}

/* ==================== Article Content Styles ==================== */
.pge3-article {
    padding: 20px 0;
}

.pge3-article h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--pge3-primary-dark);
    margin-bottom: 16px;
    line-height: 1.3;
}

.pge3-article h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--pge3-primary-dark);
    margin: 24px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--pge3-secondary);
}

.pge3-article p {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 16px;
}

.pge3-article ul,
.pge3-article ol {
    margin: 16px 0;
    padding-left: 24px;
}

.pge3-article li {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 8px;
}

.pge3-article strong {
    color: var(--pge3-accent);
}

.pge3-cta-section {
    background: var(--pge3-secondary);
    border-radius: var(--pge3-border-radius);
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.pge3-cta-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--pge3-primary-dark);
    margin-bottom: 12px;
}

.pge3-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--pge3-accent);
    color: var(--pge3-text-light);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    transition: var(--pge3-transition);
}

.pge3-cta-btn:hover {
    background: #007a7a;
    transform: translateY(-2px);
}

/* ==================== FAQ Styles ==================== */
.pge3-faq-item {
    background: var(--pge3-secondary);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.pge3-faq-question {
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pge3-primary-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--pge3-transition);
}

.pge3-faq-question:hover {
    background: rgba(0, 139, 139, 0.1);
}

.pge3-faq-icon {
    transition: var(--pge3-transition);
}

.pge3-faq-item.pge3-faq-open .pge3-faq-icon {
    transform: rotate(180deg);
}

.pge3-faq-answer {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: var(--pge3-transition);
}

.pge3-faq-item.pge3-faq-open .pge3-faq-answer {
    padding: 0 16px 16px;
    max-height: 500px;
}

.pge3-faq-answer p {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}
