/* 333jili register CSS Design System */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    /* Color Palette */
    --w73fc-primary: #000080;
    --w73fc-secondary: #ADD8E6;
    --w73fc-accent: #F5F5F5;
    --w73fc-dark: #0F0F23;
    --w73fc-light: #FFFFFF;
    --w73fc-text: #333333;
    --w73fc-text-light: #666666;
    --w73fc-success: #00FF00;
    --w73fc-warning: #FFD700;
    --w73fc-error: #FF4444;

    /* Spacing */
    --w73fc-spacing-xs: 0.4rem;
    --w73fc-spacing-sm: 0.8rem;
    --w73fc-spacing-md: 1.6rem;
    --w73fc-spacing-lg: 2.4rem;
    --w73fc-spacing-xl: 3.2rem;

    /* Typography */
    --w73fc-font-size-xs: 1.0rem;
    --w73fc-font-size-sm: 1.2rem;
    --w73fc-font-size-md: 1.4rem;
    --w73fc-font-size-lg: 1.6rem;
    --w73fc-font-size-xl: 2.0rem;
    --w73fc-font-size-xxl: 2.4rem;

    /* Layout */
    --w73fc-max-width: 430px;
    --w73fc-header-height: 60px;
    --w73fc-bottom-nav-height: 60px;
}

/* Base Styles */
html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--w73fc-text);
    background-color: var(--w73fc-light);
    max-width: var(--w73fc-max-width);
    margin: 0 auto;
    overflow-x: hidden;
}

/* Utility Classes */
.w73fc-container {
    padding: 0 var(--w73fc-spacing-md);
    max-width: var(--w73fc-max-width);
    margin: 0 auto;
}

.w73fc-wrapper {
    padding: var(--w73fc-spacing-md);
}

.w73fc-grid {
    display: grid;
    gap: var(--w73fc-spacing-sm);
}

.w73fc-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.w73fc-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.w73fc-flex {
    display: flex;
}

.w73fc-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.w73fc-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.w73fc-text-center {
    text-align: center;
}

.w73fc-text-primary {
    color: var(--w73fc-primary);
}

.w73fc-text-secondary {
    color: var(--w73fc-secondary);
}

.w73fc-text-light {
    color: var(--w73fc-text-light);
}

/* Header */
.w73fc-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--w73fc-primary), var(--w73fc-dark));
    color: var(--w73fc-light);
    height: var(--w73fc-header-height);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.w73fc-header-content {
    height: 100%;
    padding: 0 var(--w73fc-spacing-md);
}

.w73fc-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--w73fc-light);
    font-size: 1.8rem;
    font-weight: bold;
}

.w73fc-logo img {
    width: 32px;
    height: 32px;
    margin-right: var(--w73fc-spacing-sm);
}

.w73fc-header-actions {
    display: flex;
    align-items: center;
    gap: var(--w73fc-spacing-sm);
}

.w73fc-btn {
    padding: var(--w73fc-spacing-sm) var(--w73fc-spacing-md);
    border: none;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--w73fc-spacing-xs);
    min-height: 44px; /* Touch target size */
}

.w73fc-btn-primary {
    background: var(--w73fc-secondary);
    color: var(--w73fc-dark);
}

.w73fc-btn-primary:hover {
    background: #87CEEB;
    transform: translateY(-2px);
}

.w73fc-btn-secondary {
    background: transparent;
    color: var(--w73fc-light);
    border: 2px solid var(--w73fc-light);
}

.w73fc-btn-secondary:hover {
    background: var(--w73fc-light);
    color: var(--w73fc-primary);
}

.w73fc-btn-large {
    padding: var(--w73fc-spacing-md) var(--w73fc-spacing-lg);
    font-size: 1.6rem;
}

.w73fc-menu-btn {
    background: transparent;
    border: none;
    color: var(--w73fc-light);
    font-size: 2.0rem;
    cursor: pointer;
    padding: var(--w73fc-spacing-xs);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.w73fc-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu */
.w73fc-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.w73fc-menu-overlay.w73fc-active {
    opacity: 1;
    visibility: visible;
}

.w73fc-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--w73fc-light);
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.w73fc-mobile-menu.w73fc-active {
    right: 0;
}

