/* JLQQQ Gaming Platform - Main Stylesheet */
/* All classes use sf4f prefix for namespace isolation */

/* CSS Variables */
:root {
    --primary-color: #FF6347;
    --secondary-color: #E9967A;
    --dark-color: #34495E;
    --accent-color: #000080;
    --brown-color: #A0522D;
    --light-bg: #FFF5F0;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-color: #E0E0E0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* Container */
.sf4f-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.sf4f-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
}

.sf4f-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 430px;
    margin: 0 auto;
}

.sf4f-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
}

.sf4f-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
}

.sf4f-header-buttons {
    display: flex;
    gap: 8px;
}

.sf4f-btn-register, .sf4f-btn-login {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sf4f-btn-register {
    background: var(--white);
    color: var(--primary-color);
}

.sf4f-btn-register:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sf4f-btn-login {
    background: var(--accent-color);
    color: var(--white);
}

.sf4f-btn-login:hover {
    background: #000060;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sf4f-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Menu */
.sf4f-mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    z-index: 9999;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.sf4f-mobile-menu.sf4f-active {
    left: 0;
}

.sf4f-menu-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 60px 20px 20px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sf4f-menu-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
}

.sf4f-menu-nav {
    padding: 20px 0;
}

.sf4f-menu-link {
    display: block;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sf4f-menu-link:hover, .sf4f-menu-link.sf4f-active {
    background: var(--light-bg);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sf4f-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: var(--transition);
}

.sf4f-menu-overlay.sf4f-active {
    display: block;
    opacity: 1;
}

/* Main Content */
.sf4f-main {
    padding: 20px 0 80px;
}

/* Carousel */
.sf4f-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.sf4f-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.sf4f-carousel-slide {
    min-width: 100%;
}

.sf4f-carousel-slide img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.sf4f-carousel-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.sf4f-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.sf4f-carousel-dot.sf4f-active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

.sf4f-carousel-prev, .sf4f-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.sf4f-carousel-prev {
    left: 8px;
}

.sf4f-carousel-next {
    right: 8px;
}

.sf4f-carousel-prev:hover, .sf4f-carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Game Grid */
.sf4f-section {
    margin-bottom: 32px;
}

.sf4f-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf4f-section-title-icon {
    color: var(--primary-color);
    font-size: 24px;
}

.sf4f-game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.sf4f-game-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.sf4f-game-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.sf4f-game-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.sf4f-game-name {
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Filter */
.sf4f-category-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.sf4f-category-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: var(--white);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.sf4f-category-btn:hover, .sf4f-category-btn.sf4f-active {
    background: var(--primary-color);
    color: var(--white);
}

/* FAQ */
.sf4f-faq-item {
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.sf4f-faq-question {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
}

.sf4f-faq-question:hover {
    background: var(--light-bg);
}

.sf4f-faq-icon {
    font-size: 24px;
    color: var(--primary-color);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sf4f-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--light-bg);
}

.sf4f-faq-answer.sf4f-active {
    max-height: 500px;
}

.sf4f-faq-answer-content {
    padding: 16px;
    color: var(--text-dark);
    line-height: 1.8;
}

/* CTA Button */
.sf4f-cta-button {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.sf4f-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Info Cards */
.sf4f-info-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.sf4f-info-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf4f-info-card-content {
    color: var(--text-dark);
    line-height: 1.8;
}

.sf4f-info-card-content p {
    margin-bottom: 12px;
}

.sf4f-info-card-content p:last-child {
    margin-bottom: 0;
}

/* Footer */
.sf4f-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 32px 0 100px;
    margin-top: 40px;
}

.sf4f-footer-section {
    margin-bottom: 24px;
}

.sf4f-footer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.sf4f-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sf4f-footer-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.sf4f-footer-link:hover {
    color: var(--primary-color);
}

.sf4f-partners {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.sf4f-partner-logo {
    background: var(--white);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.sf4f-partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sf4f-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Bottom Navigation */
.sf4f-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.sf4f-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
    padding: 4px;
}

.sf4f-nav-item:hover, .sf4f-nav-item.sf4f-active {
    color: var(--primary-color);
}

.sf4f-nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.sf4f-nav-label {
    font-size: 10px;
    font-weight: 600;
}

/* Desktop Responsive */
@media (min-width: 769px) {
    .sf4f-bottom-nav {
        display: none;
    }

    .sf4f-main {
        padding-bottom: 20px;
    }

    .sf4f-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .sf4f-menu-toggle {
        display: block;
    }
}

/* Utility Classes */
.sf4f-text-center {
    text-align: center;
}

.sf4f-mb-1 {
    margin-bottom: 8px;
}

.sf4f-mb-2 {
    margin-bottom: 16px;
}

.sf4f-mb-3 {
    margin-bottom: 24px;
}

.sf4f-mt-1 {
    margin-top: 8px;
}

.sf4f-mt-2 {
    margin-top: 16px;
}

.sf4f-mt-3 {
    margin-top: 24px;
}

/* Loading Spinner */
.sf4f-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.sf4f-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: sf4f-spin 1s linear infinite;
}

@keyframes sf4f-spin {
    to {
        transform: rotate(360deg);
    }
}
