/* PH3333 Mobile-First CSS Framework
 * Professional gaming platform styles
 */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables - Color Palette */
:root {
    --gc4b-primary: #DCDCDC;
    --gc4b-secondary: #EEE8AA;
    --gc4b-dark: #0A0A0A;
    --gc4b-bg: #1a1a1a;
    --gc4b-surface: #2a2a2a;
    --gc4b-text: #f0f0f0;
    --gc4b-text-secondary: #b0b0b0;
    --gc4b-accent: #FFD700;
    --gc4b-success: #4CAF50;
    --gc4b-warning: #FF9800;
    --gc4b-error: #F44336;
    --gc4b-border: #333333;
    --gc4b-shadow: rgba(0, 0, 0, 0.3);

    /* Typography */
    --gc4b-font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --gc4b-font-mono: 'Courier New', monospace;

    /* Spacing */
    --gc4b-spacing-xs: 0.4rem;
    --gc4b-spacing-sm: 0.8rem;
    --gc4b-spacing-md: 1.6rem;
    --gc4b-spacing-lg: 2.4rem;
    --gc4b-spacing-xl: 3.2rem;

    /* Border Radius */
    --gc4b-radius-sm: 0.4rem;
    --gc4b-radius-md: 0.8rem;
    --gc4b-radius-lg: 1.2rem;
    --gc4b-radius-full: 50%;

    /* Transitions */
    --gc4b-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gc4b-transition-fast: all 0.15s ease;
}

/* Base Typography */
html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--gc4b-font-primary);
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--gc4b-text);
    background-color: var(--gc4b-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: 8rem; /* Space for fixed bottom nav */
    }
}

/* Layout Containers */
.gc4b-container {
    width: 100%;
    max-width: 43rem;
    margin: 0 auto;
    padding: 0 var(--gc4b-spacing-sm);
}

.gc4b-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gc4b-main {
    flex: 1;
    padding-top: 6rem; /* Space for fixed header */
}

/* Header Component */
.gc4b-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--gc4b-dark) 0%, var(--gc4b-bg) 100%);
    border-bottom: 0.1rem solid var(--gc4b-border);
    transition: var(--gc4b-transition);
}

.gc4b-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(1rem);
}

.gc4b-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gc4b-spacing-sm);
    height: 6rem;
}

.gc4b-logo {
    display: flex;
    align-items: center;
    gap: var(--gc4b-spacing-xs);
    text-decoration: none;
    color: var(--gc4b-primary);
    font-weight: 700;
    font-size: 2rem;
}

.gc4b-logo img {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--gc4b-radius-sm);
}

.gc4b-header-actions {
    display: flex;
    align-items: center;
    gap: var(--gc4b-spacing-xs);
}

/* Navigation Menu */
.gc4b-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 2.4rem;
    height: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: var(--gc4b-spacing-sm);
}

.gc4b-nav-toggle span {
    display: block;
    height: 0.2rem;
    background: var(--gc4b-primary);
    border-radius: 0.1rem;
    transition: var(--gc4b-transition-fast);
}

.gc4b-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.5rem, 0.5rem);
}

.gc4b-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.gc4b-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.5rem, -0.5rem);
}

.gc4b-mobile-menu {
    position: fixed;
    top: 6rem;
    right: -100%;
    width: 80%;
    max-width: 30rem;
    height: calc(100vh - 6rem);
    background: var(--gc4b-bg);
    transition: var(--gc4b-transition);
    z-index: 9999;
    overflow-y: auto;
    border-left: 0.1rem solid var(--gc4b-border);
}

.gc4b-mobile-menu.active {
    right: 0;
}

.gc4b-menu-overlay {
    position: fixed;
    top: 6rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: var(--gc4b-transition);
    z-index: 9998;
}

.gc4b-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gc4b-menu-list {
    list-style: none;
    padding: var(--gc4b-spacing-md) 0;
}

.gc4b-menu-item {
    border-bottom: 0.1rem solid var(--gc4b-border);
}

.gc4b-menu-link {
    display: block;
    padding: var(--gc4b-spacing-md) var(--gc4b-spacing-lg);
    color: var(--gc4b-text);
    text-decoration: none;
    transition: var(--gc4b-transition-fast);
    font-size: 1.6rem;
}

.gc4b-menu-link:hover,
.gc4b-menu-link.active {
    background: var(--gc4b-surface);
    color: var(--gc4b-secondary);
}

