/* JL 77 Theme CSS */
:root {
    --jl77-bg: #34495E;
    --jl77-text: #FFAA00;
    --jl77-accent1: #FF8C00;
    --jl77-accent2: #FF9800;
    --jl77-white: #FFFFFF;
    --jl77-black: #000000;
    --jl77-gray: #95A5A6;
    --jl77-dark: #2C3E50;
    --jl77-darker: #1A252F;
    --jl77-gradient: linear-gradient(135deg, var(--jl77-accent1) 0%, var(--jl77-accent2) 100%);
    --jl77-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --jl77-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
    --jl77-transition: all 0.3s ease;
}

/* Reset and 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.6;
    color: var(--jl77-text);
    background-color: var(--jl77-bg);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.4rem; }
h4 { font-size: 2rem; }
h5 { font-size: 1.8rem; }
h6 { font-size: 1.6rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--jl77-accent1);
    text-decoration: none;
    transition: var(--jl77-transition);
}

a:hover {
    color: var(--jl77-accent2);
}

/* Container */
.jl77-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.jl77-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--jl77-darker) 0%, var(--jl77-dark) 100%);
    box-shadow: var(--jl77-shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.jl77-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jl77-logo {
    display: flex;
    align-items: center;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--jl77-text);
    text-decoration: none;
}

.jl77-logo img {
    width: 3.2rem;
    height: 3.2rem;
    margin-right: 0.8rem;
}

.jl77-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.jl77-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: var(--jl77-transition);
    text-decoration: none;
    min-height: 4.4rem;
    min-width: 8rem;
}

.jl77-btn-primary {
    background: var(--jl77-gradient);
    color: var(--jl77-white);
    box-shadow: var(--jl77-shadow);
}

.jl77-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--jl77-shadow-lg);
    color: var(--jl77-white);
}

.jl77-btn-secondary {
    background: transparent;
    color: var(--jl77-text);
    border: 2px solid var(--jl77-text);
}

.jl77-btn-secondary:hover {
    background: var(--jl77-text);
    color: var(--jl77-bg);
}

.jl77-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--jl77-text);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 4.4rem;
    min-height: 4.4rem;
}

/* Navigation */
.jl77-nav {
    display: flex;
    align-items: center;
}

.jl77-nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.jl77-nav-link {
    color: var(--jl77-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    transition: var(--jl77-transition);
}

.jl77-nav-link:hover,
.jl77-nav-link.active {
    background: rgba(255, 170, 0, 0.1);
    color: var(--jl77-accent1);
}

/* Mobile Menu */
.jl77-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--jl77-darker);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.jl77-mobile-menu.active {
    right: 0;
}

.jl77-mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--jl77-text);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
}

.jl77-mobile-nav-list {
    list-style: none;
    margin-top: 3rem;
}

.jl77-mobile-nav-item {
    margin-bottom: 1rem;
}

.jl77-mobile-nav-link {
    display: block;
    color: var(--jl77-text);
    font-size: 1.8rem;
    padding: 1rem;
    border-radius: 0.4rem;
    transition: var(--jl77-transition);
}

.jl77-mobile-nav-link:hover {
    background: rgba(255, 170, 0, 0.1);
    color: var(--jl77-accent1);
}

/* Hero Section */
.jl77-hero {
    position: relative;
    margin-top: 6rem;
    background: var(--jl77-darker);
    overflow: hidden;
}

.jl77-hero-carousel {
    position: relative;
    height: 40rem;
}

.jl77-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jl77-hero-slide.active {
    opacity: 1;
}

.jl77-hero-content {
    text-align: center;
    color: var(--jl77-white);
    z-index: 2;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    max-width: 80%;
}

.jl77-hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.jl77-hero-subtitle {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.jl77-hero-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.jl77-hero-control {
    background: rgba(0, 0, 0, 0.5);
    color: var(--jl77-white);
    border: none;
    font-size: 2.4rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    pointer-events: all;
    transition: var(--jl77-transition);
    min-width: 4.4rem;
    min-height: 4.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jl77-hero-control:hover {
    background: rgba(255, 170, 0, 0.8);
}

/* Main Content */
.jl77-main {
    padding: 2rem 0 8rem;
}

@media (max-width: 768px) {
    .jl77-main {
        padding-bottom: 10rem;
    }
}

/* Game Categories */
.jl77-game-categories {
    margin-bottom: 3rem;
}

.jl77-category-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.jl77-category-btn {
    background: var(--jl77-dark);
    color: var(--jl77-text);
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--jl77-transition);
    white-space: nowrap;
    min-height: 4.4rem;
}

.jl77-category-btn:hover,
.jl77-category-btn.active {
    background: var(--jl77-gradient);
    color: var(--jl77-white);
    transform: translateY(-2px);
}

/* Game Grid */
.jl77-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.5rem;
}

.jl77-game-item {
    background: var(--jl77-dark);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--jl77-transition);
    cursor: pointer;
    position: relative;
}

.jl77-game-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--jl77-shadow-lg);
}

.jl77-game-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: var(--jl77-transition);
}

.jl77-game-item:hover .jl77-game-image {
    transform: scale(1.05);
}

.jl77-game-info {
    padding: 1rem;
    text-align: center;
}

.jl77-game-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--jl77-text);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jl77-game-type {
    font-size: 1.2rem;
    color: var(--jl77-gray);
    text-transform: capitalize;
}

