/**
 * PHGames Layout Stylesheet
 * All classes use prefix 'v8e2-' for namespace isolation
 * Mobile-first responsive design with max-width 430px
 * Color palette: #9AFF9A | #4169E1 | #006400 | #2E4057 | #ADFF2F
 * Version: 1.0.0
 */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    --v8e2-primary: #4169E1;
    --v8e2-primary-light: #6495ED;
    --v8e2-secondary: #9AFF9A;
    --v8e2-accent: #ADFF2F;
    --v8e2-dark: #2E4057;
    --v8e2-darker: #006400;
    --v8e2-bg-dark: #1a2634;
    --v8e2-bg-darker: #0f1620;
    --v8e2-text-light: #9AFF9A;
    --v8e2-text-muted: #8BA3B8;
    --v8e2-white: #FFFFFF;
    --v8e2-border: #3d5a80;
    --v8e2-shadow: rgba(0, 0, 0, 0.3);
    --v8e2-success: #4CAF50;
    --v8e2-warning: #FF9800;
    --v8e2-error: #f44336;
    --v8e2-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --v8e2-border-radius: 8px;
    --v8e2-border-radius-lg: 16px;
    --v8e2-transition: all 0.3s ease;
}

/* ============================================
   Base Styles - Mobile First
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--v8e2-font-family);
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--v8e2-text-light);
    background-color: var(--v8e2-bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--v8e2-white);
}

h1 {
    font-size: 2.4rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.6rem;
}

p {
    margin-bottom: 1rem;
    color: var(--v8e2-text-light);
}

a {
    color: var(--v8e2-secondary);
    text-decoration: none;
    transition: var(--v8e2-transition);
}

a:hover {
    color: var(--v8e2-accent);
}

/* ============================================
   Layout Components
   ============================================ */
.v8e2-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.6rem;
}

.v8e2-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.v8e2-main {
    flex: 1;
    padding-bottom: 80px;
}

.v8e2-section {
    padding: 2.4rem 0;
}

/* ============================================
   Header & Navigation
   ============================================ */
.v8e2-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--v8e2-bg-darker) 0%, var(--v8e2-bg-dark) 100%);
    border-bottom: 1px solid var(--v8e2-border);
    padding: 1rem 1.6rem;
}

.v8e2-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 430px;
    margin: 0 auto;
}

.v8e2-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.v8e2-logo-icon {
    width: 32px;
    height: 32px;
}

.v8e2-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v8e2-secondary);
    letter-spacing: -0.5px;
}

.v8e2-header-buttons {
    display: flex;
    gap: 0.8rem;
}

.v8e2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: var(--v8e2-border-radius);
    font-weight: 600;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--v8e2-transition);
    border: none;
    min-height: 44px;
    min-width: 44px;
}

.v8e2-btn-primary {
    background: linear-gradient(135deg, var(--v8e2-primary) 0%, var(--v8e2-primary-light) 100%);
    color: var(--v8e2-white);
}

.v8e2-btn-primary:hover {
    background: linear-gradient(135deg, var(--v8e2-primary-light) 0%, var(--v8e2-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(65, 105, 225, 0.4);
}

.v8e2-btn-secondary {
    background: transparent;
    border: 2px solid var(--v8e2-primary);
    color: var(--v8e2-primary);
}

.v8e2-btn-secondary:hover {
    background: var(--v8e2-primary);
    color: var(--v8e2-white);
}

.v8e2-btn-accent {
    background: linear-gradient(135deg, var(--v8e2-accent) 0%, var(--v8e2-secondary) 100%);
    color: var(--v8e2-dark);
}

.v8e2-btn-accent:hover {
    background: linear-gradient(135deg, var(--v8e2-secondary) 0%, var(--v8e2-accent) 100%);
    transform: translateY(-2px);
}

.v8e2-btn-text {
    padding: 0.8rem 1.2rem;
    font-size: 1.3rem;
}

/* Mobile Menu Toggle */
.v8e2-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.8rem;
}

.v8e2-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--v8e2-text-light);
    margin: 3px 0;
    transition: var(--v8e2-transition);
    border-radius: 2px;
}

.v8e2-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.v8e2-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.v8e2-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Mobile Menu Overlay
   ============================================ */
.v8e2-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--v8e2-transition);
}

.v8e2-overlay-active {
    opacity: 1;
    visibility: visible;
}

.v8e2-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--v8e2-bg-darker);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.v8e2-menu-active {
    right: 0;
}

.v8e2-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem;
    border-bottom: 1px solid var(--v8e2-border);
}

.v8e2-menu-close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--v8e2-text-light);
    font-size: 2.4rem;
    cursor: pointer;
}

.v8e2-menu-nav {
    padding: 1.6rem;
}

.v8e2-nav-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1rem;
    color: var(--v8e2-text-light);
    border-radius: var(--v8e2-border-radius);
    margin-bottom: 0.4rem;
    transition: var(--v8e2-transition);
    cursor: pointer;
}

.v8e2-nav-item:hover {
    background: rgba(154, 255, 154, 0.1);
    color: var(--v8e2-secondary);
}

