/* Win2Max CSS Design System - Part 1 */
/* All classes use w8640- prefix for namespace isolation */

/* CSS Variables */
:root {
    /* Color palette */
    --w8640-primary: #FF1493;
    --w8640-secondary: #E91E63;
    --w8640-accent: #20B2AA;
    --w8640-bg: #262626;
    --w8640-text: #C9C9FF;
    --w8640-white: #FFFFFF;
    --w8640-gray: #9CA3AF;
    --w8640-dark: #1A1A1A;
    --w8640-gradient: linear-gradient(135deg, #FF1493 0%, #E91E63 100%);

    /* Spacing */
    --w8640-container: 430px;
    --w8640-padding: 1rem;
    --w8640-radius: 0.5rem;
    --w8640-radius-lg: 1rem;

    /* Typography */
    --w8640-font-size: 1.6rem;
    --w8640-line-height: 1.5;

    /* Z-index layers */
    --w8640-z-header: 1000;
    --w8640-z-nav: 1000;
    --w8640-z-overlay: 9999;
    --w8640-z-modal: 10000;
}

/* Reset and base styles */
* {
    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, Ubuntu, Cantarell, sans-serif;
    font-size: var(--w8640-font-size);
    line-height: var(--w8640-line-height);
    background-color: var(--w8640-bg);
    color: var(--w8640-text);
    overflow-x: hidden;
}

/* Container */
.w8640-container {
    max-width: var(--w8640-container);
    margin: 0 auto;
    padding: 0 var(--w8640-padding);
}

.w8640-wrapper {
    width: 100%;
    position: relative;
}

/* Header */
.w8640-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--w8640-z-header);
    background: var(--w8640-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.w8640-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--w8640-padding);
    height: 60px;
}

.w8640-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--w8640-primary);
    text-decoration: none;
}

.w8640-logo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.w8640-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.w8640-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    border: none;
    border-radius: var(--w8640-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 44px;
    touch-action: manipulation;
}

.w8640-btn-primary {
    background: var(--w8640-gradient);
    color: var(--w8640-white);
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.3);
}

.w8640-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 20, 147, 0.4);
}

.w8640-btn-secondary {
    background: transparent;
    color: var(--w8640-primary);
    border: 2px solid var(--w8640-primary);
}

.w8640-btn-secondary:hover {
    background: var(--w8640-primary);
    color: var(--w8640-white);
}

.w8640-btn-menu {
    background: transparent;
    color: var(--w8640-text);
    border: none;
    padding: 0.5rem;
    font-size: 2rem;
}

/* Navigation */
.w8640-nav {
    display: none;
}

.w8640-nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.w8640-nav-item a {
    color: var(--w8640-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.w8640-nav-item a:hover,
.w8640-nav-item a.active {
    color: var(--w8640-primary);
}

.w8640-nav-item a.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--w8640-primary);
}

/* Mobile Menu */
.w8640-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--w8640-dark);
    z-index: var(--w8640-z-overlay);
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.w8640-mobile-menu.active {
    right: 0;
}

.w8640-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--w8640-z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.w8640-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.w8640-mobile-nav-list {
    list-style: none;
    margin-top: 2rem;
}

.w8640-mobile-nav-item {
    margin-bottom: 1rem;
}

.w8640-mobile-nav-item a {
    display: block;
    padding: 1rem;
    color: var(--w8640-text);
    text-decoration: none;
    border-radius: var(--w8640-radius);
    transition: all 0.3s ease;
}

.w8640-mobile-nav-item a:hover {
    background: rgba(255, 20, 147, 0.1);
    color: var(--w8640-primary);
}

/* Main Content */
.w8640-main {
    margin-top: 60px;
    min-height: calc(100vh - 60px - 80px);
}

/* Carousel */
.w8640-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--w8640-radius-lg);
    margin-bottom: 2rem;
}

.w8640-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.w8640-carousel-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.w8640-carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.w8640-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.w8640-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.w8640-carousel-indicator.active {
    background: var(--w8640-primary);
    width: 24px;
    border-radius: 4px;
}

