/**
 * jiliee CSS Layout Stylesheet
 * All classes use w8248 prefix for namespace isolation
 */

/* CSS Variables */
:root {
    --w8248-primary: #98FB98;
    --w8248-secondary: #B03060;
    --w8248-accent: #8FBC8F;
    --w8248-highlight: #FF4500;
    --w8248-dark: #1C2833;
    --w8248-darker: #0f171e;
    --w8248-light: #f5f5f5;
    --w8248-white: #ffffff;
    --w8248-text: #333333;
    --w8248-text-light: #666666;
    --w8248-border: #e0e0e0;
    --w8248-shadow: rgba(0, 0, 0, 0.1);
    --w8248-gradient: linear-gradient(135deg, var(--w8248-primary) 0%, var(--w8248-accent) 100%);
    --w8248-header-height: 60px;
    --w8248-bottom-nav-height: 60px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--w8248-text);
    background-color: var(--w8248-light);
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: var(--w8248-bottom-nav-height);
}

@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }
}

/* Container */
.w8248-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
    background-color: var(--w8248-white);
}

/* Header */
.w8248-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--w8248-header-height);
    background: linear-gradient(135deg, var(--w8248-dark) 0%, var(--w8248-darker) 100%);
    box-shadow: 0 2px 10px var(--w8248-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.w8248-header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.w8248-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.w8248-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--w8248-white);
    font-weight: 700;
    font-size: 1.4rem;
}

.w8248-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.w8248-header-buttons {
    display: flex;
    gap: 0.5rem;
}

.w8248-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}

.w8248-btn-register {
    background: var(--w8248-secondary);
    color: var(--w8248-white);
}

.w8248-btn-register:hover {
    background: #a02855;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(176, 48, 96, 0.4);
}

.w8248-btn-login {
    background: transparent;
    color: var(--w8248-primary);
    border: 2px solid var(--w8248-primary);
}

.w8248-btn-login:hover {
    background: var(--w8248-primary);
    color: var(--w8248-dark);
}

.w8248-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.w8248-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--w8248-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.w8248-mobile-menu {
    position: fixed;
    top: var(--w8248-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--w8248-darker);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 1rem 0;
}

.w8248-mobile-menu.w8248-menu-open {
    transform: translateX(0);
}

.w8248-menu-list {
    list-style: none;
    padding: 0 1rem;
}

.w8248-menu-item {
    margin-bottom: 0.5rem;
}

.w8248-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--w8248-white);
    text-decoration: none;
    font-size: 1.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.w8248-menu-link:hover {
    background-color: rgba(152, 251, 152, 0.1);
}

.w8248-menu-link i {
    font-size: 1.8rem;
    color: var(--w8248-primary);
}

/* Main Content */
.w8248-main {
    margin-top: var(--w8248-header-height);
    padding: 1.5rem 0;
    min-height: calc(100vh - var(--w8248-header-height) - var(--w8248-bottom-nav-height));
}

/* Hero Carousel */
.w8248-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.w8248-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.w8248-carousel-slide.w8248-slide-active {
    opacity: 1;
    z-index: 1;
}

.w8248-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.w8248-carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.w8248-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.w8248-carousel-indicator.w8248-indicator-active {
    background-color: var(--w8248-primary);
    width: 24px;
    border-radius: 4px;
}

/* Section Styles */
.w8248-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--w8248-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--w8248-shadow);
}

.w8248-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--w8248-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--w8248-primary);
}

.w8248-section-content {
    color: var(--w8248-text-light);
    line-height: 1.6;
}

/* Game Grid */
.w8248-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.w8248-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.w8248-game-item:hover {
    transform: scale(1.05);
}

.w8248-game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 6px var(--w8248-shadow);
}

.w8248-game-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--w8248-text);
    text-align: center;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.w8248-game-item:hover .w8248-game-name {
    color: var(--w8248-secondary);
}

/* Category Section */
.w8248-category {
    margin-bottom: 2rem;
}

.w8248-category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--w8248-dark);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--w8248-gradient);
    border-radius: 8px;
    color: var(--w8248-dark);
}

.w8248-category-title i {
    color: var(--w8248-secondary);
}

/* Card Styles */
.w8248-card {
    background-color: var(--w8248-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--w8248-shadow);
    transition: all 0.3s ease;
}

.w8248-card:hover {
    box-shadow: 0 4px 16px var(--w8248-shadow);
    transform: translateY(-2px);
}

.w8248-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--w8248-dark);
    margin-bottom: 0.75rem;
}

.w8248-card-content {
    color: var(--w8248-text-light);
    line-height: 1.6;
}

/* Link Styles */
.w8248-link {
    color: var(--w8248-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.w8248-link:hover {
    color: var(--w8248-highlight);
    text-decoration: underline;
}

/* Bottom Navigation */
.w8248-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--w8248-bottom-nav-height);
    background: linear-gradient(180deg, var(--w8248-dark) 0%, var(--w8248-darker) 100%);
    box-shadow: 0 -2px 10px var(--w8248-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

@media (min-width: 769px) {
    .w8248-bottom-nav {
        display: none;
    }
}

.w8248-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.5rem;
}

.w8248-nav-item:hover,
.w8248-nav-item.w8248-nav-active {
    color: var(--w8248-primary);
    transform: scale(1.1);
}

.w8248-nav-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w8248-nav-text {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}

/* Footer */
.w8248-footer {
    background-color: var(--w8248-dark);
    color: var(--w8248-white);
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.w8248-footer-content {
    margin-bottom: 1.5rem;
}

.w8248-footer-description {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.w8248-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.w8248-footer-link {
    color: var(--w8248-primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.w8248-footer-link:hover {
    color: var(--w8248-secondary);
}

.w8248-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.w8248-partner-logo {
    height: 30px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.w8248-partner-logo:hover {
    opacity: 1;
}

.w8248-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.w8248-text-center {
    text-align: center;
}

.w8248-mt-1 { margin-top: 1rem; }
.w8248-mt-2 { margin-top: 2rem; }
.w8248-mb-1 { margin-bottom: 1rem; }
.w8248-mb-2 { margin-bottom: 2rem; }

.w8248-p-1 { padding: 1rem; }
.w8248-p-2 { padding: 2rem; }

/* Responsive */
@media (min-width: 769px) {
    .w8248-container {
        max-width: 1200px;
    }

    .w8248-game-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .w8248-main {
        min-height: calc(100vh - var(--w8248-header-height));
    }
}

/* Animations */
@keyframes w8248-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.w8248-fade-in {
    animation: w8248-fadeIn 0.5s ease forwards;
}

/* Loading State */
body:not(.w8248-loaded) .w8248-carousel,
body:not(.w8248-loaded) .w8248-game-grid {
    opacity: 0;
}

body.w8248-loaded .w8248-carousel,
body.w8248-loaded .w8248-game-grid {
    animation: w8248-fadeIn 0.5s ease forwards;
}
