/* 365jili Official CSS Theme System */
/* Version: 365jili.xyz */
/* All classes prefixed with 's081-' to prevent conflicts */

/* CSS Custom Properties */
:root {
    --s081-primary: #228B22;
    --s081-primary-dark: #1F5F1F;
    --s081-primary-light: #32CD32;
    --s081-secondary: #808080;
    --s081-accent: #FA8072;
    --s081-accent-light: #FFDFBA;
    --s081-bg: #273746;
    --s081-bg-light: #34495E;
    --s081-bg-card: #2C3E50;
    --s081-text: #FFDFBA;
    --s081-text-light: #90EE90;
    --s081-text-muted: #BDC3C7;
    --s081-border: #34495E;
    --s081-border-light: #5D6D7E;
    --s081-shadow: rgba(34, 139, 34, 0.2);
    --s081-shadow-strong: rgba(34, 139, 34, 0.4);
    --s081-gradient: linear-gradient(135deg, var(--s081-primary), var(--s081-primary-dark));
    --s081-gradient-accent: linear-gradient(135deg, var(--s081-accent), var(--s081-accent-light));
    --s081-vh: 1vh;
}

/* 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, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--s081-text);
    background: var(--s081-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.s081-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s081-wrapper {
    min-height: 100vh;
    min-height: calc(var(--s081-vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
}

/* Typography */
.s081-h1 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--s081-text-light);
    margin-bottom: 1.5rem;
}

.s081-h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--s081-text-light);
    margin-bottom: 1.2rem;
}

.s081-h3 {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--s081-text-light);
    margin-bottom: 1rem;
}

.s081-text {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--s081-text);
    margin-bottom: 1rem;
}

.s081-text-small {
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--s081-text-muted);
}

.s081-text-center {
    text-align: center;
}

.s081-text-primary {
    color: var(--s081-primary);
}

.s081-text-accent {
    color: var(--s081-accent);
}

/* Header */
.s081-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(39, 55, 70, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--s081-border);
    padding: 1rem 0;
}

.s081-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.s081-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--s081-text-light);
    font-weight: 700;
    font-size: 1.6rem;
}

.s081-logo-icon {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.6rem;
    object-fit: cover;
}

.s081-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.s081-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.s081-menu-bar {
    width: 100%;
    height: 2px;
    background: var(--s081-text-light);
    margin: 2px 0;
    transition: all 0.3s ease;
}

.s081-menu-active .s081-menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.s081-menu-active .s081-menu-bar:nth-child(2) {
    opacity: 0;
}

.s081-menu-active .s081-menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Menu */
.s081-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.s081-backdrop-active {
    opacity: 1;
    visibility: visible;
}

.s081-nav-menu {
    position: fixed;
    top: 7rem;
    right: -100%;
    width: 80%;
    max-width: 30rem;
    height: calc(100vh - 7rem);
    background: var(--s081-bg-light);
    border-left: 1px solid var(--s081-border);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.s081-nav-active {
    right: 0;
}

.s081-nav-list {
    list-style: none;
    padding: 2rem 0;
}

.s081-nav-item {
    border-bottom: 1px solid var(--s081-border);
}

.s081-nav-link {
    display: block;
    padding: 1.5rem 2rem;
    color: var(--s081-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.s081-nav-link:hover,
.s081-nav-link:focus {
    color: var(--s081-primary);
    background: rgba(34, 139, 34, 0.1);
}

/* Body Lock */
.s081-nav-open {
    overflow: hidden;
}

/* Buttons */
.s081-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 4.4rem;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.s081-btn-primary {
    background: var(--s081-gradient);
    color: var(--s081-text-light);
    box-shadow: 0 2px 8px var(--s081-shadow);
}

.s081-btn-primary:hover,
.s081-btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--s081-shadow-strong);
}

.s081-btn-secondary {
    background: var(--s081-gradient-accent);
    color: var(--s081-bg);
    box-shadow: 0 2px 8px rgba(250, 128, 114, 0.2);
}

.s081-btn-outline {
    background: transparent;
    color: var(--s081-primary);
    border: 1px solid var(--s081-primary);
}

.s081-btn-outline:hover,
.s081-btn-outline:focus {
    background: var(--s081-primary);
    color: var(--s081-text-light);
}

.s081-btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    min-height: 3.6rem;
}

.s081-btn-large {
    padding: 1.2rem 2.4rem;
    font-size: 1.5rem;
    min-height: 5.2rem;
}

