/**
 * EM777 - Mobile Gaming Platform Styles
 * Prefix: we390-
 * Version: 1.0.0
 */

/* CSS Variables */
:root {
    --we390-primary: #DC143C;
    --we390-secondary: #000080;
    --we390-accent: #FF7F50;
    --we390-bg-dark: #0C0C0C;
    --we390-bg-navy: #000080;
    --we390-text-light: #87CEFA;
    --we390-text-white: #FFFFFF;
    --we390-text-gray: #B0B0B0;
    --we390-border-radius: 8px;
    --we390-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --we390-transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--we390-bg-dark);
    color: var(--we390-text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.we390-no-scroll {
    overflow: hidden;
}

/* Container */
.we390-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 15px;
}

.we390-wrapper {
    width: 100%;
    min-height: 100vh;
}

.we390-grid {
    display: grid;
    gap: 15px;
}

/* Header */
.we390-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--we390-bg-dark) 0%, var(--we390-secondary) 100%);
    padding: 12px 15px;
    transition: var(--we390-transition);
}

.we390-header-scrolled {
    background: rgba(12, 12, 12, 0.95);
    box-shadow: var(--we390-shadow);
}

.we390-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 430px;
    margin: 0 auto;
}

.we390-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.we390-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.we390-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--we390-primary);
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

.we390-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.we390-btn {
    padding: 8px 16px;
    border-radius: var(--we390-border-radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--we390-transition);
    border: none;
    text-decoration: none;
    display: inline-block;
}

.we390-btn-login {
    background: transparent;
    border: 2px solid var(--we390-accent);
    color: var(--we390-accent);
}

.we390-btn-login:hover {
    background: var(--we390-accent);
    color: var(--we390-bg-dark);
}

.we390-btn-register {
    background: linear-gradient(135deg, var(--we390-primary) 0%, #FF4757 100%);
    color: var(--we390-text-white);
}

.we390-btn-register:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
}

.we390-menu-toggle {
    background: transparent;
    border: none;
    color: var(--we390-text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Mobile Menu */
.we390-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--we390-bg-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid rgba(220, 20, 60, 0.3);
}

.we390-menu-active {
    right: 0;
}

.we390-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--we390-transition);
}

.we390-overlay-active {
    opacity: 1;
    visibility: visible;
}

.we390-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--we390-primary) 0%, var(--we390-secondary) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.we390-menu-close {
    background: transparent;
    border: none;
    color: var(--we390-text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.we390-menu-links {
    padding: 15px 0;
}

.we390-menu-link {
    display: block;
    padding: 12px 20px;
    color: var(--we390-text-white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--we390-transition);
}

.we390-menu-link:hover {
    background: rgba(220, 20, 60, 0.2);
    color: var(--we390-accent);
}

/* Carousel */
.we390-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--we390-border-radius);
    margin-top: 70px;
}

.we390-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.we390-slide-active {
    opacity: 1;
}

.we390-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Game Sections */
.we390-section {
    padding: 20px 0;
}

.we390-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--we390-accent);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.we390-section-title i {
    color: var(--we390-primary);
}

/* Tabs */
.we390-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.we390-tabs::-webkit-scrollbar {
    display: none;
}

.we390-tab-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: var(--we390-text-gray);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--we390-transition);
    white-space: nowrap;
}

.we390-tab-active {
    background: var(--we390-primary);
    color: var(--we390-text-white);
}

.we390-tab-content {
    display: none;
}

.we390-content-active {
    display: block;
}

