/**
 * 18jl app - Main Stylesheet
 * Mobile-first responsive design with custom color palette
 */

/* CSS Variables for consistent theming */
:root {
    --sfc5-primary: #2C3E50;
    --sfc5-secondary: #FF6347;
    --sfc5-accent: #FFF176;
    --sfc5-light: #E0FFFF;
    --sfc5-highlight: #FFB347;
    --sfc5-text: #333333;
    --sfc5-text-light: #666666;
    --sfc5-bg: #ffffff;
    --sfc5-bg-alt: #f8f9fa;
    --sfc5-border: #e0e0e0;
    --sfc5-shadow: rgba(0, 0, 0, 0.1);
    --sfc5-shadow-hover: rgba(0, 0, 0, 0.15);
    --sfc5-success: #28a745;
    --sfc5-warning: #ffc107;
    --sfc5-error: #dc3545;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px for easier calculations */
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1.4rem; /* 14px base font size */
    line-height: 1.5;
    color: var(--sfc5-text);
    background-color: var(--sfc5-bg);
    max-width: 100%;
    overflow-x: hidden;
}

/* Container and layout utilities */
.sfc5-container {
    width: 100%;
    max-width: 430px; /* Mobile-first max width */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sfc5-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sfc5-main {
    flex: 1;
    padding-bottom: 8rem; /* Space for fixed bottom nav on mobile */
}

/* Grid system */
.sfc5-grid {
    display: grid;
    gap: 1rem;
}

.sfc5-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sfc5-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sfc5-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Header and navigation */
.sfc5-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--sfc5-primary) 0%, var(--sfc5-secondary) 100%);
    box-shadow: 0 2px 10px var(--sfc5-shadow);
    backdrop-filter: blur(10px);
}

.sfc5-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    height: 6rem;
}

.sfc5-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.8rem;
}

.sfc5-logo-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.5rem;
    background: var(--sfc5-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--sfc5-primary);
}

.sfc5-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sfc5-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.4rem; /* Touch-friendly minimum height */
    touch-action: manipulation;
}

.sfc5-btn-primary {
    background: var(--sfc5-accent);
    color: var(--sfc5-primary);
    box-shadow: 0 2px 8px rgba(255, 241, 118, 0.3);
}

.sfc5-btn-primary:hover {
    background: #ffeb3b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 241, 118, 0.4);
}

.sfc5-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.sfc5-btn-secondary:hover {
    background: white;
    color: var(--sfc5-primary);
}

.sfc5-btn-promo {
    background: linear-gradient(135deg, var(--sfc5-secondary) 0%, var(--sfc5-highlight) 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 99, 71, 0.3);
}

.sfc5-btn-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 99, 71, 0.4);
}

/* Mobile menu toggle */
.sfc5-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2.4rem;
    height: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.sfc5-menu-toggle span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Desktop navigation */
.sfc5-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.sfc5-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.sfc5-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sfc5-accent);
}

/* Mobile menu */
.sfc5-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--sfc5-primary);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.sfc5-mobile-menu.active {
    right: 0;
}

.sfc5-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sfc5-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sfc5-mobile-nav {
    list-style: none;
    margin-top: 2rem;
}

.sfc5-mobile-nav li {
    margin-bottom: 1rem;
}

.sfc5-mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.6rem;
    padding: 1rem;
    display: block;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.sfc5-mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sfc5-accent);
}

/* Carousel */
.sfc5-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px var(--sfc5-shadow);
}

.sfc5-carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.sfc5-slide {
    min-width: 100%;
    position: relative;
    cursor: pointer;
}

.sfc5-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.sfc5-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.sfc5-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.sfc5-indicator.active {
    background: var(--sfc5-accent);
    transform: scale(1.2);
}

/* Game cards and sections */
.sfc5-section {
    margin: 3rem 0;
}

.sfc5-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sfc5-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.sfc5-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.sfc5-game-card {
    background: var(--sfc5-bg);
    border-radius: 0.8rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--sfc5-shadow);
    border: 1px solid var(--sfc5-border);
}

.sfc5-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--sfc5-shadow-hover);
    border-color: var(--sfc5-secondary);
}

.sfc5-game-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.sfc5-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sfc5-game-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sfc5-text);
    line-height: 1.2;
    margin: 0;
}

/* Content sections */
.sfc5-content-section {
    background: var(--sfc5-bg-alt);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 15px var(--sfc5-shadow);
}

