/**
 * okfun ph - Main Stylesheet
 * All classes use pg33- prefix for namespace isolation
 * Mobile-first responsive design
 * @version 1.0.0
 */

/* CSS Variables */
:root {
    --pg33-primary: #FFCC33;
    --pg33-secondary: #66CDAA;
    --pg33-bg-dark: #0E1621;
    --pg33-bg-medium: #4A4A4A;
    --pg33-text-light: #FFF8DC;
    --pg33-text-gray: #D3D3D3;
    --pg33-accent: #FFCC33;
    --pg33-success: #66CDAA;
    --pg33-header-height: 56px;
    --pg33-bottom-nav-height: 60px;
    --pg33-border-radius: 8px;
    --pg33-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    background-color: var(--pg33-bg-dark);
    color: var(--pg33-text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--pg33-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--pg33-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.pg33-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Header */
.pg33-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pg33-header-height);
    background: linear-gradient(135deg, var(--pg33-bg-dark) 0%, #1a2535 100%);
    border-bottom: 1px solid rgba(255, 204, 51, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.pg33-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.pg33-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pg33-primary);
    letter-spacing: 0.5px;
}

.pg33-header-actions {
    display: flex;
    gap: 8px;
}

.pg33-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: var(--pg33-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-height: 36px;
}

.pg33-btn-primary {
    background: var(--pg33-primary);
    color: var(--pg33-bg-dark);
}

.pg33-btn-primary:hover {
    background: #e6b82e;
    transform: translateY(-1px);
}

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

.pg33-btn-outline:hover {
    background: rgba(255, 204, 51, 0.1);
}

.pg33-menu-btn {
    background: none;
    border: none;
    color: var(--pg33-text-light);
    font-size: 2rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
}

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

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

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

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

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

.pg33-menu-links {
    margin-top: 50px;
    list-style: none;
}

.pg33-menu-links li {
    margin-bottom: 8px;
}

.pg33-menu-links a {
    display: block;
    padding: 12px 16px;
    color: var(--pg33-text-light);
    font-size: 1.4rem;
    border-radius: var(--pg33-border-radius);
    transition: background 0.3s ease;
}

.pg33-menu-links a:hover {
    background: rgba(255, 204, 51, 0.1);
    color: var(--pg33-primary);
}

/* Main Content */
main {
    padding-top: calc(var(--pg33-header-height) + 12px);
}

@media (max-width: 768px) {
    main {
        padding-bottom: calc(var(--pg33-bottom-nav-height) + 20px);
    }
}

/* Carousel */
.pg33-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--pg33-border-radius);
    margin-bottom: 20px;
}

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

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

.pg33-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section */
.pg33-section {
    padding: 20px 0;
}

.pg33-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pg33-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pg33-primary);
}

/* Game Grid */
.pg33-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

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

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

.pg33-game-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--pg33-border-radius);
    margin-bottom: 6px;
    object-fit: cover;
}

.pg33-game-name {
    font-size: 1.1rem;
    color: var(--pg33-text-gray);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category Title */
.pg33-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pg33-secondary);
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pg33-category-title i {
    font-size: 1.8rem;
}

/* Card */
.pg33-card {
    background: rgba(74, 74, 74, 0.3);
    border-radius: var(--pg33-border-radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 204, 51, 0.1);
}

.pg33-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pg33-primary);
    margin-bottom: 12px;
}

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

/* Bottom Navigation */
.pg33-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--pg33-bottom-nav-height);
    background: linear-gradient(180deg, #1a2535 0%, var(--pg33-bg-dark) 100%);
    border-top: 1px solid rgba(255, 204, 51, 0.2);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 4px 0;
}

@media (min-width: 769px) {
    .pg33-bottom-nav {
        display: none;
    }
}

.pg33-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 52px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 4px 8px;
}

.pg33-nav-item:hover,
.pg33-nav-item-active {
    background: rgba(255, 204, 51, 0.1);
}

.pg33-nav-item i,
.pg33-nav-item .material-icons {
    font-size: 22px;
    color: var(--pg33-text-gray);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.pg33-nav-item:hover i,
.pg33-nav-item:hover .material-icons,
.pg33-nav-item-active i,
.pg33-nav-item-active .material-icons {
    color: var(--pg33-primary);
}

.pg33-nav-item span {
    font-size: 1rem;
    color: var(--pg33-text-gray);
    transition: color 0.3s ease;
}

.pg33-nav-item:hover span,
.pg33-nav-item-active span {
    color: var(--pg33-primary);
}

/* Footer */
.pg33-footer {
    background: rgba(14, 22, 33, 0.95);
    padding: 30px 12px 20px;
    border-top: 1px solid rgba(255, 204, 51, 0.1);
}

.pg33-footer-desc {
    font-size: 1.2rem;
    color: var(--pg33-text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.pg33-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.pg33-footer-link {
    font-size: 1.2rem;
    color: var(--pg33-text-gray);
    padding: 6px 12px;
    background: rgba(74, 74, 74, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pg33-footer-link:hover {
    background: var(--pg33-primary);
    color: var(--pg33-bg-dark);
}

.pg33-footer-promo {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.pg33-promo-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    padding: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    background: var(--pg33-primary);
    color: var(--pg33-bg-dark);
    border-radius: var(--pg33-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg33-promo-btn:hover {
    background: #e6b82e;
    transform: translateY(-2px);
}

.pg33-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: var(--pg33-text-gray);
    padding-top: 16px;
    border-top: 1px solid rgba(255, 204, 51, 0.1);
}

/* Partners */
.pg33-partners {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pg33-partner-logo {
    width: 50px;
    height: 30px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.pg33-partner-logo:hover {
    opacity: 1;
}

/* Utility Classes */
.pg33-text-center { text-align: center; }
.pg33-text-primary { color: var(--pg33-primary); }
.pg33-text-secondary { color: var(--pg33-secondary); }
.pg33-mb-10 { margin-bottom: 10px; }
.pg33-mb-20 { margin-bottom: 20px; }
.pg33-mt-20 { margin-top: 20px; }

/* Promo Link Style */
.pg33-promo-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--pg33-primary);
    color: var(--pg33-bg-dark);
    font-weight: 600;
    border-radius: var(--pg33-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pg33-promo-link:hover {
    background: #e6b82e;
    color: var(--pg33-bg-dark);
}

/* List Styles */
.pg33-list {
    list-style: none;
    padding: 0;
}

.pg33-list li {
    padding: 10px 0;
    padding-left: 20px;
    position: relative;
    border-bottom: 1px solid rgba(255, 204, 51, 0.1);
}

.pg33-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--pg33-primary);
    font-weight: bold;
}

/* FAQ Accordion */
.pg33-faq-item {
    margin-bottom: 10px;
    background: rgba(74, 74, 74, 0.2);
    border-radius: var(--pg33-border-radius);
    overflow: hidden;
}

.pg33-faq-question {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--pg33-text-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pg33-faq-answer {
    padding: 0 16px 12px;
    font-size: 1.3rem;
    color: var(--pg33-text-gray);
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (min-width: 431px) {
    .pg33-game-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 769px) {
    .pg33-container {
        max-width: 800px;
    }

    .pg33-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .pg33-carousel {
        height: 280px;
    }
}

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

.pg33-animate {
    animation: pg33-fadeIn 0.5s ease forwards;
}
