/**
 * xpinay Main Stylesheet
 * All classes use pg71- prefix for namespace isolation
 * @version 1.0.0
 */

/* CSS Variables */
:root {
    --pg71-primary: #20B2AA;
    --pg71-secondary: #273746;
    --pg71-accent: #98FB98;
    --pg71-light: #FFF8DC;
    --pg71-bg: #ECF0F1;
    --pg71-text: #273746;
    --pg71-text-light: #FFF8DC;
    --pg71-gradient: linear-gradient(135deg, #20B2AA 0%, #273746 100%);
    --pg71-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
    --pg71-radius: 12px;
    --pg71-transition: all 0.3s ease;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--pg71-text);
    background: var(--pg71-bg);
    -webkit-font-smoothing: antialiased;
}

/* Container */
.pg71-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.pg71-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--pg71-secondary) 0%, #1a252f 100%);
    padding: 1rem 0;
    transition: var(--pg71-transition);
}

.pg71-header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pg71-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.pg71-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.pg71-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.pg71-logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg71-primary);
    letter-spacing: 1px;
}

.pg71-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pg71-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--pg71-transition);
    border: none;
    min-height: 44px;
}

.pg71-btn-primary {
    background: var(--pg71-primary);
    color: var(--pg71-secondary);
}

.pg71-btn-primary:hover {
    background: #1a9d96;
    transform: translateY(-2px);
    box-shadow: var(--pg71-shadow);
}

.pg71-btn-secondary {
    background: transparent;
    color: var(--pg71-primary);
    border: 2px solid var(--pg71-primary);
}

.pg71-btn-secondary:hover {
    background: var(--pg71-primary);
    color: var(--pg71-secondary);
}

.pg71-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.pg71-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--pg71-primary);
    border-radius: 3px;
    transition: var(--pg71-transition);
}

/* Mobile Menu */
.pg71-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--pg71-secondary);
    z-index: 9999;
    padding: 8rem 2rem 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.pg71-menu-active {
    right: 0;
}

.pg71-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: var(--pg71-transition);
}

.pg71-overlay-active {
    opacity: 1;
    visibility: visible;
}

.pg71-nav-list {
    list-style: none;
}

.pg71-nav-item {
    margin-bottom: 0.5rem;
}

.pg71-nav-link {
    display: block;
    padding: 1.2rem 1.5rem;
    color: var(--pg71-light);
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 8px;
    transition: var(--pg71-transition);
}

.pg71-nav-link:hover {
    background: var(--pg71-primary);
    color: var(--pg71-secondary);
}

/* Main Content */
main {
    padding-top: 70px;
}

@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

/* Hero Carousel */
.pg71-carousel {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.pg71-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.pg71-slide-active {
    opacity: 1;
}

.pg71-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sections */
.pg71-section {
    padding: 2.5rem 0;
}

.pg71-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--pg71-secondary);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.pg71-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--pg71-primary);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* Game Grid */
.pg71-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 0.5rem;
}

.pg71-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: var(--pg71-transition);
    cursor: pointer;
}

.pg71-game-item:hover {
    transform: translateY(-3px);
}

.pg71-game-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: var(--pg71-transition);
}

.pg71-game-item:hover .pg71-game-icon {
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.4);
}

.pg71-game-name {
    font-size: 1.1rem;
    color: var(--pg71-secondary);
    text-align: center;
    margin-top: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category Section */
.pg71-category-section {
    margin-bottom: 2rem;
}

.pg71-category-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.pg71-category-icon {
    font-size: 2rem;
    color: var(--pg71-primary);
}

.pg71-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--pg71-secondary);
}

/* Content Cards */
.pg71-card {
    background: #fff;
    border-radius: var(--pg71-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.pg71-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--pg71-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pg71-card-content {
    font-size: 1.4rem;
    color: var(--pg71-text);
    line-height: 1.6;
}

.pg71-card-content p {
    margin-bottom: 1rem;
}

.pg71-card-content a {
    color: var(--pg71-primary);
    text-decoration: none;
    font-weight: 600;
}

.pg71-card-content a:hover {
    text-decoration: underline;
}

/* Features Grid */
.pg71-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pg71-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--pg71-bg);
    border-radius: 8px;
}

