/* Lakiwin Gaming Platform CSS Theme
All classes use prefix "s8ed-" for namespace isolation */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Theme Colors */
:root {
    --s8ed-primary: #AFEEEE;
    --s8ed-secondary: #2D2D2D;
    --s8ed-bg: #1a1a1a;
    --s8ed-text: #f0f0f0;
    --s8ed-text-secondary: #cccccc;
    --s8ed-accent: #87CEEB;
    --s8ed-success: #32CD32;
    --s8ed-warning: #FFD700;
    --s8ed-error: #FF6B6B;
    --s8ed-border: #333333;
    --s8ed-shadow: rgba(0, 0, 0, 0.3);
    --s8ed-gradient: linear-gradient(135deg, #AFEEEE 0%, #87CEEB 100%);
    --s8ed-font-size: 62.5%; /* 10px base for easy rem calculations */
}

/* Base Typography */
html {
    font-size: var(--s8ed-font-size);
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 1.6rem; /* 16px */
    line-height: 1.5;
    color: var(--s8ed-text);
    background-color: var(--s8ed-bg);
    overflow-x: hidden;
}

/* Typography Classes */
.s8ed-h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--s8ed-primary);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.s8ed-h2 {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--s8ed-primary);
    line-height: 1.3;
    margin-bottom: 1.2rem;
}

.s8ed-h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--s8ed-text);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.s8ed-text {
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--s8ed-text);
    margin-bottom: 1rem;
}

.s8ed-text-small {
    font-size: 1.4rem;
    line-height: 1.4;
    color: var(--s8ed-text-secondary);
}

/* Layout Classes */
.s8ed-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.s8ed-wrapper {
    min-height: 100vh;
    padding-top: 60px; /* Account for fixed header */
    padding-bottom: 80px; /* Account for fixed bottom nav on mobile */
}

.s8ed-grid {
    display: grid;
    gap: 1.5rem;
}

.s8ed-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.s8ed-flex-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header Styles */
.s8ed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--s8ed-secondary);
    border-bottom: 1px solid var(--s8ed-border);
    z-index: 1000;
    height: 60px;
    backdrop-filter: blur(10px);
}

.s8ed-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
}

.s8ed-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.s8ed-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--s8ed-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--s8ed-secondary);
    font-weight: bold;
    font-size: 1.4rem;
}

.s8ed-logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--s8ed-primary);
    letter-spacing: -0.5px;
}

.s8ed-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.s8ed-btn {
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px; /* Touch-friendly minimum height */
    white-space: nowrap;
}

.s8ed-btn-primary {
    background: var(--s8ed-gradient);
    color: var(--s8ed-secondary);
    box-shadow: 0 2px 8px var(--s8ed-shadow);
}

.s8ed-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--s8ed-shadow);
}

.s8ed-btn-secondary {
    background: transparent;
    color: var(--s8ed-primary);
    border: 2px solid var(--s8ed-primary);
}

.s8ed-btn-secondary:hover {
    background: var(--s8ed-primary);
    color: var(--s8ed-secondary);
}

.s8ed-menu-toggle {
    background: none;
    border: none;
    color: var(--s8ed-primary);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.s8ed-menu-toggle:hover {
    background: rgba(175, 238, 238, 0.1);
}

/* Mobile Menu Styles */
.s8ed-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--s8ed-secondary);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.s8ed-mobile-menu.active {
    right: 0;
}

.s8ed-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;
}

.s8ed-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.s8ed-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--s8ed-primary);
    font-size: 2.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.s8ed-menu-nav {
    margin-top: 3rem;
}

.s8ed-menu-nav-item {
    display: block;
    padding: 1.2rem 0;
    color: var(--s8ed-text);
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 500;
    border-bottom: 1px solid var(--s8ed-border);
    transition: color 0.3s ease;
}

.s8ed-menu-nav-item:hover {
    color: var(--s8ed-primary);
}

/* Carousel Styles */
.s8ed-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.s8ed-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.s8ed-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.s8ed-carousel-slide.active {
    opacity: 1;
}

.s8ed-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s8ed-carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.s8ed-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.s8ed-carousel-indicator.active {
    background: var(--s8ed-primary);
}

/* Game Card Styles */
.s8ed-games-section {
    margin-bottom: 3rem;
}

.s8ed-games-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.s8ed-games-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--s8ed-primary);
}

.s8ed-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.s8ed-game-card {
    background: var(--s8ed-secondary);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--s8ed-border);
}