/* Buttons */
.gc4b-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gc4b-spacing-xs);
    padding: var(--gc4b-spacing-sm) var(--gc4b-spacing-md);
    border: none;
    border-radius: var(--gc4b-radius-md);
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--gc4b-transition-fast);
    min-height: 4.4rem; /* Touch-friendly size */
    white-space: nowrap;
}

.gc4b-btn-primary {
    background: linear-gradient(135deg, var(--gc4b-secondary) 0%, var(--gc4b-accent) 100%);
    color: var(--gc4b-dark);
}

.gc4b-btn-primary:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1.2rem rgba(238, 232, 170, 0.3);
}

.gc4b-btn-secondary {
    background: var(--gc4b-surface);
    color: var(--gc4b-primary);
    border: 0.1rem solid var(--gc4b-border);
}

.gc4b-btn-secondary:hover {
    background: var(--gc4b-border);
    color: var(--gc4b-secondary);
}

.gc4b-btn-small {
    padding: var(--gc4b-spacing-xs) var(--gc4b-spacing-sm);
    font-size: 1.2rem;
    min-height: 3.6rem;
}

/* Carousel */
.gc4b-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--gc4b-radius-lg);
    margin-bottom: var(--gc4b-spacing-lg);
    background: var(--gc4b-surface);
}

.gc4b-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.gc4b-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.gc4b-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.gc4b-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--gc4b-spacing-lg);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.gc4b-slide-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: var(--gc4b-spacing-xs);
}

.gc4b-slide-desc {
    font-size: 1.4rem;
    opacity: 0.9;
}

.gc4b-carousel-indicators {
    position: absolute;
    bottom: var(--gc4b-spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--gc4b-spacing-xs);
}

.gc4b-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: var(--gc4b-radius-full);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--gc4b-transition-fast);
}

.gc4b-indicator.active {
    background: white;
    width: 2.4rem;
    border-radius: 0.4rem;
}

/* Game Grid */
.gc4b-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: var(--gc4b-spacing-sm);
    margin-bottom: var(--gc4b-spacing-lg);
}

.gc4b-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--gc4b-spacing-sm);
    background: var(--gc4b-surface);
    border-radius: var(--gc4b-radius-md);
    transition: var(--gc4b-transition-fast);
    cursor: pointer;
    text-decoration: none;
    color: var(--gc4b-text);
}

.gc4b-game-card:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 0.4rem 1.2rem var(--gc4b-shadow);
    background: var(--gc4b-border);
}

.gc4b-game-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: var(--gc4b-radius-md);
    margin-bottom: var(--gc4b-spacing-xs);
    object-fit: cover;
}

.gc4b-game-name {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Content Sections */
.gc4b-section {
    margin-bottom: var(--gc4b-spacing-xl);
}

.gc4b-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--gc4b-spacing-md);
    color: var(--gc4b-primary);
    display: flex;
    align-items: center;
    gap: var(--gc4b-spacing-sm);
}

.gc4b-section-content {
    background: var(--gc4b-surface);
    border-radius: var(--gc4b-radius-lg);
    padding: var(--gc4b-spacing-md);
    border: 0.1rem solid var(--gc4b-border);
}

.gc4b-text-lead {
    font-size: 1.8rem;
    line-height: 1.6;
    color: var(--gc4b-text-secondary);
    margin-bottom: var(--gc4b-spacing-md);
}

/* Bottom Navigation */
.gc4b-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--gc4b-dark) 0%, var(--gc4b-bg) 100%);
    border-top: 0.1rem solid var(--gc4b-border);
    padding: var(--gc4b-spacing-xs) 0;
    display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
    .gc4b-bottom-nav {
        display: block;
    }
}

.gc4b-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 43rem;
    margin: 0 auto;
    padding: 0 var(--gc4b-spacing-sm);
}

.gc4b-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    min-height: 5.6rem;
    padding: var(--gc4b-spacing-xs);
    text-decoration: none;
    color: var(--gc4b-text-secondary);
    transition: var(--gc4b-transition-fast);
    border-radius: var(--gc4b-radius-md);
    font-size: 1rem;
    text-align: center;
}

.gc4b-bottom-nav-item:hover,
.gc4b-bottom-nav-item.active {
    color: var(--gc4b-secondary);
    background: rgba(238, 232, 170, 0.1);
    transform: translateY(-0.2rem);
}

