/**
 * P7777 Website Theme Stylesheet
 * @description Mobile-first responsive design for p7777 casino platform
 * @version 1.0.0
 * @prefix w688e-
 */

/* ============================================
   CSS Variables & Root Configuration
   ============================================ */
:root {
    /* Color Palette - Deep Ocean Theme */
    --w688e-primary: #8B7355;
    --w688e-secondary: #D3D3D3;
    --w688e-accent: #C9A962;
    --w688e-bg-dark: #2E4057;
    --w688e-bg-darker: #1a2a3a;
    --w688e-bg-card: #3C3C3C;
    --w688e-text-light: #D3D3D3;
    --w688e-text-muted: #9CA3AF;
    --w688e-border: rgba(139, 115, 85, 0.3);
    --w688e-success: #22C55E;
    --w688e-warning: #F59E0B;
    --w688e-danger: #EF4444;

    /* Typography */
    --w688e-font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --w688e-font-heading: 'Poppins', 'Segoe UI', sans-serif;

    /* Spacing */
    --w688e-space-xs: 0.4rem;
    --w688e-space-sm: 0.8rem;
    --w688e-space-md: 1.2rem;
    --w688e-space-lg: 1.6rem;
    --w688e-space-xl: 2.4rem;

    /* Border Radius */
    --w688e-radius-sm: 0.4rem;
    --w688e-radius-md: 0.8rem;
    --w688e-radius-lg: 1.2rem;
    --w688e-radius-full: 50%;

    /* Shadows */
    --w688e-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --w688e-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --w688e-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    /* Transitions */
    --w688e-transition-fast: 0.15s ease;
    --w688e-transition-normal: 0.3s ease;
    --w688e-transition-slow: 0.5s ease;
}

/* Base font sizing (62.5% = 10px base for rem units) */
html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--w688e-font-main);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--w688e-text-light);
    background: linear-gradient(180deg, var(--w688e-bg-dark) 0%, var(--w688e-bg-darker) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Layout Components
   ============================================ */
.w688e-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 var(--w688e-space-sm);
}

.w688e-wrapper {
    padding: var(--w688e-space-md) 0;
}

.w688e-section {
    padding: var(--w688e-space-lg) 0;
}

.w688e-grid {
    display: grid;
    gap: var(--w688e-space-sm);
}

.w688e-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.w688e-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.w688e-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Header & Navigation
   ============================================ */
.w688e-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--w688e-bg-darker) 0%, rgba(30, 42, 57, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--w688e-border);
    transition: var(--w688e-transition-normal);
}

.w688e-header-scrolled {
    box-shadow: var(--w688e-shadow-md);
}

.w688e-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--w688e-space-sm) var(--w688e-space-md);
    max-width: 430px;
    margin: 0 auto;
}

.w688e-logo {
    display: flex;
    align-items: center;
    gap: var(--w688e-space-xs);
}

.w688e-logo img {
    width: 28px;
    height: 28px;
    border-radius: var(--w688e-radius-sm);
}

.w688e-logo-text {
    font-family: var(--w688e-font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--w688e-accent);
    letter-spacing: 1px;
}

.w688e-header-actions {
    display: flex;
    align-items: center;
    gap: var(--w688e-space-xs);
}

.w688e-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--w688e-space-xs);
    padding: var(--w688e-space-xs) var(--w688e-space-sm);
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: var(--w688e-radius-md);
    cursor: pointer;
    transition: var(--w688e-transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.w688e-btn-primary {
    background: linear-gradient(135deg, var(--w688e-primary) 0%, #A08060 100%);
    color: var(--w688e-text-light);
}

.w688e-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
}

.w688e-btn-secondary {
    background: transparent;
    color: var(--w688e-accent);
    border: 1px solid var(--w688e-accent);
}

.w688e-btn-secondary:hover {
    background: rgba(201, 169, 98, 0.1);
}

.w688e-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--w688e-text-light);
    cursor: pointer;
    border-radius: var(--w688e-radius-sm);
}

