/**
 * x7game.css - Core stylesheet for x7game.cfd
 * All classes use pg37- prefix for namespace isolation
 * Color palette: #141414, #80CBC4, #26A69A, #8470FF, #9932CC
 */

:root {
    --pg37-bg: #141414;
    --pg37-bg-card: #1e1e2e;
    --pg37-bg-alt: #16162a;
    --pg37-primary: #8470FF;
    --pg37-accent: #80CBC4;
    --pg37-teal: #26A69A;
    --pg37-purple: #9932CC;
    --pg37-text: #f0f0f0;
    --pg37-text-muted: #a0a0b8;
    --pg37-border: #2a2a4a;
    --pg37-gradient: linear-gradient(135deg, #8470FF, #9932CC);
    --pg37-radius: 0.8rem;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ===== HEADER ===== */
.pg37-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 56px;
    background: var(--pg37-bg);
    border-bottom: 1px solid var(--pg37-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    z-index: 1000;
}

.pg37-logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.pg37-logo-area img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.pg37-logo-area span {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--pg37-accent);
    letter-spacing: 0.5px;
}

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

.pg37-menu-toggle {
    background: none;
    border: none;
    color: var(--pg37-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
}

.pg37-btn-register {
    background: var(--pg37-gradient);
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.pg37-btn-register:hover {
    opacity: 0.85;
}

.pg37-btn-login {
    background: transparent;
    color: var(--pg37-accent);
    border: 1px solid var(--pg37-accent);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pg37-btn-login:hover {
    background: rgba(128, 203, 196, 0.1);
}

/* ===== MOBILE MENU ===== */
#pg37-mobile-menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--pg37-bg-card);
    border-bottom: 1px solid var(--pg37-border);
    z-index: 9999;
    padding: 1rem;
    flex-direction: column;
    gap: 0;
}

.pg37-menu-link {
    color: var(--pg37-text);
    text-decoration: none;
    padding: 1rem;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--pg37-border);
    display: block;
    transition: background 0.2s;
}

.pg37-menu-link:hover {
    background: rgba(132, 112, 255, 0.1);
}

/* ===== MAIN CONTENT ===== */
main {
    padding-top: 56px;
    padding-bottom: 1rem;
}

.pg37-section {
    padding: 1.5rem 1.2rem;
}

.pg37-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pg37-accent);
    margin-bottom: 1rem;
    border-left: 3px solid var(--pg37-primary);
    padding-left: 0.8rem;
}

/* ===== CAROUSEL ===== */
.pg37-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--pg37-radius);
}

.pg37-carousel-slide {
    display: none;
    width: 100%;
    cursor: pointer;
}

.pg37-carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--pg37-radius);
}

.pg37-carousel-active {
    display: block;
}

/* ===== GAME GRID ===== */
.pg37-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.pg37-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.pg37-game-item img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.6rem;
    object-fit: cover;
    border: 1px solid var(--pg37-border);
}

.pg37-game-item span {
    font-size: 1.1rem;
    color: var(--pg37-text-muted);
    text-align: center;
    margin-top: 0.3rem;
    line-height: 1.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== CATEGORY TABS ===== */
.pg37-cat-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pg37-text);
    margin: 1.5rem 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg37-cat-title i,
.pg37-cat-title .material-icons {
    color: var(--pg37-primary);
}

/* ===== CONTENT CARD ===== */
.pg37-card {
    background: var(--pg37-bg-card);
    border: 1px solid var(--pg37-border);
    border-radius: var(--pg37-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.pg37-card h2,
.pg37-card h3 {
    color: var(--pg37-accent);
    margin-bottom: 0.8rem;
}

.pg37-card p {
    font-size: 1.3rem;
    color: var(--pg37-text-muted);
    line-height: 2rem;
    margin-bottom: 0.8rem;
}

/* ===== PROMO LINK ===== */
.pg37-promo-link {
    color: var(--pg37-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.pg37-promo-link:hover {
    color: var(--pg37-accent);
}

.pg37-promo-btn {
    display: inline-block;
    background: var(--pg37-gradient);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.2s;
}

.pg37-promo-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pg37-promo-btn-lg {
    display: block;
    width: 100%;
    padding: 1.2rem;
    font-size: 1.6rem;
    border-radius: var(--pg37-radius);
    text-align: center;
}

/* ===== FAQ ===== */
.pg37-faq-item {
    border-bottom: 1px solid var(--pg37-border);
    padding: 1rem 0;
}

.pg37-faq-item h3 {
    font-size: 1.4rem;
    color: var(--pg37-accent);
}

.pg37-faq-item p {
    font-size: 1.3rem;
    color: var(--pg37-text-muted);
    margin-top: 0.5rem;
}

/* ===== STATS BAR ===== */
.pg37-stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--pg37-bg-card);
    border-radius: var(--pg37-radius);
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid var(--pg37-border);
}

.pg37-stat-item {
    text-align: center;
}

.pg37-stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pg37-accent);
}