/* Content Modules */
.jl77-content-section {
    background: var(--jl77-dark);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.jl77-content-title {
    color: var(--jl77-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.jl77-content-title i {
    color: var(--jl77-accent1);
}

.jl77-content-text {
    color: var(--jl77-gray);
    margin-bottom: 1.5rem;
}

.jl77-content-text:last-child {
    margin-bottom: 0;
}

/* Affiliate Links */
.jl77-affiliate-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.jl77-affiliate-btn {
    background: var(--jl77-gradient);
    color: var(--jl77-white);
    padding: 1rem 2rem;
    border-radius: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--jl77-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 4.4rem;
}

.jl77-affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--jl77-shadow-lg);
    color: var(--jl77-white);
}

/* Partners */
.jl77-partners {
    margin-top: 3rem;
    text-align: center;
}

.jl77-partners-title {
    color: var(--jl77-text);
    margin-bottom: 2rem;
}

.jl77-partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.jl77-partner-item {
    background: var(--jl77-white);
    border-radius: 0.8rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 6rem;
    transition: var(--jl77-transition);
}

.jl77-partner-item:hover {
    transform: scale(1.05);
}

.jl77-partner-item img {
    max-width: 100%;
    max-height: 4rem;
    object-fit: contain;
}

/* Footer */
.jl77-footer {
    background: var(--jl77-darker);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.jl77-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.jl77-footer-section h4 {
    color: var(--jl77-text);
    margin-bottom: 1rem;
}

.jl77-footer-links {
    list-style: none;
}

.jl77-footer-links li {
    margin-bottom: 0.5rem;
}

.jl77-footer-links a {
    color: var(--jl77-gray);
    transition: var(--jl77-transition);
}

.jl77-footer-links a:hover {
    color: var(--jl77-accent1);
}

.jl77-footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--jl77-dark);
    color: var(--jl77-gray);
    font-size: 1.4rem;
}

/* Bottom Navigation */
.jl77-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--jl77-darker);
    border-top: 1px solid var(--jl77-dark);
    z-index: 1000;
    padding: 0.5rem 0;
}

.jl77-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 6rem;
}

.jl77-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--jl77-gray);
    cursor: pointer;
    transition: var(--jl77-transition);
    padding: 0.5rem;
    min-width: 6rem;
    min-height: 5rem;
    border-radius: 0.8rem;
}

.jl77-bottom-nav-btn:hover,
.jl77-bottom-nav-btn.active {
    color: var(--jl77-text);
    background: rgba(255, 170, 0, 0.1);
}

.jl77-bottom-nav-btn i {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
}

.jl77-bottom-nav-btn span {
    font-size: 1rem;
    font-weight: 500;
}

/* Back to Top Button */
.jl77-back-to-top {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    background: var(--jl77-gradient);
    color: var(--jl77-white);
    border: none;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--jl77-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--jl77-transition);
    z-index: 999;
}

.jl77-back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.jl77-back-to-top:hover {
    transform: translateY(-3px);
}

/* Toast Notification */
.jl77-toast {
    position: fixed;
    top: 10rem;
    right: 2rem;
    background: var(--jl77-accent1);
    color: var(--jl77-white);
    padding: 1rem 2rem;
    border-radius: 0.8rem;
    box-shadow: var(--jl77-shadow-lg);
    opacity: 0;
    transform: translateY(-2rem);
    transition: var(--jl77-transition);
    z-index: 9999;
}

.jl77-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .jl77-menu-toggle {
        display: block;
    }

    .jl77-nav {
        display: none;
    }

    .jl77-hero-title {
        font-size: 3rem;
    }

    .jl77-hero-subtitle {
        font-size: 1.6rem;
    }

    .jl77-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
        gap: 1rem;
    }

    .jl77-footer-content {
        grid-template-columns: 1fr;
    }

    .jl77-bottom-nav {
        display: block;
    }

    @media (min-width: 769px) {
        .jl77-bottom-nav {
            display: none;
        }
    }
}

@media (max-width: 430px) {
    html {
        font-size: 50%;
    }

    .jl77-hero-carousel {
        height: 30rem;
    }

    .jl77-category-tabs {
        gap: 0.5rem;
    }

    .jl77-category-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1.2rem;
    }

    .jl77-affiliate-links {
        flex-direction: column;
    }

    .jl77-affiliate-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
button:focus,
a:focus {
    outline: 2px solid var(--jl77-accent1);
    outline-offset: 2px;
}

/* Loading state */
.jl77-loading {
    position: relative;
    overflow: hidden;
}

.jl77-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Utility Classes */
.jl77-text-center { text-align: center; }
.jl77-text-left { text-align: left; }
.jl77-text-right { text-align: right; }
.jl77-mt-1 { margin-top: 1rem; }
.jl77-mt-2 { margin-top: 2rem; }
.jl77-mt-3 { margin-top: 3rem; }
.jl77-mb-1 { margin-bottom: 1rem; }
.jl77-mb-2 { margin-bottom: 2rem; }
.jl77-mb-3 { margin-bottom: 3rem; }
.jl77-hidden { display: none; }
.jl77-block { display: block; }
.jl77-flex { display: flex; }
.jl77-grid { display: grid; }

/* Image lazy loading */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img.jl77-loaded {
    filter: blur(0);
}