.v8e2-nav-icon {
    width: 24px;
    height: 24px;
    margin-right: 1rem;
    font-size: 1.8rem;
}

/* ============================================
   Hero/Carousel Section
   ============================================ */
.v8e2-hero {
    padding-top: 7rem;
}

.v8e2-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--v8e2-border-radius-lg);
    margin-bottom: 2rem;
}

.v8e2-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.v8e2-carousel-item {
    min-width: 100%;
    flex-shrink: 0;
}

.v8e2-carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

.v8e2-carousel-item a {
    display: block;
}

.v8e2-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.v8e2-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--v8e2-border);
    cursor: pointer;
    transition: var(--v8e2-transition);
}

.v8e2-dot.active {
    background: var(--v8e2-secondary);
    width: 24px;
    border-radius: 10px;
}

/* ============================================
   Game Cards Grid
   ============================================ */
.v8e2-game-section {
    padding: 2rem 0;
}

.v8e2-section-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--v8e2-border);
}

.v8e2-section-title h2 {
    margin: 0;
    font-size: 1.8rem;
}

.v8e2-section-icon {
    font-size: 2rem;
}

.v8e2-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.v8e2-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem;
    background: var(--v8e2-bg-darker);
    border-radius: var(--v8e2-border-radius);
    transition: var(--v8e2-transition);
    cursor: pointer;
    text-align: center;
}

.v8e2-game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--v8e2-shadow);
}

.v8e2-game-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--v8e2-border-radius);
    object-fit: cover;
    margin-bottom: 0.6rem;
}

.v8e2-game-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--v8e2-text-light);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.6rem;
}

/* ============================================
   Content Cards & Sections
   ============================================ */
.v8e2-card {
    background: linear-gradient(145deg, var(--v8e2-bg-darker) 0%, var(--v8e2-bg-dark) 100%);
    border-radius: var(--v8e2-border-radius-lg);
    padding: 2rem;
    margin-bottom: 1.6rem;
    border: 1px solid var(--v8e2-border);
}

.v8e2-card-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    font-size: 1.6rem;
    color: var(--v8e2-secondary);
}

.v8e2-card-content {
    color: var(--v8e2-text-light);
    font-size: 1.4rem;
    line-height: 1.7;
}

.v8e2-card-content ul {
    list-style: none;
    padding: 0;
}

.v8e2-card-content li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--v8e2-border);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.v8e2-card-content li:last-child {
    border-bottom: none;
}

/* ============================================
   FAQ Section
   ============================================ */
.v8e2-faq-item {
    background: var(--v8e2-bg-darker);
    border-radius: var(--v8e2-border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--v8e2-border);
}

.v8e2-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.6rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--v8e2-text-light);
    transition: var(--v8e2-transition);
}

.v8e2-faq-question:hover {
    color: var(--v8e2-secondary);
}

.v8e2-faq-icon {
    font-size: 1.6rem;
    transition: var(--v8e2-transition);
}

.v8e2-faq-item.active .v8e2-faq-icon {
    transform: rotate(180deg);
}

.v8e2-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.6rem;
}

.v8e2-faq-item.active .v8e2-faq-answer {
    max-height: 500px;
    padding: 0 1.6rem 1.2rem;
}

/* ============================================
   RTP Analysis Section
   ============================================ */
.v8e2-rtp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.2rem;
}

.v8e2-rtp-item {
    background: var(--v8e2-bg-dark);
    padding: 1.2rem;
    border-radius: var(--v8e2-border-radius);
    text-align: center;
    border: 1px solid var(--v8e2-border);
}

.v8e2-rtp-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--v8e2-accent);
}

.v8e2-rtp-label {
    font-size: 1.2rem;
    color: var(--v8e2-text-muted);
    margin-top: 0.4rem;
}

/* ============================================
   Features Section
   ============================================ */
.v8e2-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.v8e2-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.6rem 1rem;
    background: var(--v8e2-bg-darker);
    border-radius: var(--v8e2-border-radius);
    text-align: center;
    transition: var(--v8e2-transition);
    border: 1px solid var(--v8e2-border);
}

.v8e2-feature-item:hover {
    transform: translateY(-4px);
    border-color: var(--v8e2-primary);
}

.v8e2-feature-icon {
    width: 48px;
    height: 48px;
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
}

.v8e2-feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--v8e2-text-light);
    margin-bottom: 0.4rem;
}

.v8e2-feature-desc {
    font-size: 1.1rem;
    color: var(--v8e2-text-muted);
    line-height: 1.4;
}

/* ============================================
   Security & Trust Section
   ============================================ */
.v8e2-trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin-top: 1.6rem;
}

.v8e2-trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
}

.v8e2-trust-icon {
    width: 40px;
    height: 40px;
    font-size: 2.4rem;
    color: var(--v8e2-secondary);
}

.v8e2-trust-text {
    font-size: 1.1rem;
    color: var(--v8e2-text-muted);
    text-align: center;
}

