:root {
    /* Color palette based on requirements */
    --w22e3-primary: #BA55D3;
    --w22e3-secondary: #4B0082;
    --w22e3-accent: #9932CC;
    --w22e3-light: #BBBBBB;
    --w22e3-highlight: #FFCCCB;
    --w22e3-dark: #273746;
    --w22e3-bg: #1a1a1a;
    --w22e3-text: #ffffff;
    --w22e3-text-secondary: #cccccc;
    --w22e3-border: #333333;
    --w22e3-gradient: linear-gradient(135deg, #BA55D3 0%, #4B0082 100%);
    --w22e3-shadow: 0 4px 20px rgba(186, 85, 211, 0.3);

    /* Typography */
    --w22e3-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --w22e3-font-size-xs: 1.0rem;
    --w22e3-font-size-sm: 1.2rem;
    --w22e3-font-size-base: 1.4rem;
    --w22e3-font-size-lg: 1.6rem;
    --w22e3-font-size-xl: 1.8rem;
    --w22e3-font-size-2xl: 2.0rem;
    --w22e3-font-size-3xl: 2.4rem;

    /* Spacing */
    --w22e3-spacing-xs: 0.4rem;
    --w22e3-spacing-sm: 0.8rem;
    --w22e3-spacing-base: 1.2rem;
    --w22e3-spacing-lg: 1.6rem;
    --w22e3-spacing-xl: 2.0rem;
    --w22e3-spacing-2xl: 2.4rem;
    --w22e3-spacing-3xl: 3.2rem;

    /* Border radius */
    --w22e3-radius-sm: 0.4rem;
    --w22e3-radius-base: 0.8rem;
    --w22e3-radius-lg: 1.2rem;
    --w22e3-radius-xl: 1.6rem;

    /* Transitions */
    --w22e3-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--w22e3-font-family);
    font-size: var(--w22e3-font-size-base);
    line-height: 1.5;
    background-color: var(--w22e3-bg);
    color: var(--w22e3-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loaded {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility classes */
.w22e3-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 var(--w22e3-spacing-base);
}

.w22e3-wrapper {
    min-height: 100vh;
    padding-bottom: 80px; /* Space for bottom nav */
}

.w22e3-grid {
    display: grid;
    gap: var(--w22e3-spacing-base);
}

.w22e3-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.w22e3-flex-col {
    display: flex;
    flex-direction: column;
}

.w22e3-text-center {
    text-align: center;
}

.w22e3-text-primary {
    color: var(--w22e3-primary);
}

.w22e3-text-secondary {
    color: var(--w22e3-text-secondary);
}

.w22e3-text-highlight {
    color: var(--w22e3-highlight);
}

.w22e3-bg-primary {
    background-color: var(--w22e3-primary);
}

.w22e3-bg-secondary {
    background-color: var(--w22e3-secondary);
}

.w22e3-bg-gradient {
    background: var(--w22e3-gradient);
}

/* Header and Navigation */
.w22e3-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(39, 55, 70, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--w22e3-border);
}

.w22e3-nav {
    padding: var(--w22e3-spacing-base) 0;
}

.w22e3-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.w22e3-logo {
    display: flex;
    align-items: center;
    gap: var(--w22e3-spacing-sm);
    font-size: var(--w22e3-font-size-xl);
    font-weight: bold;
    color: var(--w22e3-text);
    text-decoration: none;
}

.w22e3-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--w22e3-gradient);
    border-radius: var(--w22e3-radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--w22e3-font-size-sm);
}

.w22e3-nav-actions {
    display: flex;
    align-items: center;
    gap: var(--w22e3-spacing-sm);
}

.w22e3-btn {
    padding: var(--w22e3-spacing-sm) var(--w22e3-spacing-lg);
    border: none;
    border-radius: var(--w22e3-radius-base);
    font-size: var(--w22e3-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--w22e3-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* Touch target size */
    min-width: 44px;
}

.w22e3-btn-primary {
    background: var(--w22e3-gradient);
    color: white;
    box-shadow: var(--w22e3-shadow);
}

.w22e3-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(186, 85, 211, 0.4);
}

.w22e3-btn-secondary {
    background: transparent;
    color: var(--w22e3-text);
    border: 2px solid var(--w22e3-primary);
}

