/**
 * KM888 Gaming Platform - Core Styles
 * @description Mobile-first responsive styles for km888.club
 * @version 1.0.0
 * @author km888 Team
 */

/* ==================== CSS Variables ==================== */
:root {
    --v6ab-primary: #B22222;
    --v6ab-primary-dark: #8B0000;
    --v6ab-secondary: #E9967A;
    --v6ab-accent: #F4A460;
    --v6ab-bg: #262626;
    --v6ab-bg-dark: #1a1a1a;
    --v6ab-text: #ffffff;
    --v6ab-text-muted: #cccccc;
    --v6ab-border: #333333;
    --v6ab-shadow: rgba(0, 0, 0, 0.3);
    --v6ab-gradient: linear-gradient(135deg, #B22222 0%, #8B0000 100%);
}

/* ==================== Base Styles ==================== */
html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--v6ab-text);
    background-color: var(--v6ab-bg);
    min-height: 100vh;
    max-width: 430px;
    margin: 0 auto;
}

a {
    color: var(--v6ab-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--v6ab-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== Header ==================== */
.v6ab-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--v6ab-bg-dark) 0%, rgba(26, 26, 26, 0.95) 100%);
    padding: 0.8rem 1rem;
    z-index: 1000;
    border-bottom: 1px solid var(--v6ab-border);
    transition: all 0.3s ease;
}

.v6ab-header-scrolled {
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 0 2px 10px var(--v6ab-shadow);
}

.v6ab-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v6ab-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.v6ab-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.v6ab-logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--v6ab-text);
    background: var(--v6ab-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.v6ab-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.v6ab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 36px;
}

.v6ab-btn-primary {
    background: var(--v6ab-gradient);
    color: var(--v6ab-text);
}

.v6ab-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(178, 34, 34, 0.4);
}

.v6ab-btn-outline {
    background: transparent;
    color: var(--v6ab-secondary);
    border: 1px solid var(--v6ab-secondary);
}

.v6ab-btn-outline:hover {
    background: var(--v6ab-secondary);
    color: var(--v6ab-bg-dark);
}

.v6ab-menu-toggle {
    background: transparent;
    border: none;
    color: var(--v6ab-text);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Mobile Menu ==================== */
.v6ab-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.v6ab-overlay-active {
    opacity: 1;
    visibility: visible;
}

.v6ab-mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--v6ab-bg-dark);
    z-index: 9999;
    padding: 2rem;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.v6ab-menu-active {
    right: 0;
}

.v6ab-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--v6ab-border);
}

.v6ab-menu-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v6ab-text);
}

.v6ab-menu-close {
    background: transparent;
    border: none;
    color: var(--v6ab-text);
    font-size: 2.4rem;
    cursor: pointer;
}

.v6ab-menu-list {
    list-style: none;
}

.v6ab-menu-item {
    margin-bottom: 0.5rem;
}

.v6ab-menu-link {
    display: block;
    padding: 1rem;
    color: var(--v6ab-text);
    font-size: 1.4rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.v6ab-menu-link:hover {
    background: var(--v6ab-primary);
    color: var(--v6ab-text);
}

/* ==================== Main Content ==================== */
.v6ab-main {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* ==================== Carousel ==================== */
.v6ab-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.v6ab-slides {
    position: relative;
}

.v6ab-slide {
    display: none;
    cursor: pointer;
}

.v6ab-slide-active {
    display: block;
}

.v6ab-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.v6ab-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.v6ab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.v6ab-dot-active {
    background: var(--v6ab-secondary);
    width: 20px;
    border-radius: 4px;
}

/* ==================== Section Styles ==================== */
.v6ab-section {
    padding: 2rem 1rem;
}

.v6ab-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v6ab-text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--v6ab-primary);
}

/* ==================== Game Grid ==================== */
.v6ab-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--v6ab-secondary);
    margin: 1.5rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.v6ab-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.v6ab-game-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.v6ab-game-item:hover {
    transform: translateY(-3px);
}

.v6ab-game-icon {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.4rem;
    border: 2px solid var(--v6ab-border);
    transition: border-color 0.3s ease;
}