/* Game Grid */
.w8640-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.w8640-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.w8640-game-item:hover {
    transform: translateY(-4px);
}

.w8640-game-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--w8640-radius);
    overflow: hidden;
    margin: 0 auto 0.5rem;
    background: var(--w8640-dark);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.w8640-game-item:hover .w8640-game-icon {
    border-color: var(--w8640-primary);
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
}

.w8640-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.w8640-game-name {
    font-size: 1.2rem;
    color: var(--w8640-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sections */
.w8640-section {
    margin-bottom: 3rem;
}

.w8640-section-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--w8640-primary);
    position: relative;
    padding-bottom: 0.5rem;
}

.w8640-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--w8640-gradient);
    border-radius: 2px;
}

.w8640-section-content {
    background: var(--w8640-dark);
    padding: 2rem;
    border-radius: var(--w8640-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.w8640-text-primary {
    color: var(--w8640-primary);
}

.w8640-text-accent {
    color: var(--w8640-accent);
}

/* Footer */
.w8640-footer {
    background: var(--w8640-dark);
    padding: 2rem 0;
    margin-bottom: 80px; /* Space for mobile nav */
}

.w8640-footer-content {
    text-align: center;
}

.w8640-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.w8640-partner-icon {
    width: 40px;
    height: 40px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.w8640-partner-icon:hover {
    opacity: 1;
}

.w8640-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.w8640-footer-link {
    color: var(--w8640-gray);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.w8640-footer-link:hover {
    color: var(--w8640-primary);
}

.w8640-copyright {
    color: var(--w8640-gray);
    font-size: 1.2rem;
}

/* Mobile Bottom Navigation */
.w8640-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, #1A1A1A 0%, #262626 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: var(--w8640-z-nav);
    display: flex;
    align-items: center;
    justify-content: space-around;
    backdrop-filter: blur(10px);
}

.w8640-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    background: none;
    color: var(--w8640-gray);
    text-decoration: none;
}

.w8640-bottom-nav-item:hover {
    color: var(--w8640-primary);
    transform: translateY(-2px);
}

.w8640-bottom-nav-item.active {
    color: var(--w8640-primary);
}

.w8640-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--w8640-primary);
    border-radius: 2px;
}

.w8640-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
}

.w8640-bottom-nav-label {
    font-size: 1rem;
    font-weight: 500;
}

/* Scroll to top button */
.w8640-scroll-top {
    position: fixed;
    bottom: 90px;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--w8640-gradient);
    color: var(--w8640-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.w8640-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.w8640-scroll-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4);
}

/* Responsive Design */
@media (min-width: 769px) {
    .w8640-bottom-nav {
        display: none;
    }

    .w8640-footer {
        margin-bottom: 0;
    }

    .w8640-main {
        margin-bottom: 0;
    }

    .w8640-nav {
        display: block;
    }

    .w8640-header-actions .w8640-btn-menu {
        display: none;
    }

    .w8640-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .w8640-game-icon {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .w8640-main {
        padding-bottom: 80px;
    }
}

/* Utility Classes */
.w8640-text-center {
    text-align: center;
}

.w8640-text-left {
    text-align: left;
}

.w8640-text-right {
    text-align: right;
}

.w8640-mb-1 {
    margin-bottom: 1rem;
}

.w8640-mb-2 {
    margin-bottom: 2rem;
}

.w8640-mb-3 {
    margin-bottom: 3rem;
}

.w8640-mt-1 {
    margin-top: 1rem;
}

.w8640-mt-2 {
    margin-top: 2rem;
}

.w8640-mt-3 {
    margin-top: 3rem;
}

/* Animations */
@keyframes w8640-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.w8640-fade-in {
    animation: w8640-fadeIn 0.6s ease forwards;
}

/* Loading states */
.w8640-loading {
    position: relative;
    overflow: hidden;
}

.w8640-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: w8640-loading 1.5s infinite;
}

@keyframes w8640-loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}