.pg71-feature-icon {
    font-size: 2.4rem;
    color: var(--pg71-primary);
    flex-shrink: 0;
}

.pg71-feature-text h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--pg71-secondary);
    margin-bottom: 0.3rem;
}

.pg71-feature-text p {
    font-size: 1.2rem;
    color: var(--pg71-text);
    line-height: 1.4;
}

/* CTA Section */
.pg71-cta {
    background: var(--pg71-gradient);
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-radius: var(--pg71-radius);
    margin: 2rem 0;
}

.pg71-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg71-text-light);
    margin-bottom: 1rem;
}

.pg71-cta-text {
    font-size: 1.4rem;
    color: var(--pg71-text-light);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.pg71-cta .pg71-btn {
    font-size: 1.6rem;
    padding: 1rem 3rem;
}

/* Footer */
.pg71-footer {
    background: var(--pg71-secondary);
    padding: 2rem 0 1rem;
    color: var(--pg71-light);
}

.pg71-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.pg71-footer-link {
    color: var(--pg71-light);
    text-decoration: none;
    font-size: 1.3rem;
    opacity: 0.8;
    transition: var(--pg71-transition);
}

.pg71-footer-link:hover {
    opacity: 1;
    color: var(--pg71-primary);
}

.pg71-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.pg71-partner-logo {
    height: 24px;
    width: auto;
    opacity: 0.7;
    transition: var(--pg71-transition);
}

.pg71-partner-logo:hover {
    opacity: 1;
}

.pg71-copyright {
    text-align: center;
    font-size: 1.2rem;
    opacity: 0.7;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bottom Navigation */
.pg71-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, var(--pg71-secondary) 0%, #1a252f 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}

@media (min-width: 769px) {
    .pg71-bottom-nav {
        display: none;
    }
}

.pg71-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--pg71-transition);
    text-decoration: none;
}

.pg71-nav-btn:hover,
.pg71-nav-btn:active {
    transform: scale(1.1);
}

.pg71-nav-btn .material-icons,
.pg71-nav-btn ion-icon,
.pg71-nav-btn i {
    font-size: 24px;
    color: var(--pg71-light);
    transition: var(--pg71-transition);
}

.pg71-nav-btn:hover .material-icons,
.pg71-nav-btn:hover ion-icon,
.pg71-nav-btn:hover i {
    color: var(--pg71-primary);
}

.pg71-nav-btn span {
    font-size: 1rem;
    color: var(--pg71-light);
    margin-top: 0.2rem;
    transition: var(--pg71-transition);
}

.pg71-nav-btn:hover span {
    color: var(--pg71-primary);
}

.pg71-nav-btn-active .material-icons,
.pg71-nav-btn-active ion-icon,
.pg71-nav-btn-active i,
.pg71-nav-btn-active span {
    color: var(--pg71-primary);
}

/* Utility Classes */
.pg71-text-center { text-align: center; }
.pg71-text-primary { color: var(--pg71-primary); }
.pg71-text-secondary { color: var(--pg71-secondary); }
.pg71-mb-1 { margin-bottom: 1rem; }
.pg71-mb-2 { margin-bottom: 2rem; }
.pg71-py-2 { padding: 2rem 0; }

/* Animations */
@keyframes pg71-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pg71-animate-in {
    animation: pg71-fadeIn 0.5s ease forwards;
}

/* Touch Feedback */
.pg71-touch-target {
    cursor: pointer;
    transition: var(--pg71-transition);
}

.pg71-touch-active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 380px) {
    .pg71-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pg71-game-icon {
        width: 55px;
        height: 55px;
    }

    .pg71-game-name {
        font-size: 1rem;
    }
}