.sfc5-content-section h2 {
    color: var(--sfc5-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.sfc5-content-section h3 {
    color: var(--sfc5-secondary);
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.sfc5-content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.sfc5-content-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.sfc5-content-section li {
    margin-bottom: 0.5rem;
}

/* Promotional links */
.sfc5-promo-link {
    color: var(--sfc5-secondary);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sfc5-promo-link:hover {
    color: var(--sfc5-highlight);
    text-decoration: underline;
}

/* Footer */
.sfc5-footer {
    background: var(--sfc5-primary);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.sfc5-footer-content {
    text-align: center;
}

.sfc5-footer-section {
    margin-bottom: 2rem;
}

.sfc5-footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--sfc5-accent);
}

.sfc5-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sfc5-footer-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.sfc5-footer-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--sfc5-accent);
}

.sfc5-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.sfc5-partner-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--sfc5-accent);
}

.sfc5-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
}

/* Bottom navigation */
.sfc5-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--sfc5-primary) 0%, var(--sfc5-secondary) 100%);
    box-shadow: 0 -2px 10px var(--sfc5-shadow);
    z-index: 1000;
    display: none; /* Hidden by default, shown on mobile */
}

.sfc5-bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 6rem;
    max-width: 430px;
    margin: 0 auto;
}

.sfc5-bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    min-height: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.sfc5-bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.sfc5-bottom-nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--sfc5-accent);
}

.sfc5-bottom-nav-icon {
    font-size: 2.4rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.sfc5-bottom-nav-item.active .sfc5-bottom-nav-icon {
    color: var(--sfc5-accent);
    transform: scale(1.1);
}

.sfc5-bottom-nav-label {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
}

/* Scroll to top button */
.sfc5-scroll-top {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background: var(--sfc5-secondary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px var(--sfc5-shadow);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.sfc5-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.sfc5-scroll-top:hover {
    background: var(--sfc5-highlight);
    transform: translateY(-2px);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .sfc5-menu-toggle {
        display: flex;
    }

    .sfc5-nav {
        display: none;
    }

    .sfc5-bottom-nav {
        display: block;
    }

    .sfc5-main {
        padding-bottom: 8rem;
    }

    .sfc5-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }

    .sfc5-game-card {
        padding: 0.8rem;
    }

    .sfc5-game-icon {
        width: 3.5rem;
        height: 3.5rem;
    }

    .sfc5-game-name {
        font-size: 0.9rem;
    }

    .sfc5-section-title {
        font-size: 1.8rem;
    }

    .sfc5-content-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sfc5-container {
        padding: 0 1rem;
    }

    .sfc5-header-content {
        padding: 1rem;
    }

    .sfc5-game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .sfc5-game-card {
        padding: 0.6rem;
    }

    .sfc5-game-icon {
        width: 3rem;
        height: 3rem;
    }

    .sfc5-game-name {
        font-size: 0.8rem;
    }

    .sfc5-bottom-nav-inner {
        height: 5.6rem;
    }

    .sfc5-bottom-nav-icon {
        font-size: 2rem;
    }

    .sfc5-bottom-nav-label {
        font-size: 0.9rem;
    }
}

/* Utility classes */
.sfc5-text-center {
    text-align: center;
}

.sfc5-text-primary {
    color: var(--sfc5-primary);
}

.sfc5-text-secondary {
    color: var(--sfc5-secondary);
}

.sfc5-text-accent {
    color: var(--sfc5-accent);
}

.sfc5-bg-primary {
    background-color: var(--sfc5-primary);
}

.sfc5-bg-secondary {
    background-color: var(--sfc5-secondary);
}

.sfc5-bg-accent {
    background-color: var(--sfc5-accent);
}

.sfc5-mb-1 { margin-bottom: 1rem; }
.sfc5-mb-2 { margin-bottom: 2rem; }
.sfc5-mb-3 { margin-bottom: 3rem; }

.sfc5-mt-1 { margin-top: 1rem; }
.sfc5-mt-2 { margin-top: 2rem; }
.sfc5-mt-3 { margin-top: 3rem; }

.sfc5-p-1 { padding: 1rem; }
.sfc5-p-2 { padding: 2rem; }
.sfc5-p-3 { padding: 3rem; }

/* Animation utilities */
@keyframes sfc5-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sfc5-fade-in {
    animation: sfc5-fadeIn 0.6s ease-out;
}

@keyframes sfc5-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sfc5-pulse {
    animation: sfc5-pulse 2s infinite;
}

/* Accessibility */
.sfc5-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
.sfc5-btn:focus,
.sfc5-nav a:focus,
.sfc5-promo-link:focus {
    outline: 2px solid var(--sfc5-accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sfc5-header,
    .sfc5-bottom-nav,
    .sfc5-scroll-top {
        display: none !important;
    }

    .sfc5-main {
        padding-bottom: 0 !important;
    }
}