.w22e3-btn-secondary:hover {
    background: var(--w22e3-primary);
    color: white;
}

.w22e3-menu-toggle {
    background: none;
    border: none;
    color: var(--w22e3-text);
    font-size: 24px;
    cursor: pointer;
    padding: var(--w22e3-spacing-sm);
    border-radius: var(--w22e3-radius-sm);
    transition: var(--w22e3-transition);
}

.w22e3-menu-toggle:hover {
    background: rgba(186, 85, 211, 0.2);
}

/* Mobile Menu */
.w22e3-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--w22e3-dark);
    z-index: 9999;
    transition: var(--w22e3-transition);
    overflow-y: auto;
    padding: var(--w22e3-spacing-xl);
}

.w22e3-mobile-menu.active {
    right: 0;
}

.w22e3-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--w22e3-transition);
}

.w22e3-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.w22e3-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--w22e3-spacing-xl);
}

.w22e3-menu-close {
    background: none;
    border: none;
    color: var(--w22e3-text);
    font-size: 24px;
    cursor: pointer;
    padding: var(--w22e3-spacing-sm);
}

.w22e3-menu-list {
    list-style: none;
}

.w22e3-menu-item {
    margin-bottom: var(--w22e3-spacing-base);
}

.w22e3-menu-link {
    display: block;
    padding: var(--w22e3-spacing-base);
    color: var(--w22e3-text);
    text-decoration: none;
    border-radius: var(--w22e3-radius-base);
    transition: var(--w22e3-transition);
    font-size: var(--w22e3-font-size-base);
}

.w22e3-menu-link:hover {
    background: rgba(186, 85, 211, 0.2);
    color: var(--w22e3-primary);
}

/* Main Content */
.w22e3-main {
    margin-top: 80px; /* Space for fixed header */
}

.w22e3-section {
    padding: var(--w22e3-spacing-xl) 0;
}

.w22e3-section-title {
    font-size: var(--w22e3-font-size-2xl);
    font-weight: bold;
    margin-bottom: var(--w22e3-spacing-lg);
    color: var(--w22e3-text);
}

/* Carousel */
.w22e3-carousel {
    position: relative;
    border-radius: var(--w22e3-radius-lg);
    overflow: hidden;
    margin-bottom: var(--w22e3-spacing-xl);
    box-shadow: var(--w22e3-shadow);
}

.w22e3-carousel-inner {
    position: relative;
    height: 200px;
}

.w22e3-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.w22e3-carousel-item.active {
    opacity: 1;
}

.w22e3-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.w22e3-carousel-controls {
    position: absolute;
    bottom: var(--w22e3-spacing-base);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--w22e3-spacing-xs);
}

.w22e3-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--w22e3-transition);
}

.w22e3-carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

.w22e3-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--w22e3-transition);
}

.w22e3-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.w22e3-carousel-prev {
    left: var(--w22e3-spacing-base);
}

.w22e3-carousel-next {
    right: var(--w22e3-spacing-base);
}

/* Game Cards */
.w22e3-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--w22e3-spacing-sm);
    margin-bottom: var(--w22e3-spacing-xl);
}

.w22e3-game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--w22e3-radius-base);
    padding: var(--w22e3-spacing-sm);
    text-align: center;
    transition: var(--w22e3-transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.w22e3-game-card:hover {
    transform: translateY(-2px);
    border-color: var(--w22e3-primary);
    box-shadow: var(--w22e3-shadow);
}

.w22e3-game-icon {
    width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: var(--w22e3-spacing-xs);
    border-radius: var(--w22e3-radius-sm);
}

.w22e3-game-title {
    font-size: var(--w22e3-font-size-xs);
    color: var(--w22e3-text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Content Modules */
.w22e3-content-module {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--w22e3-radius-lg);
    padding: var(--w22e3-spacing-xl);
    margin-bottom: var(--w22e3-spacing-xl);
    border: 1px solid var(--w22e3-border);
}

.w22e3-module-title {
    font-size: var(--w22e3-font-size-xl);
    font-weight: bold;
    margin-bottom: var(--w22e3-spacing-lg);
    color: var(--w22e3-primary);
}

.w22e3-module-content {
    color: var(--w22e3-text-secondary);
    line-height: 1.6;
}

.w22e3-module-content p {
    margin-bottom: var(--w22e3-spacing-base);
}

.w22e3-module-content a {
    color: var(--w22e3-primary);
    text-decoration: none;
    font-weight: 600;
}

.w22e3-module-content a:hover {
    text-decoration: underline;
}

/* Partner Section */
.w22e3-partners {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--w22e3-radius-lg);
    padding: var(--w22e3-spacing-xl);
    margin-bottom: var(--w22e3-spacing-xl);
}

.w22e3-partners-title {
    font-size: var(--w22e3-font-size-lg);
    font-weight: bold;
    margin-bottom: var(--w22e3-spacing-lg);
    text-align: center;
    color: var(--w22e3-text-secondary);
}

.w22e3-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: var(--w22e3-spacing-base);
    align-items: center;
}

