/**
 * jl44 Main Stylesheet
 * All classes use gba7- prefix for namespace isolation
 */

/* CSS Variables */
:root {
    --gba7-bg-primary: #0A0A0A;
    --gba7-bg-secondary: #1A1A1A;
    --gba7-bg-tertiary: #2A2A2A;
    --gba7-primary: #004D40;
    --gba7-primary-light: #00695C;
    --gba7-primary-dark: #00332A;
    --gba7-accent: #FFB300;
    --gba7-accent-hover: #FFCA28;
    --gba7-text-primary: #FFFFFF;
    --gba7-text-secondary: #B0B0B0;
    --gba7-text-muted: #808080;
    --gba7-border: #333333;
    --gba7-success: #4CAF50;
    --gba7-warning: #FF9800;
    --gba7-error: #F44336;
    --gba7-shadow: rgba(0, 0, 0, 0.3);
}

/* Reset & 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: 1.6rem;
    line-height: 1.5;
    color: var(--gba7-text-primary);
    background-color: var(--gba7-bg-primary);
    overflow-x: hidden;
}

/* Container & Layout */
.gba7-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.gba7-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.gba7-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--gba7-bg-secondary) 0%, var(--gba7-bg-primary) 100%);
    border-bottom: 2px solid var(--gba7-primary);
    box-shadow: 0 4px 12px var(--gba7-shadow);
}

.gba7-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    max-width: 430px;
    margin: 0 auto;
}

.gba7-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--gba7-text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    flex: 1;
}

.gba7-logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.gba7-header-buttons {
    display: flex;
    gap: 0.8rem;
}

.gba7-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.gba7-btn-register {
    background: linear-gradient(135deg, var(--gba7-accent) 0%, var(--gba7-accent-hover) 100%);
    color: var(--gba7-bg-primary);
}

.gba7-btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.4);
}

.gba7-btn-login {
    background: transparent;
    color: var(--gba7-primary);
    border: 2px solid var(--gba7-primary);
}

.gba7-btn-login:hover {
    background: var(--gba7-primary);
    color: var(--gba7-text-primary);
}

.gba7-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.gba7-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--gba7-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.gba7-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--gba7-bg-secondary);
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -4px 0 16px var(--gba7-shadow);
    overflow-y: auto;
}

.gba7-mobile-menu.gba7-menu-open {
    right: 0;
}

.gba7-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gba7-border);
}

.gba7-menu-close {
    background: none;
    border: none;
    color: var(--gba7-text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.gba7-menu-nav {
    padding: 1rem 0;
}

.gba7-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--gba7-text-primary);
    text-decoration: none;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.gba7-menu-link:hover {
    background: var(--gba7-bg-tertiary);
    border-left-color: var(--gba7-primary);
    padding-left: 2rem;
}

/* Main Content */
.gba7-main {
    margin-top: 80px;
    padding-bottom: 80px;
    flex: 1;
}

@media (min-width: 769px) {
    .gba7-main {
        padding-bottom: 0;
    }
}

/* Carousel */
.gba7-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--gba7-shadow);
}

.gba7-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.gba7-carousel-slide {
    min-width: 100%;
    position: relative;
}

.gba7-carousel-image {
    width: 100%;
    height: auto;
    display: block;
}

.gba7-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.gba7-carousel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gba7-text-primary);
}

/* Sections */
.gba7-section {
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: var(--gba7-bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--gba7-shadow);
}

.gba7-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gba7-primary);
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.gba7-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gba7-primary);
    border-radius: 2px;
}

/* Game Grid */
.gba7-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.gba7-game-item {
    display: block;
    text-decoration: none;
    color: var(--gba7-text-primary);
    transition: transform 0.3s ease;
}

.gba7-game-item:hover {
    transform: scale(1.05);
}

.gba7-game-icon {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    background: var(--gba7-bg-tertiary);
    margin-bottom: 0.5rem;
}

.gba7-game-name {
    font-size: 1rem;
    text-align: center;
    color: var(--gba7-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cards */
.gba7-card {
    background: var(--gba7-bg-tertiary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px var(--gba7-shadow);
}

.gba7-card-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gba7-primary);
}

.gba7-card-content {
    font-size: 1.4rem;
    color: var(--gba7-text-secondary);
    line-height: 1.6;
}

/* Promotional Links */
.gba7-promo-link {
    color: var(--gba7-accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--gba7-accent);
    transition: all 0.3s ease;
}

.gba7-promo-link:hover {
    color: var(--gba7-accent-hover);
    border-color: var(--gba7-accent-hover);
}

.gba7-promo-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--gba7-accent) 0%, var(--gba7-accent-hover) 100%);
    color: var(--gba7-bg-primary);
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.3);
}

.gba7-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 179, 0, 0.5);
}

/* Bottom Navigation */
.gba7-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--gba7-bg-secondary) 0%, var(--gba7-bg-primary) 100%);
    border-top: 2px solid var(--gba7-primary);
    box-shadow: 0 -4px 12px var(--gba7-shadow);
    z-index: 1000;
    height: 60px;
}

@media (min-width: 769px) {
    .gba7-bottom-nav {
        display: none;
    }
}

.gba7-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.gba7-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    text-decoration: none;
    color: var(--gba7-text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.gba7-nav-item:hover {
    color: var(--gba7-primary);
    transform: scale(1.1);
}

.gba7-nav-item.gba7-active {
    color: var(--gba7-primary);
}

.gba7-nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.gba7-nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* Footer */
.gba7-footer {
    background: var(--gba7-bg-secondary);
    border-top: 2px solid var(--gba7-primary);
    padding: 2rem 1rem 100px 1rem;
    margin-top: 3rem;
}

@media (min-width: 769px) {
    .gba7-footer {
        padding-bottom: 2rem;
    }
}

.gba7-footer-content {
    max-width: 430px;
    margin: 0 auto;
}

.gba7-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.gba7-footer-link {
    color: var(--gba7-text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.gba7-footer-link:hover {
    color: var(--gba7-primary);
}

.gba7-partners {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.gba7-partner-logo {
    width: 60px;
    height: 30px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gba7-partner-logo:hover {
    opacity: 1;
}

.gba7-copyright {
    text-align: center;
    color: var(--gba7-text-muted);
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .gba7-container {
        padding: 0 1rem;
    }
}

@media (min-width: 769px) {
    .gba7-container {
        max-width: 1200px;
    }

    .gba7-game-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* Animation Classes */
@keyframes gba7-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gba7-animate-fadeIn {
    animation: gba7-fadeIn 0.5s ease forwards;
}

/* Utility Classes */
.gba7-text-center {
    text-align: center;
}

.gba7-mb-1 {
    margin-bottom: 1rem;
}

.gba7-mb-2 {
    margin-bottom: 2rem;
}

.gba7-mt-1 {
    margin-top: 1rem;
}

.gba7-mt-2 {
    margin-top: 2rem;
}

/* Accessibility */
.gba7-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--gba7-accent);
    outline-offset: 2px;
}
