/**
 * J8 Games - Main Stylesheet
 * Mobile-first responsive design
 * CSS class prefix: g354-
 * Root font: 62.5% for rem units
 */

/* CSS Variables */
:root {
    --g354-primary: #CD853F;
    --g354-secondary: #C71585;
    --g354-accent: #006400;
    --g354-bg: #0F0F23;
    --g354-bg-light: #1a1a2e;
    --g354-text: #EEEEEE;
    --g354-text-muted: #a0a0a0;
    --g354-border: #2a2a4a;
    --g354-success: #28a745;
    --g354-gradient: linear-gradient(135deg, var(--g354-primary), var(--g354-secondary));
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--g354-bg);
    color: var(--g354-text);
    line-height: 1.5;
    font-size: 1.4rem;
    min-height: 100vh;
}

/* Container */
.g354-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* Header */
.g354-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--g354-bg) 0%, rgba(15, 15, 35, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--g354-border);
    transition: all 0.3s ease;
}

.g354-header-scrolled {
    background: rgba(15, 15, 35, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.g354-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem;
    max-width: 430px;
    margin: 0 auto;
}

.g354-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.g354-logo img {
    width: 28px;
    height: 28px;
}

.g354-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--g354-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.g354-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.g354-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.g354-btn-primary {
    background: var(--g354-gradient);
    color: #fff;
}

.g354-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.4);
}

.g354-btn-outline {
    background: transparent;
    color: var(--g354-primary);
    border: 2px solid var(--g354-primary);
}

.g354-btn-outline:hover {
    background: var(--g354-primary);
    color: #fff;
}

.g354-menu-toggle {
    background: none;
    border: none;
    color: var(--g354-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.4rem;
}

/* Mobile Menu */
.g354-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--g354-bg-light);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.g354-menu-active {
    right: 0;
}

.g354-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;
}

.g354-overlay-active {
    opacity: 1;
    visibility: visible;
}

.g354-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--g354-border);
}

.g354-menu-close {
    background: none;
    border: none;
    color: var(--g354-text);
    font-size: 2.4rem;
    cursor: pointer;
}

.g354-menu-nav {
    list-style: none;
}

.g354-menu-nav li {
    margin-bottom: 0.8rem;
}

.g354-menu-nav a {
    color: var(--g354-text);
    text-decoration: none;
    font-size: 1.4rem;
    padding: 0.8rem 1rem;
    display: block;
    border-radius: 0.8rem;
    transition: all 0.3s ease;
}

.g354-menu-nav a:hover {
    background: var(--g354-gradient);
    color: #fff;
}

/* Main Content */
.g354-main {
    padding-top: 6rem;
    padding-bottom: 8rem;
}

/* Carousel */
.g354-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.g354-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.g354-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.g354-slide-active {
    opacity: 1;
}

.g354-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g354-carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.g354-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.g354-dot-active {
    background: var(--g354-primary);
    transform: scale(1.2);
}

/* Section */
.g354-section {
    margin-bottom: 2rem;
}

.g354-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--g354-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.g354-section-title i {
    font-size: 2rem;
}

/* Game Grid */
.g354-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.g354-game-card {
    background: var(--g354-bg-light);
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--g354-border);
}

.g354-game-card:hover {
    transform: translateY(-3px);
    border-color: var(--g354-primary);
    box-shadow: 0 4px 15px rgba(205, 133, 63, 0.3);
}

.g354-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.g354-game-name {
    padding: 0.5rem;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--g354-text);
}

/* Features Grid */
.g354-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.g354-feature-card {
    background: var(--g354-bg-light);
    border-radius: 1rem;
    padding: 1.2rem;
    text-align: center;
    border: 1px solid var(--g354-border);
    transition: all 0.3s ease;
}

.g354-feature-card:hover {
    border-color: var(--g354-primary);
}

.g354-feature-icon {
    font-size: 2.4rem;
    color: var(--g354-primary);
    margin-bottom: 0.6rem;
}

.g354-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.g354-feature-desc {
    font-size: 1rem;
    color: var(--g354-text-muted);
    line-height: 1.4;
}

/* Content Box */
.g354-content-box {
    background: var(--g354-bg-light);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--g354-border);
    margin-bottom: 1.5rem;
}

.g354-content-box h2 {
    font-size: 1.6rem;
    color: var(--g354-primary);
    margin-bottom: 1rem;
}

.g354-content-box p {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--g354-text);
    margin-bottom: 1rem;
}

.g354-content-box ul {
    list-style: none;
    padding-left: 0;
}

.g354-content-box li {
    padding: 0.6rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.3rem;
}

.g354-content-box li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--g354-accent);
}

/* Promo Link */
.g354-promo-link {
    color: var(--g354-primary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.g354-promo-link:hover {
    color: var(--g354-secondary);
    text-decoration: underline;
}

/* Footer */
.g354-footer {
    background: var(--g354-bg-light);
    padding: 2rem 0;
    border-top: 1px solid var(--g354-border);
}

.g354-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.g354-footer-link {
    color: var(--g354-text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
    transition: color 0.3s ease;
}

.g354-footer-link:hover {
    color: var(--g354-primary);
}

.g354-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.g354-partner-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.g354-partner-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

.g354-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: var(--g354-text-muted);
}

/* Bottom Navigation */
.g354-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(15, 15, 35, 0.98) 0%, var(--g354-bg) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    border-top: 1px solid var(--g354-border);
    padding-bottom: env(safe-area-inset-bottom);
}

.g354-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    background: none;
    border: none;
    color: var(--g354-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.g354-nav-btn:hover,
.g354-nav-btn-active {
    color: var(--g354-primary);
    transform: scale(1.1);
}

.g354-nav-btn i,
.g354-nav-btn .material-icons {
    font-size: 24px;
    margin-bottom: 2px;
}

.g354-nav-btn ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.g354-nav-btn span {
    font-size: 10px;
    font-weight: 500;
}

/* Utility Classes */
.g354-text-center {
    text-align: center;
}

.g354-mt-1 {
    margin-top: 1rem;
}

.g354-mb-1 {
    margin-bottom: 1rem;
}

.g354-hidden {
    display: none;
}

/* Desktop Hide */
@media (min-width: 769px) {
    .g354-bottom-nav {
        display: none;
    }

    .g354-container {
        max-width: 768px;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .g354-main {
        padding-bottom: 80px;
    }
}

/* Animation */
@keyframes g354-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.g354-animate-pulse {
    animation: g354-pulse 2s infinite;
}

/* H1 Title */
.g354-h1-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 1.5rem 0;
    background: var(--g354-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* FAQ Section */
.g354-faq-item {
    background: var(--g354-bg-light);
    border-radius: 0.8rem;
    margin-bottom: 0.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--g354-border);
}

.g354-faq-q {
    font-weight: 600;
    color: var(--g354-primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.g354-faq-a {
    color: var(--g354-text);
    font-size: 1.2rem;
    line-height: 1.5;
}

/* RTP Table */
.g354-rtp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.2rem;
}

.g354-rtp-table th,
.g354-rtp-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--g354-border);
}

.g354-rtp-table th {
    color: var(--g354-primary);
    font-weight: 600;
}

.g354-rtp-value {
    color: var(--g354-accent);
    font-weight: 600;
}