/* ============================================
   Promotional Banner
   ============================================ */
.v8e2-promo-banner {
    background: linear-gradient(135deg, var(--v8e2-darker) 0%, var(--v8e2-dark) 100%);
    border-radius: var(--v8e2-border-radius-lg);
    padding: 2.4rem;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid var(--v8e2-accent);
    position: relative;
    overflow: hidden;
}

.v8e2-promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(173, 255, 47, 0.1) 0%, transparent 60%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.v8e2-promo-title {
    font-size: 2rem;
    color: var(--v8e2-accent);
    margin-bottom: 0.8rem;
    position: relative;
}

.v8e2-promo-text {
    font-size: 1.4rem;
    color: var(--v8e2-text-light);
    margin-bottom: 1.6rem;
    position: relative;
}

/* ============================================
   Bottom Navigation (Mobile)
   ============================================ */
.v8e2-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--v8e2-bg-darker) 0%, var(--v8e2-bg-dark) 100%);
    border-top: 1px solid var(--v8e2-border);
    padding: 0.8rem 0.4rem;
    display: none;
}

.v8e2-bottom-nav.active {
    display: flex;
}

.v8e2-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.4rem;
    min-width: 60px;
    min-height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--v8e2-transition);
    position: relative;
}

.v8e2-nav-btn:hover {
    background: rgba(154, 255, 154, 0.1);
}

.v8e2-nav-btn.active {
    color: var(--v8e2-secondary);
}

.v8e2-nav-btn i {
    font-size: 2.2rem;
    margin-bottom: 0.4rem;
}

.v8e2-nav-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--v8e2-text-muted);
    text-align: center;
}

.v8e2-nav-btn.active .v8e2-nav-label {
    color: var(--v8e2-secondary);
}

.v8e2-nav-badge {
    position: absolute;
    top: 4px;
    right: 20%;
    background: var(--v8e2-error);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.v8e2-footer {
    background: var(--v8e2-bg-darker);
    padding: 3rem 1.6rem 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--v8e2-border);
}

.v8e2-footer-content {
    max-width: 430px;
    margin: 0 auto;
}

.v8e2-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.v8e2-footer-link {
    font-size: 1.3rem;
    color: var(--v8e2-text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--v8e2-border-radius);
    transition: var(--v8e2-transition);
}

.v8e2-footer-link:hover {
    color: var(--v8e2-secondary);
    background: rgba(154, 255, 154, 0.1);
}

.v8e2-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.v8e2-partner-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--v8e2-border-radius);
    background: var(--v8e2-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--v8e2-text-muted);
    border: 1px solid var(--v8e2-border);
}

.v8e2-copyright {
    text-align: center;
    padding-top: 1.6rem;
    border-top: 1px solid var(--v8e2-border);
    font-size: 1.2rem;
    color: var(--v8e2-text-muted);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .v8e2-main {
        padding-bottom: 80px;
    }

    .v8e2-bottom-nav {
        display: flex;
    }

    .v8e2-games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .v8e2-game-icon {
        width: 48px;
        height: 48px;
    }
}

@media (min-width: 769px) {
    .v8e2-bottom-nav {
        display: none;
    }

    .v8e2-container {
        max-width: 1200px;
    }

    .v8e2-header-inner {
        max-width: 1200px;
    }

    .v8e2-main {
        padding-bottom: 0;
    }

    .v8e2-games-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 1rem;
    }

    .v8e2-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .v8e2-footer-content {
        max-width: 1200px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.v8e2-text-center {
    text-align: center;
}

.v8e2-text-left {
    text-align: left;
}

.v8e2-text-right {
    text-align: right;
}

.v8e2-mt-1 {
    margin-top: 0.8rem;
}

.v8e2-mt-2 {
    margin-top: 1.6rem;
}

.v8e2-mt-3 {
    margin-top: 2.4rem;
}

.v8e2-mb-1 {
    margin-bottom: 0.8rem;
}

.v8e2-mb-2 {
    margin-bottom: 1.6rem;
}

.v8e2-mb-3 {
    margin-bottom: 2.4rem;
}

.v8e2-p-1 {
    padding: 0.8rem;
}

.v8e2-p-2 {
    padding: 1.6rem;
}

.v8e2-p-3 {
    padding: 2.4rem;
}

.v8e2-hidden {
    display: none !important;
}

.v8e2-visible {
    display: block !important;
}

.v8e2-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation Classes */
.v8e2-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.v8e2-slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Icon styles from multiple libraries */
.v8e2-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    font-style: normal;
}

/* Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Font Awesome */
.fa, .fas, .far, .fad {
    font-family: 'Font Awesome 6';
    font-style: normal;
    font-weight: normal;
    display: inline-block;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Bootstrap Icons */
.bi {
    font-family: 'bootstrap-icons';
    font-size: 1em;
    vertical-align: -0.125em;
}

/* Ionicons */
.ionicon {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Tabler Icons */
.tabler-icon {
    width: 1em;
    height: 1em;
    stroke-width: 1.5;
    stroke: currentColor;
    fill: none;
}