.w22e3-partner-logo {
    width: 60px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0.8);
    transition: var(--w22e3-transition);
}

.w22e3-partner-logo:hover {
    filter: brightness(1);
}

/* Footer */
.w22e3-footer {
    background: var(--w22e3-dark);
    border-top: 1px solid var(--w22e3-border);
    padding: var(--w22e3-spacing-xl) 0 var(--w22e3-spacing-3xl);
}

.w22e3-footer-content {
    margin-bottom: var(--w22e3-spacing-xl);
}

.w22e3-footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--w22e3-spacing-base);
    margin-bottom: var(--w22e3-spacing-xl);
}

.w22e3-footer-link {
    color: var(--w22e3-text-secondary);
    text-decoration: none;
    font-size: var(--w22e3-font-size-sm);
    transition: var(--w22e3-transition);
}

.w22e3-footer-link:hover {
    color: var(--w22e3-primary);
}

.w22e3-footer-bottom {
    text-align: center;
    padding-top: var(--w22e3-spacing-lg);
    border-top: 1px solid var(--w22e3-border);
    color: var(--w22e3-text-secondary);
    font-size: var(--w22e3-font-size-xs);
}

/* Bottom Navigation */
.w22e3-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--w22e3-dark);
    border-top: 1px solid var(--w22e3-border);
    z-index: 1000;
    padding: var(--w22e3-spacing-sm) 0;
    backdrop-filter: blur(10px);
}

.w22e3-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.w22e3-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--w22e3-spacing-xs);
    padding: var(--w22e3-spacing-xs);
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--w22e3-text-secondary);
    transition: var(--w22e3-transition);
    border-radius: var(--w22e3-radius-base);
    cursor: pointer;
}

.w22e3-bottom-nav-item:hover,
.w22e3-bottom-nav-item.active {
    color: var(--w22e3-primary);
    background: rgba(186, 85, 211, 0.1);
    transform: translateY(-2px);
}

.w22e3-bottom-nav-icon {
    font-size: 24px;
    transition: var(--w22e3-transition);
}

.w22e3-bottom-nav-item:hover .w22e3-bottom-nav-icon,
.w22e3-bottom-nav-item.active .w22e3-bottom-nav-icon {
    transform: scale(1.1);
}

.w22e3-bottom-nav-label {
    font-size: var(--w22e3-font-size-xs);
    font-weight: 500;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .w22e3-container {
        padding: 0 var(--w22e3-spacing-sm);
    }

    .w22e3-main {
        padding-bottom: 80px; /* Space for bottom nav */
    }

    .w22e3-bottom-nav {
        display: block;
    }
}

@media (min-width: 769px) {
    .w22e3-bottom-nav {
        display: none;
    }

    .w22e3-main {
        padding-bottom: 0;
    }
}

/* Loading states */
.w22e3-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--w22e3-border);
    border-top: 2px solid var(--w22e3-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.w22e3-btn:focus,
.w22e3-menu-toggle:focus,
.w22e3-menu-link:focus,
.w22e3-bottom-nav-item:focus {
    outline: 2px solid var(--w22e3-primary);
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .w22e3-btn:hover {
        transform: none;
    }

    .w22e3-game-card:hover {
        transform: none;
    }

    .w22e3-bottom-nav-item:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --w22e3-bg: #000000;
        --w22e3-text: #ffffff;
        --w22e3-border: #ffffff;
    }
}