.w688e-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.w688e-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--w688e-bg-darker);
    z-index: 9999;
    transition: var(--w688e-transition-normal);
    overflow-y: auto;
    padding: var(--w688e-space-lg) var(--w688e-space-md);
}

.w688e-mobile-menu.site8ed-menu-active {
    right: 0;
}

.w688e-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--w688e-transition-normal);
}

.w688e-menu-overlay.site8ed-overlay-active {
    opacity: 1;
    visibility: visible;
}

.w688e-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--w688e-space-lg);
    padding-bottom: var(--w688e-space-md);
    border-bottom: 1px solid var(--w688e-border);
}

.w688e-menu-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--w688e-radius-full);
    color: var(--w688e-text-light);
    cursor: pointer;
}

.w688e-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.w688e-nav-item {
    margin-bottom: var(--w688e-space-xs);
}

.w688e-nav-link {
    display: block;
    padding: var(--w688e-space-sm) var(--w688e-space-md);
    color: var(--w688e-text-light);
    text-decoration: none;
    border-radius: var(--w688e-radius-sm);
    transition: var(--w688e-transition-fast);
}

.w688e-nav-link:hover {
    background: rgba(139, 115, 85, 0.2);
    color: var(--w688e-accent);
}

/* ============================================
   Main Content Area
   ============================================ */
.w688e-main {
    padding-top: 60px;
    padding-bottom: var(--w688e-space-lg);
}

@media (max-width: 768px) {
    .w688e-main {
        padding-bottom: 80px;
    }
}

/* ============================================
   Carousel / Slider
   ============================================ */
.w688e-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--w688e-radius-md);
    margin-bottom: var(--w688e-space-md);
}

.w688e-slide {
    display: none;
    cursor: pointer;
}

.w688e-slide:first-child {
    display: block;
}

.w688e-slide img {
    width: 100%;
    height: auto;
    border-radius: var(--w688e-radius-md);
}

.w688e-carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--w688e-space-xs);
}

.w688e-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--w688e-radius-full);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--w688e-transition-fast);
}

.w688e-dot.site8ed-dot-active,
.w688e-dot:hover {
    background: var(--w688e-accent);
}

/* ============================================
   Game Cards & Grid
   ============================================ */
.w688e-game-section {
    margin-bottom: var(--w688e-space-lg);
}

.w688e-section-title {
    font-family: var(--w688e-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--w688e-accent);
    margin-bottom: var(--w688e-space-md);
    padding-left: var(--w688e-space-sm);
    border-left: 3px solid var(--w688e-primary);
}

.w688e-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--w688e-space-xs);
}

.w688e-game-card {
    background: var(--w688e-bg-card);
    border-radius: var(--w688e-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--w688e-transition-fast);
    border: 1px solid transparent;
}

.w688e-game-card:hover {
    transform: translateY(-2px);
    border-color: var(--w688e-primary);
    box-shadow: var(--w688e-shadow-md);
}

.w688e-game-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.w688e-game-name {
    font-size: 1rem;
    color: var(--w688e-text-light);
    text-align: center;
    padding: var(--w688e-space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Content Sections
   ============================================ */
.w688e-content-block {
    background: var(--w688e-bg-card);
    border-radius: var(--w688e-radius-lg);
    padding: var(--w688e-space-md);
    margin-bottom: var(--w688e-space-md);
    border: 1px solid var(--w688e-border);
}

.w688e-content-title {
    font-family: var(--w688e-font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--w688e-accent);
    margin-bottom: var(--w688e-space-sm);
}

.w688e-content-text {
    color: var(--w688e-text-light);
    line-height: 1.6;
    margin-bottom: var(--w688e-space-sm);
}

.w688e-content-text:last-child {
    margin-bottom: 0;
}

.w688e-link-text {
    color: var(--w688e-primary);
    text-decoration: underline;
    cursor: pointer;
}

.w688e-link-text:hover {
    color: var(--w688e-accent);
}

/* ============================================
   Promo Links & CTAs
   ============================================ */
.w688e-promo-link {
    display: inline-block;
    color: var(--w688e-accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--w688e-transition-fast);
}

.w688e-promo-link:hover {
    color: var(--w688e-primary);
    text-decoration: underline;
}

.w688e-cta-btn {
    display: block;
    width: 100%;
    padding: var(--w688e-space-md);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, var(--w688e-primary) 0%, var(--w688e-accent) 100%);
    color: var(--w688e-bg-darker);
    border: none;
    border-radius: var(--w688e-radius-md);
    cursor: pointer;
    transition: var(--w688e-transition-fast);
    margin: var(--w688e-space-md) 0;
}

.w688e-cta-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.3);
}