.s081-touch-active {
    transform: scale(0.98);
}

/* Main Content */
.s081-main {
    flex: 1;
    padding-top: 7rem;
    padding-bottom: 8rem;
}

.s081-section {
    padding: 2rem 0;
}

.s081-section-sm {
    padding: 1.5rem 0;
}

.s081-section-lg {
    padding: 3rem 0;
}

/* Cards */
.s081-card {
    background: var(--s081-bg-card);
    border: 1px solid var(--s081-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.s081-card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--s081-border);
}

.s081-card-body {
    margin-bottom: 1rem;
}

.s081-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--s081-border);
}

/* Grid System */
.s081-grid {
    display: grid;
    gap: 1.5rem;
}

.s081-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.s081-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.s081-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Game Grid */
.s081-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.s081-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--s081-bg-card);
    border: 1px solid var(--s081-border);
    border-radius: 0.8rem;
    text-decoration: none;
    color: var(--s081-text);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 10rem;
    position: relative;
    overflow: hidden;
}

.s081-game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--s081-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.s081-game-hover::before,
.s081-game-item:hover::before {
    opacity: 0.1;
}

.s081-game-clicked {
    transform: scale(0.95);
}

.s081-game-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.6rem;
    object-fit: cover;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.s081-game-name {
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

/* Carousel */
.s081-carousel {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}

.s081-carousel-container {
    position: relative;
    height: 20rem;
    overflow: hidden;
}

.s081-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.s081-slide-active {
    opacity: 1;
}

.s081-carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s081-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.s081-carousel-indicator {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.s081-indicator-active {
    background: var(--s081-primary);
    transform: scale(1.2);
}

/* Bottom Navigation */
.s081-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--s081-bg-light);
    border-top: 1px solid var(--s081-border);
    z-index: 900;
    height: 6rem;
}

.s081-bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1rem;
}

.s081-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 0.8rem;
    min-height: 4.4rem;
    position: relative;
}

.s081-bottom-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--s081-text-muted);
    transition: color 0.3s ease;
}

.s081-nav-active a {
    color: var(--s081-primary);
}

.s081-nav-clicked {
    transform: scale(0.9);
    background: rgba(34, 139, 34, 0.1);
}

.s081-nav-icon {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
    transition: all 0.3s ease;
}

.s081-nav-text {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
}

/* Footer */
.s081-footer {
    background: var(--s081-bg-light);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--s081-border);
    margin-top: auto;
}

.s081-footer-content {
    text-align: center;
}

.s081-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}

.s081-footer-link {
    color: var(--s081-text);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.s081-footer-link:hover,
.s081-footer-link:focus {
    color: var(--s081-primary);
}

.s081-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--s081-bg-card);
    border-radius: 0.8rem;
}

.s081-partner-logo {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.s081-partner-logo:hover {
    opacity: 1;
}

.s081-copyright {
    font-size: 1.2rem;
    color: var(--s081-text-muted);
    line-height: 1.4;
}

/* Utility Classes */
.s081-mb-1 { margin-bottom: 1rem; }
.s081-mb-2 { margin-bottom: 2rem; }
.s081-mb-3 { margin-bottom: 3rem; }
.s081-mt-1 { margin-top: 1rem; }
.s081-mt-2 { margin-top: 2rem; }
.s081-mt-3 { margin-top: 3rem; }
.s081-p-1 { padding: 1rem; }
.s081-p-2 { padding: 2rem; }
.s081-p-3 { padding: 3rem; }

.s081-hidden { display: none; }
.s081-visible { display: block; }

/* Image Lazy Loading */
.s081-lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.s081-loaded {
    opacity: 1;
}

/* Responsive Design */
@media (min-width: 480px) {
    .s081-container {
        padding: 0 2rem;
    }
    
    .s081-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    }
}

@media (min-width: 768px) {
    .s081-bottom-nav {
        display: none;
    }
    
    .s081-main {
        padding-bottom: 2rem;
    }
    
    .s081-nav-actions {
        gap: 1.2rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .s081-carousel-image,
    .s081-game-icon,
    .s081-partner-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --s081-shadow: rgba(34, 139, 34, 0.25);
        --s081-shadow-strong: rgba(34, 139, 34, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .s081-carousel-slide {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .s081-header,
    .s081-bottom-nav,
    .s081-nav-menu,
    .s081-carousel {
        display: none !important;
    }
    
    .s081-main {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}