.pg37-stat-label {
    font-size: 1.1rem;
    color: var(--pg37-text-muted);
}

/* ===== TESTIMONIALS ===== */
.pg37-testimonial {
    background: var(--pg37-bg-card);
    border-left: 3px solid var(--pg37-purple);
    border-radius: 0 var(--pg37-radius) var(--pg37-radius) 0;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
}

.pg37-testimonial p {
    font-style: italic;
    font-size: 1.3rem;
    color: var(--pg37-text-muted);
}

.pg37-testimonial-author {
    font-size: 1.2rem;
    color: var(--pg37-accent);
    margin-top: 0.4rem;
    font-weight: 600;
}

/* ===== WINNER SHOWCASE ===== */
.pg37-winner-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--pg37-border);
}

.pg37-winner-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.pg37-winner-info {
    flex: 1;
}

.pg37-winner-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--pg37-text);
}

.pg37-winner-game {
    font-size: 1.1rem;
    color: var(--pg37-text-muted);
}

.pg37-winner-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pg37-accent);
}

/* ===== FOOTER ===== */
.pg37-footer {
    background: var(--pg37-bg-card);
    border-top: 1px solid var(--pg37-border);
    padding: 2rem 1.2rem;
    margin-top: 2rem;
}

.pg37-footer-brand {
    font-size: 1.3rem;
    color: var(--pg37-text-muted);
    line-height: 2rem;
    margin-bottom: 1rem;
}

.pg37-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
}

.pg37-footer-link {
    color: var(--pg37-accent);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    background: rgba(128, 203, 196, 0.08);
    border-radius: 0.4rem;
    transition: background 0.2s;
}

.pg37-footer-link:hover {
    background: rgba(128, 203, 196, 0.15);
}

.pg37-footer-promo-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
}

.pg37-footer-promo-btns button,
.pg37-footer-promo-btns .pg37-promo-btn {
    flex: 1;
    min-width: calc(50% - 0.6rem);
    padding: 0.6rem;
    font-size: 1.2rem;
}

.pg37-footer-copyright {
    font-size: 1.1rem;
    color: var(--pg37-text-muted);
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pg37-border);
}

/* ===== BOTTOM NAVIGATION ===== */
.pg37-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 60px;
    background: var(--pg37-bg-card);
    border-top: 1px solid var(--pg37-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.4rem;
}

.pg37-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 52px;
    background: none;
    border: none;
    color: var(--pg37-text-muted);
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.pg37-bottom-nav-btn:active {
    transform: scale(0.9);
}

.pg37-bottom-nav-btn .pg37-nav-icon {
    font-size: 2.2rem;
    height: 2.4rem;
    line-height: 2.4rem;
}

.pg37-bottom-nav-btn .pg37-nav-label {
    font-size: 1rem;
    margin-top: 0.2rem;
    line-height: 1.2rem;
}

.pg37-bottom-active {
    color: var(--pg37-accent) !important;
}

.pg37-bottom-nav-btn:hover {
    color: var(--pg37-accent);
}

/* ===== DESKTOP: HIDE BOTTOM NAV ===== */
@media (min-width: 769px) {
    .pg37-bottom-nav {
        display: none;
    }
}

/* ===== MOBILE: BOTTOM PADDING ===== */
@media (max-width: 768px) {
    main {
        padding-bottom: 72px;
    }
}

/* ===== UTILITY ===== */
.pg37-text-center { text-align: center; }
.pg37-mt-1 { margin-top: 0.8rem; }
.pg37-mt-2 { margin-top: 1.6rem; }
.pg37-mb-1 { margin-bottom: 0.8rem; }
.pg37-mb-2 { margin-bottom: 1.6rem; }
.pg37-hidden { display: none; }

/* ===== INTERNAL LINK ===== */
.pg37-internal-link {
    color: var(--pg37-primary);
    text-decoration: underline;
    cursor: pointer;
}

.pg37-internal-link:hover {
    color: var(--pg37-accent);
}

/* ===== RESPONSIVE FINE-TUNING ===== */
@media (max-width: 320px) {
    .pg37-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