.s8ed-game-card:hover {
    transform: translateY(-2px);
    border-color: var(--s8ed-primary);
    box-shadow: 0 4px 12px var(--s8ed-shadow);
}

.s8ed-game-icon {
    width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.s8ed-game-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--s8ed-text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Content Section Styles */
.s8ed-section {
    background: var(--s8ed-secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--s8ed-border);
}

.s8ed-section-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--s8ed-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.s8ed-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.s8ed-feature-item {
    background: var(--s8ed-bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--s8ed-border);
}

.s8ed-feature-icon {
    font-size: 2.4rem;
    color: var(--s8ed-primary);
    margin-bottom: 1rem;
}

.s8ed-feature-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--s8ed-text);
    margin-bottom: 0.5rem;
}

.s8ed-feature-text {
    font-size: 1.4rem;
    color: var(--s8ed-text-secondary);
    line-height: 1.4;
}

/* Bottom Navigation Styles */
.s8ed-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--s8ed-secondary);
    border-top: 1px solid var(--s8ed-border);
    z-index: 1000;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 1rem;
}

.s8ed-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--s8ed-text-secondary);
    font-size: 1rem;
    min-width: 60px;
    min-height: 60px;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.s8ed-bottom-nav-item:hover,
.s8ed-bottom-nav-item.active {
    color: var(--s8ed-primary);
    background: rgba(175, 238, 238, 0.1);
    transform: scale(1.05);
}

.s8ed-bottom-nav-icon {
    font-size: 2.4rem;
    margin-bottom: 0.2rem;
}

.s8ed-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Footer Styles */
.s8ed-footer {
    background: var(--s8ed-secondary);
    border-top: 1px solid var(--s8ed-border);
    padding: 3rem 0 2rem;
    margin-bottom: 64px; /* Account for fixed bottom nav */
}

.s8ed-footer-content {
    text-align: center;
    margin-bottom: 2rem;
}

.s8ed-footer-text {
    font-size: 1.4rem;
    color: var(--s8ed-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.s8ed-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.s8ed-footer-link {
    color: var(--s8ed-primary);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.s8ed-footer-link:hover {
    color: var(--s8ed-accent);
}

.s8ed-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.s8ed-partner-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.s8ed-partner-icon:hover {
    opacity: 1;
}

.s8ed-copyright {
    font-size: 1.2rem;
    color: var(--s8ed-text-secondary);
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--s8ed-border);
}

/* Back to Top Button */
.s8ed-back-to-top {
    position: fixed;
    bottom: 80px;
    right: 2rem;
    background: var(--s8ed-gradient);
    color: var(--s8ed-secondary);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px var(--s8ed-shadow);
}

.s8ed-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.s8ed-back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--s8ed-shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .s8ed-wrapper {
        padding-bottom: 80px;
    }

    .s8ed-games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }

    .s8ed-game-card {
        padding: 0.8rem;
    }

    .s8ed-game-icon {
        height: 50px;
    }

    .s8ed-feature-grid {
        grid-template-columns: 1fr;
    }

    .s8ed-footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (min-width: 769px) {
    .s8ed-bottom-nav {
        display: none;
    }

    .s8ed-footer {
        margin-bottom: 0;
    }
}

/* Utility Classes */
.s8ed-text-center {
    text-align: center;
}

.s8ed-text-primary {
    color: var(--s8ed-primary);
}

.s8ed-bg-primary {
    background: var(--s8ed-primary);
}

.s8ed-gradient-text {
    background: var(--s8ed-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.s8ed-shadow {
    box-shadow: 0 2px 8px var(--s8ed-shadow);
}

.s8ed-rounded {
    border-radius: 8px;
}

.s8ed-rounded-lg {
    border-radius: 12px;
}

.s8ed-mb-1 { margin-bottom: 1rem; }
.s8ed-mb-2 { margin-bottom: 2rem; }
.s8ed-mb-3 { margin-bottom: 3rem; }

.s8ed-mt-1 { margin-top: 1rem; }
.s8ed-mt-2 { margin-top: 2rem; }
.s8ed-mt-3 { margin-top: 3rem; }

/* Animation Classes */
.s8ed-fade-in {
    animation: s8edFadeIn 0.5s ease-in-out;
}

@keyframes s8edFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.s8ed-slide-in {
    animation: s8edSlideIn 0.3s ease-out;
}

@keyframes s8edSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}