.w73fc-menu-header {
    background: linear-gradient(135deg, var(--w73fc-primary), var(--w73fc-dark));
    color: var(--w73fc-light);
    padding: var(--w73fc-spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.w73fc-menu-close {
    background: transparent;
    border: none;
    color: var(--w73fc-light);
    font-size: 2.4rem;
    cursor: pointer;
    padding: var(--w73fc-spacing-xs);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.w73fc-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.w73fc-menu-nav {
    list-style: none;
    padding: var(--w73fc-spacing-sm) 0;
}

.w73fc-menu-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.w73fc-menu-nav a {
    display: flex;
    align-items: center;
    padding: var(--w73fc-spacing-md);
    color: var(--w73fc-text);
    text-decoration: none;
    transition: background 0.3s ease;
}

.w73fc-menu-nav a:hover {
    background: var(--w73fc-accent);
}

.w73fc-menu-nav i {
    width: 24px;
    margin-right: var(--w73fc-spacing-sm);
    text-align: center;
    color: var(--w73fc-primary);
}

/* Main Content */
.w73fc-main {
    padding-top: var(--w73fc-header-height);
    padding-bottom: var(--w73fc-bottom-nav-height);
    min-height: 100vh;
}

.w73fc-section {
    padding: var(--w73fc-spacing-lg) 0;
}

.w73fc-section:first-child {
    padding-top: var(--w73fc-spacing-md);
}

.w73fc-card {
    background: var(--w73fc-light);
    border-radius: 12px;
    padding: var(--w73fc-spacing-lg);
    margin-bottom: var(--w73fc-spacing-md);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.w73fc-card-title {
    font-size: var(--w73fc-font-size-xl);
    color: var(--w73fc-primary);
    margin-bottom: var(--w73fc-spacing-md);
    font-weight: 600;
}

.w73fc-section-title {
    font-size: var(--w73fc-font-size-xxl);
    color: var(--w73fc-primary);
    margin-bottom: var(--w73fc-spacing-lg);
    text-align: center;
    font-weight: 700;
}

.w73fc-section-subtitle {
    font-size: var(--w73fc-font-size-lg);
    color: var(--w73fc-text-light);
    margin-bottom: var(--w73fc-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--w73fc-spacing-sm);
}

/* Carousel */
.w73fc-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: var(--w73fc-spacing-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.w73fc-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.w73fc-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.w73fc-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.w73fc-carousel-indicators {
    position: absolute;
    bottom: var(--w73fc-spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--w73fc-spacing-xs);
}

.w73fc-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.w73fc-carousel-indicator.w73fc-active {
    background: var(--w73fc-light);
    transform: scale(1.2);
}

/* Game Grid */
.w73fc-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--w73fc-spacing-sm);
}

.w73fc-game-card {
    background: var(--w73fc-light);
    border-radius: 8px;
    padding: var(--w73fc-spacing-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.w73fc-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--w73fc-secondary);
}

.w73fc-game-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--w73fc-spacing-xs);
    object-fit: contain;
}

.w73fc-game-name {
    font-size: 1.0rem;
    color: var(--w73fc-text);
    font-weight: 500;
    line-height: 1.2;
}

/* Buttons */
.w73fc-btn-group {
    display: flex;
    gap: var(--w73fc-spacing-sm);
    flex-wrap: wrap;
}

/* Links */
.w73fc-link {
    color: var(--w73fc-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.w73fc-link:hover {
    color: var(--w73fc-secondary);
    text-decoration: underline;
}

/* Footer */
.w73fc-footer {
    background: linear-gradient(135deg, var(--w73fc-dark), var(--w73fc-primary));
    color: var(--w73fc-light);
    padding: var(--w73fc-spacing-xl) 0 var(--w73fc-spacing-lg);
    margin-top: var(--w73fc-spacing-xl);
}

.w73fc-footer-content {
    padding: 0 var(--w73fc-spacing-md);
}

.w73fc-footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.w73fc-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--w73fc-spacing-md);
    margin: var(--w73fc-spacing-lg) 0;
    justify-content: center;
}

.w73fc-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.w73fc-footer-links a:hover {
    color: var(--w73fc-light);
}

.w73fc-partners {
    display: flex;
    flex-wrap: wrap;
    gap: var(--w73fc-spacing-md);
    justify-content: center;
    margin: var(--w73fc-spacing-lg) 0;
}

.w73fc-partner {
    height: 30px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.w73fc-partner:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.w73fc-copyright {
    text-align: center;
    font-size: 1.0rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--w73fc-spacing-lg);
}

/* Bottom Navigation */
.w73fc-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--w73fc-primary), var(--w73fc-dark));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    height: var(--w73fc-bottom-nav-height);
}

.w73fc-bottom-nav-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 0 var(--w73fc-spacing-sm);
}

.w73fc-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
    min-height: 60px;
    transition: all 0.3s ease;
    position: relative;
}

.w73fc-nav-item:hover,
.w73fc-nav-item.w73fc-active {
    color: var(--w73fc-light);
}

.w73fc-nav-item:hover {
    transform: scale(1.1);
}

.w73fc-nav-icon {
    font-size: 2.0rem;
    margin-bottom: 0.2rem;
}

.w73fc-nav-text {
    font-size: 1.0rem;
    line-height: 1;
}

/* Scroll to Top */
.w73fc-scroll-top {
    position: fixed;
    bottom: 80px;
    right: var(--w73fc-spacing-md);
    background: var(--w73fc-primary);
    color: var(--w73fc-light);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
}

.w73fc-scroll-top.w73fc-visible {
    opacity: 1;
    visibility: visible;
}

.w73fc-scroll-top:hover {
    background: var(--w73fc-dark);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .w73fc-container {
        padding: 0 var(--w73fc-spacing-sm);
    }

    .w73fc-wrapper {
        padding: var(--w73fc-spacing-md) var(--w73fc-spacing-sm);
    }

    .w73fc-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--w73fc-spacing-xs);
    }

    .w73fc-game-card {
        padding: var(--w73fc-spacing-xs);
        min-height: 70px;
    }

    .w73fc-game-icon {
        width: 32px;
        height: 32px;
    }

    .w73fc-game-name {
        font-size: 0.9rem;
    }

    .w73fc-section-title {
        font-size: 2.0rem;
    }

    .w73fc-card-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .w73fc-game-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .w73fc-footer-links {
        gap: var(--w73fc-spacing-sm);
    }

    .w73fc-footer-links a {
        font-size: 1.0rem;
    }
}

/* Print Styles */
@media print {
    .w73fc-header,
    .w73fc-bottom-nav,
    .w73fc-scroll-top {
        display: none;
    }

    .w73fc-main {
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --w73fc-primary: #000080;
        --w73fc-text: #000000;
        --w73fc-light: #FFFFFF;
    }
}