.gc4b-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
    transition: var(--gc4b-transition-fast);
}

.gc4b-bottom-nav-item:hover .gc4b-bottom-nav-icon {
    transform: scale(1.1);
}

/* Footer */
.gc4b-footer {
    background: var(--gc4b-bg);
    border-top: 0.1rem solid var(--gc4b-border);
    padding: var(--gc4b-spacing-lg) 0 var(--gc4b-spacing-md);
    margin-top: auto;
}

.gc4b-footer-content {
    margin-bottom: var(--gc4b-spacing-lg);
}

.gc4b-footer-section {
    margin-bottom: var(--gc4b-spacing-md);
}

.gc4b-footer-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: var(--gc4b-spacing-sm);
    color: var(--gc4b-primary);
}

.gc4b-footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gc4b-spacing-md);
}

.gc4b-footer-link {
    color: var(--gc4b-text-secondary);
    text-decoration: none;
    transition: var(--gc4b-transition-fast);
    font-size: 1.4rem;
}

.gc4b-footer-link:hover {
    color: var(--gc4b-secondary);
}

.gc4b-partners {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gc4b-spacing-md);
    justify-content: center;
    align-items: center;
    margin: var(--gc4b-spacing-lg) 0;
}

.gc4b-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gc4b-spacing-sm);
    background: var(--gc4b-surface);
    border-radius: var(--gc4b-radius-md);
    min-width: 8rem;
    min-height: 4rem;
}

.gc4b-partner img {
    max-width: 6rem;
    max-height: 2.4rem;
    object-fit: contain;
    filter: grayscale(1) brightness(1.5);
    transition: var(--gc4b-transition-fast);
}

.gc4b-partner:hover img {
    filter: grayscale(0) brightness(1);
}

.gc4b-footer-bottom {
    text-align: center;
    padding-top: var(--gc4b-spacing-md);
    border-top: 0.1rem solid var(--gc4b-border);
    color: var(--gc4b-text-secondary);
    font-size: 1.2rem;
}

/* Utility Classes */
.gc4b-text-center {
    text-align: center;
}

.gc4b-text-primary {
    color: var(--gc4b-primary);
}

.gc4b-text-secondary {
    color: var(--gc4b-text-secondary);
}

.gc4b-mb-sm {
    margin-bottom: var(--gc4b-spacing-sm);
}

.gc4b-mb-md {
    margin-bottom: var(--gc4b-spacing-md);
}

.gc4b-mb-lg {
    margin-bottom: var(--gc4b-spacing-lg);
}

.gc4b-mt-sm {
    margin-top: var(--gc4b-spacing-sm);
}

.gc4b-mt-md {
    margin-top: var(--gc4b-spacing-md);
}

.gc4b-mt-lg {
    margin-top: var(--gc4b-spacing-lg);
}

/* Responsive Design */
@media (min-width: 769px) {
    .gc4b-container {
        max-width: 120rem;
        padding: 0 var(--gc4b-spacing-lg);
    }

    .gc4b-main {
        padding-top: 8rem;
    }

    .gc4b-header-inner {
        padding: var(--gc4b-spacing-md) var(--gc4b-spacing-lg);
    }

    .gc4b-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    }

    .gc4b-footer-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
        gap: var(--gc4b-spacing-lg);
    }
}

/* Animations */
@keyframes gc4b-fadeIn {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gc4b-fade-in {
    animation: gc4b-fadeIn 0.5s ease-out;
}

@keyframes gc4b-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gc4b-pulse {
    animation: gc4b-pulse 2s infinite;
}

/* Loading States */
.gc4b-loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.2rem solid var(--gc4b-border);
    border-radius: var(--gc4b-radius-full);
    border-top-color: var(--gc4b-secondary);
    animation: gc4b-spin 1s linear infinite;
}

@keyframes gc4b-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility */
.gc4b-sr-only {
    position: absolute;
    width: 0.1rem;
    height: 0.1rem;
    padding: 0;
    margin: -0.1rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.gc4b-btn:focus,
.gc4b-menu-link:focus,
.gc4b-footer-link:focus,
.gc4b-game-card:focus {
    outline: 0.2rem solid var(--gc4b-secondary);
    outline-offset: 0.2rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gc4b-border: #666666;
        --gc4b-text-secondary: #cccccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}