/* ============================================
   Footer
   ============================================ */
.w688e-footer {
    background: var(--w688e-bg-darker);
    border-top: 1px solid var(--w688e-border);
    padding: var(--w688e-space-lg) var(--w688e-space-md);
    margin-top: var(--w688e-space-lg);
}

.w688e-footer-brand {
    text-align: center;
    margin-bottom: var(--w688e-space-md);
}

.w688e-footer-brand p {
    color: var(--w688e-text-muted);
    font-size: 1.2rem;
    line-height: 1.6;
}

.w688e-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--w688e-space-xs);
    margin-bottom: var(--w688e-space-md);
}

.w688e-footer-link {
    color: var(--w688e-text-light);
    text-decoration: none;
    font-size: 1.1rem;
    padding: var(--w688e-space-xs) var(--w688e-space-sm);
    border-radius: var(--w688e-radius-sm);
    transition: var(--w688e-transition-fast);
}

.w688e-footer-link:hover {
    background: rgba(139, 115, 85, 0.2);
    color: var(--w688e-accent);
}

.w688e-footer-promo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--w688e-space-xs);
    margin-bottom: var(--w688e-space-md);
}

.w688e-footer-promo .w688e-btn {
    flex: 0 0 calc(33.333% - 4px);
    font-size: 1rem;
    padding: var(--w688e-space-xs);
}

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

/* ============================================
   Mobile Bottom Navigation
   ============================================ */
.w688e-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(46, 64, 87, 0.98) 0%, rgba(26, 42, 58, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--w688e-border);
    padding: var(--w688e-space-xs) 0;
}

.w688e-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.w688e-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 52px;
    padding: var(--w688e-space-xs);
    color: var(--w688e-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: var(--w688e-transition-fast);
    border-radius: var(--w688e-radius-md);
}

.w688e-bottom-nav-item:hover,
.w688e-bottom-nav-item.active {
    color: var(--w688e-accent);
    background: rgba(201, 169, 98, 0.1);
}

.w688e-bottom-nav-item i,
.w688e-bottom-nav-item .material-icons {
    font-size: 22px;
    margin-bottom: 2px;
}

.w688e-bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .w688e-bottom-nav {
        display: none;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.w688e-text-center {
    text-align: center;
}

.w688e-text-left {
    text-align: left;
}

.w688e-text-right {
    text-align: right;
}

.w688e-mb-sm {
    margin-bottom: var(--w688e-space-sm);
}

.w688e-mb-md {
    margin-bottom: var(--w688e-space-md);
}

.w688e-mb-lg {
    margin-bottom: var(--w688e-space-lg);
}

.w688e-hidden {
    display: none !important;
}

.w688e-visible {
    display: block !important;
}

/* ============================================
   Toast Notifications
   ============================================ */
.site8ed-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--w688e-bg-card);
    color: var(--w688e-text-light);
    padding: var(--w688e-space-sm) var(--w688e-space-md);
    border-radius: var(--w688e-radius-md);
    box-shadow: var(--w688e-shadow-lg);
    opacity: 0;
    transition: var(--w688e-transition-normal);
    z-index: 10000;
}

.site8ed-toast.site8ed-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 360px) {
    .w688e-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .w688e-btn {
        padding: var(--w688e-space-xs);
        font-size: 1.1rem;
    }
}

@media (min-width: 431px) and (max-width: 768px) {
    .w688e-container {
        max-width: 430px;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .w688e-container {
        max-width: 800px;
    }

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