/* Game Grid */
.we390-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.we390-game-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: var(--we390-border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--we390-transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.we390-game-card:hover {
    transform: translateY(-5px);
    border-color: var(--we390-primary);
    box-shadow: 0 10px 25px rgba(220, 20, 60, 0.3);
}

.we390-game-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.we390-game-name {
    padding: 8px;
    font-size: 0.75rem;
    text-align: center;
    color: var(--we390-text-white);
    background: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Info Sections */
.we390-info-box {
    background: linear-gradient(145deg, rgba(0, 0, 128, 0.3) 0%, rgba(12, 12, 12, 0.8) 100%);
    border-radius: var(--we390-border-radius);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(135, 206, 250, 0.2);
}

.we390-info-title {
    font-size: 1.125rem;
    color: var(--we390-text-light);
    margin-bottom: 12px;
    font-weight: 600;
}

.we390-info-text {
    color: var(--we390-text-gray);
    font-size: 0.875rem;
    line-height: 1.7;
}

.we390-info-text a {
    color: var(--we390-accent);
    text-decoration: none;
}

.we390-info-text a:hover {
    text-decoration: underline;
}

/* FAQ Accordion */
.we390-accordion {
    margin-bottom: 15px;
}

.we390-accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--we390-border-radius);
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.we390-accordion-header {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--we390-text-white);
    font-weight: 500;
    transition: var(--we390-transition);
}

.we390-accordion-header:hover {
    background: rgba(220, 20, 60, 0.1);
}

.we390-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.we390-accordion-open .we390-accordion-content {
    padding: 0 15px 15px;
}

.we390-accordion-body {
    color: var(--we390-text-gray);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Bottom Navigation */
.we390-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0, 0, 128, 0.95) 0%, rgba(12, 12, 12, 0.98) 100%);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 2px solid var(--we390-primary);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

.we390-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 50px;
    padding: 5px;
    color: var(--we390-text-gray);
    text-decoration: none;
    cursor: pointer;
    transition: var(--we390-transition);
    background: transparent;
    border: none;
}

.we390-bottom-nav-item:hover,
.we390-nav-active {
    color: var(--we390-primary);
    transform: scale(1.1);
}

.we390-nav-icon {
    font-size: 22px;
    margin-bottom: 3px;
}

.we390-nav-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer */
.we390-footer {
    background: linear-gradient(180deg, var(--we390-bg-dark) 0%, rgba(0, 0, 128, 0.3) 100%);
    padding: 30px 15px 100px;
    margin-top: 30px;
    border-top: 1px solid rgba(220, 20, 60, 0.3);
}

.we390-footer-logo {
    text-align: center;
    margin-bottom: 20px;
}

.we390-footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.we390-partners {
    margin-bottom: 25px;
}

.we390-partners-title {
    text-align: center;
    font-size: 0.875rem;
    color: var(--we390-text-gray);
    margin-bottom: 15px;
}

.we390-partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.we390-partner-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    filter: grayscale(50%);
    opacity: 0.7;
    transition: var(--we390-transition);
}

.we390-partner-img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.we390-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.we390-footer-link {
    color: var(--we390-text-gray);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--we390-transition);
}

.we390-footer-link:hover {
    color: var(--we390-accent);
}

.we390-copyright {
    text-align: center;
    font-size: 0.75rem;
    color: var(--we390-text-gray);
    margin-top: 20px;
}

/* Utility Classes */
.we390-text-center { text-align: center; }
.we390-mb-10 { margin-bottom: 10px; }
.we390-mb-15 { margin-bottom: 15px; }
.we390-mb-20 { margin-bottom: 20px; }
.we390-mt-20 { margin-top: 20px; }

/* Mobile Main Content Padding */
@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .we390-bottom-nav {
        display: none;
    }

    .we390-header {
        padding: 15px 30px;
    }

    .we390-container {
        max-width: 1200px;
    }

    .we390-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .we390-carousel {
        height: 400px;
        margin-top: 80px;
    }

    .we390-footer {
        padding-bottom: 30px;
    }

    .we390-partners-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .we390-footer-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animation Keyframes */
@keyframes we390-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes we390-glow {
    0%, 100% { box-shadow: 0 0 5px var(--we390-primary); }
    50% { box-shadow: 0 0 20px var(--we390-primary); }
}

.we390-animate-pulse {
    animation: we390-pulse 2s infinite;
}

.we390-animate-glow {
    animation: we390-glow 2s infinite;
}