.v6ab-game-item:hover .v6ab-game-icon {
    border-color: var(--v6ab-primary);
}

.v6ab-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v6ab-game-name {
    font-size: 1rem;
    color: var(--v6ab-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== Content Cards ==================== */
.v6ab-card {
    background: var(--v6ab-bg-dark);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--v6ab-border);
}

.v6ab-card-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--v6ab-secondary);
    margin-bottom: 1rem;
}

.v6ab-card-text {
    font-size: 1.3rem;
    color: var(--v6ab-text-muted);
    line-height: 1.6;
}

.v6ab-card-text p {
    margin-bottom: 1rem;
}

.v6ab-card-text p:last-child {
    margin-bottom: 0;
}

/* ==================== Features Grid ==================== */
.v6ab-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.v6ab-feature-item {
    background: linear-gradient(135deg, var(--v6ab-bg-dark) 0%, var(--v6ab-bg) 100%);
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--v6ab-border);
    transition: all 0.3s ease;
}

.v6ab-feature-item:hover {
    border-color: var(--v6ab-primary);
    transform: translateY(-2px);
}

.v6ab-feature-icon {
    font-size: 2.4rem;
    color: var(--v6ab-secondary);
    margin-bottom: 0.5rem;
}

.v6ab-feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--v6ab-text);
}

/* ==================== Bottom Navigation ==================== */
.v6ab-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    height: 60px;
    background: linear-gradient(180deg, var(--v6ab-bg-dark) 0%, #111111 100%);
    border-top: 1px solid var(--v6ab-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.5rem;
}

.v6ab-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    color: var(--v6ab-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.v6ab-nav-item:hover,
.v6ab-nav-active {
    color: var(--v6ab-secondary);
}

.v6ab-nav-item .material-icons,
.v6ab-nav-item .ion-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.v6ab-nav-item i {
    font-size: 24px;
    margin-bottom: 2px;
}

.v6ab-nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* ==================== Footer ==================== */
.v6ab-footer {
    background: var(--v6ab-bg-dark);
    padding: 2rem 1rem;
    border-top: 1px solid var(--v6ab-border);
}

.v6ab-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.v6ab-footer-link {
    font-size: 1.2rem;
    color: var(--v6ab-text-muted);
    padding: 0.5rem 1rem;
    background: var(--v6ab-bg);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.v6ab-footer-link:hover {
    color: var(--v6ab-text);
    background: var(--v6ab-primary);
}

.v6ab-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.v6ab-partner-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.v6ab-partner-logo:hover {
    opacity: 1;
}

.v6ab-copyright {
    text-align: center;
    font-size: 1.1rem;
    color: var(--v6ab-text-muted);
}

/* ==================== Promo Link Styles ==================== */
.v6ab-promo-link {
    color: var(--v6ab-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.v6ab-promo-link:hover {
    color: var(--v6ab-accent);
    text-decoration: underline;
}

.v6ab-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--v6ab-gradient);
    color: var(--v6ab-text);
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(178, 34, 34, 0.3);
}

.v6ab-promo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(178, 34, 34, 0.5);
}

/* ==================== Utility Classes ==================== */
.v6ab-text-center {
    text-align: center;
}

.v6ab-mb-1 {
    margin-bottom: 1rem;
}

.v6ab-mb-2 {
    margin-bottom: 2rem;
}

.v6ab-mt-2 {
    margin-top: 2rem;
}

.v6ab-hidden-mobile {
    display: none;
}

/* ==================== Desktop Styles ==================== */
@media (min-width: 769px) {
    body {
        max-width: 100%;
    }

    .v6ab-header,
    .v6ab-bottom-nav {
        max-width: 100%;
    }

    .v6ab-bottom-nav {
        display: none;
    }

    .v6ab-main {
        padding-bottom: 2rem;
    }

    .v6ab-hidden-mobile {
        display: block;
    }

    .v6ab-game-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .v6ab-features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== Animation ==================== */
@keyframes v6ab-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v6ab-fade-in {
    animation: v6ab-fadeIn 0.5s ease forwards;
}
