/* Ninong Gaming CSS Styles */
/* All classes use prefix "v8ca-" for namespace isolation */

:root {
    /* Color palette */
    --v8ca-primary: #EE82EE;
    --v8ca-secondary: #708090;
    --v8ca-accent: #32CD32;
    --v8ca-dark: #2C3E50;
    --v8ca-purple: #9966CC;

    /* Functional colors */
    --v8ca-bg: #1a1a1a;
    --v8ca-bg-light: #2d2d2d;
    --v8ca-text: #ffffff;
    --v8ca-text-secondary: #cccccc;
    --v8ca-border: #444444;
    --v8ca-success: #32CD32;
    --v8ca-warning: #FFA500;
    --v8ca-error: #FF4444;

    /* Typography */
    --v8ca-font-size-base: 1.6rem;
    --v8ca-line-height: 1.5;
    --v8ca-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --v8ca-spacing-xs: 0.5rem;
    --v8ca-spacing-sm: 1rem;
    --v8ca-spacing-md: 1.5rem;
    --v8ca-spacing-lg: 2rem;
    --v8ca-spacing-xl: 3rem;

    /* Layout */
    --v8ca-max-width: 430px;
    --v8ca-header-height: 60px;
    --v8ca-bottom-nav-height: 64px;
    --v8ca-border-radius: 8px;
    --v8ca-border-radius-sm: 4px;
    --v8ca-border-radius-lg: 12px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--v8ca-font-family);
    font-size: var(--v8ca-font-size-base);
    line-height: var(--v8ca-line-height);
    background-color: var(--v8ca-bg);
    color: var(--v8ca-text);
    overflow-x: hidden;
}

/* Container and layout */
.v8ca-container {
    max-width: var(--v8ca-max-width);
    margin: 0 auto;
    padding: 0 var(--v8ca-spacing-sm);
}

.v8ca-wrapper {
    min-height: 100vh;
    padding-bottom: var(--v8ca-bottom-nav-height);
}

.v8ca-grid {
    display: grid;
    gap: var(--v8ca-spacing-sm);
}

.v8ca-flex {
    display: flex;
}

.v8ca-flex-col {
    flex-direction: column;
}

.v8ca-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.v8ca-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header */
.v8ca-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--v8ca-header-height);
    background: linear-gradient(135deg, var(--v8ca-dark) 0%, var(--v8ca-purple) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.v8ca-header.scrolled {
    background: rgba(44, 62, 80, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.v8ca-header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--v8ca-spacing-sm);
}

.v8ca-logo {
    display: flex;
    align-items: center;
    gap: var(--v8ca-spacing-xs);
    font-weight: bold;
    font-size: 1.8rem;
    color: var(--v8ca-text);
    text-decoration: none;
}

.v8ca-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--v8ca-primary);
    border-radius: var(--v8ca-border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Navigation */
.v8ca-nav {
    display: flex;
    align-items: center;
    gap: var(--v8ca-spacing-sm);
}

.v8ca-nav-desktop {
    display: none;
}

@media (min-width: 769px) {
    .v8ca-nav-desktop {
        display: flex;
    }
}

.v8ca-nav-item {
    color: var(--v8ca-text);
    text-decoration: none;
    padding: var(--v8ca-spacing-xs) var(--v8ca-spacing-sm);
    border-radius: var(--v8ca-border-radius-sm);
    transition: all 0.3s ease;
    font-size: 1.4rem;
}

.v8ca-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--v8ca-primary);
}

/* Buttons */
.v8ca-btn {
    padding: var(--v8ca-spacing-xs) var(--v8ca-spacing-md);
    border: none;
    border-radius: var(--v8ca-border-radius);
    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-action: manipulation;
}

.v8ca-btn-primary {
    background: linear-gradient(135deg, var(--v8ca-primary) 0%, var(--v8ca-purple) 100%);
    color: var(--v8ca-text);
    box-shadow: 0 4px 15px rgba(238, 130, 238, 0.3);
}

.v8ca-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 130, 238, 0.4);
}

.v8ca-btn-secondary {
    background: var(--v8ca-secondary);
    color: var(--v8ca-text);
}

.v8ca-btn-secondary:hover {
    background: #5a6a7a;
}

.v8ca-btn-outline {
    background: transparent;
    color: var(--v8ca-primary);
    border: 2px solid var(--v8ca-primary);
}

.v8ca-btn-outline:hover {
    background: var(--v8ca-primary);
    color: var(--v8ca-text);
}

/* Mobile menu */
.v8ca-mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--v8ca-spacing-xs);
}

.v8ca-mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--v8ca-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.v8ca-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.v8ca-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.v8ca-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.v8ca-mobile-menu {
    position: fixed;
    top: var(--v8ca-header-height);
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--v8ca-header-height));
    background: var(--v8ca-dark);
    backdrop-filter: blur(10px);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.v8ca-mobile-menu.active {
    right: 0;
}

.v8ca-menu-overlay {
    position: fixed;
    top: var(--v8ca-header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--v8ca-header-height));
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.v8ca-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.v8ca-mobile-nav {
    padding: var(--v8ca-spacing-md);
}

.v8ca-mobile-nav-item {
    display: block;
    padding: var(--v8ca-spacing-sm);
    color: var(--v8ca-text);
    text-decoration: none;
    border-radius: var(--v8ca-border-radius-sm);
    transition: all 0.3s ease;
    margin-bottom: var(--v8ca-spacing-xs);
}

.v8ca-mobile-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--v8ca-primary);
}

/* Carousel */
.v8ca-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--v8ca-border-radius-lg);
    margin: var(--v8ca-spacing-md) 0;
}

.v8ca-carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.v8ca-carousel-slide {
    min-width: 100%;
    position: relative;
}

.v8ca-carousel-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.v8ca-carousel-indicators {
    position: absolute;
    bottom: var(--v8ca-spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--v8ca-spacing-xs);
}

.v8ca-carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.v8ca-carousel-indicator.active {
    background: var(--v8ca-primary);
    transform: scale(1.2);
}

/* Game grid */
.v8ca-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--v8ca-spacing-sm);
    margin: var(--v8ca-spacing-md) 0;
}

.v8ca-game-item {
    background: var(--v8ca-bg-light);
    border-radius: var(--v8ca-border-radius);
    padding: var(--v8ca-spacing-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--v8ca-text);
    border: 1px solid transparent;
}

.v8ca-game-item:hover {
    transform: translateY(-2px);
    border-color: var(--v8ca-primary);
    box-shadow: 0 4px 15px rgba(238, 130, 238, 0.2);
}

.v8ca-game-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--v8ca-spacing-xs);
    border-radius: var(--v8ca-border-radius-sm);
    overflow: hidden;
}

.v8ca-game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v8ca-game-name {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Sections */
.v8ca-section {
    padding: var(--v8ca-spacing-lg) 0;
}

.v8ca-section-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: var(--v8ca-spacing-md);
    text-align: center;
    background: linear-gradient(135deg, var(--v8ca-primary) 0%, var(--v8ca-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.v8ca-card {
    background: var(--v8ca-bg-light);
    border-radius: var(--v8ca-border-radius-lg);
    padding: var(--v8ca-spacing-md);
    margin-bottom: var(--v8ca-spacing-md);
    border: 1px solid var(--v8ca-border);
    transition: all 0.3s ease;
}

.v8ca-card:hover {
    border-color: var(--v8ca-primary);
    box-shadow: 0 4px 15px rgba(238, 130, 238, 0.1);
}

/* Footer */
.v8ca-footer {
    background: var(--v8ca-dark);
    padding: var(--v8ca-spacing-xl) 0 var(--v8ca-spacing-lg);
    margin-top: var(--v8ca-spacing-xl);
}

.v8ca-footer-content {
    text-align: center;
}

.v8ca-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--v8ca-spacing-md);
    margin-bottom: var(--v8ca-spacing-lg);
}

.v8ca-footer-link {
    color: var(--v8ca-text-secondary);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.v8ca-footer-link:hover {
    color: var(--v8ca-primary);
}

.v8ca-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--v8ca-spacing-sm);
    margin: var(--v8ca-spacing-lg) 0;
}

.v8ca-partner-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--v8ca-border-radius-sm);
    overflow: hidden;
    background: var(--v8ca-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v8ca-partner-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.v8ca-copyright {
    color: var(--v8ca-text-secondary);
    font-size: 1.2rem;
    margin-top: var(--v8ca-spacing-lg);
}

/* Bottom navigation */
.v8ca-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--v8ca-bottom-nav-height);
    background: linear-gradient(135deg, var(--v8ca-dark) 0%, var(--v8ca-purple) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid var(--v8ca-border);
}

@media (min-width: 769px) {
    .v8ca-bottom-nav {
        display: none;
    }
}

.v8ca-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    color: var(--v8ca-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
}

.v8ca-bottom-nav-item:hover,
.v8ca-bottom-nav-item.active {
    color: var(--v8ca-primary);
    transform: scale(1.1);
}

.v8ca-bottom-nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
}

.v8ca-bottom-nav-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .v8ca-main-content {
        padding-bottom: var(--v8ca-bottom-nav-height);
    }
}

/* Utility classes */
.v8ca-text-center {
    text-align: center;
}

.v8ca-text-primary {
    color: var(--v8ca-primary);
}

.v8ca-text-secondary {
    color: var(--v8ca-text-secondary);
}

.v8ca-text-success {
    color: var(--v8ca-success);
}

.v8ca-bg-primary {
    background-color: var(--v8ca-primary);
}

.v8ca-bg-secondary {
    background-color: var(--v8ca-secondary);
}

.v8ca-bg-dark {
    background-color: var(--v8ca-dark);
}

.v8ca-mb-sm {
    margin-bottom: var(--v8ca-spacing-sm);
}

.v8ca-mb-md {
    margin-bottom: var(--v8ca-spacing-md);
}

.v8ca-mb-lg {
    margin-bottom: var(--v8ca-spacing-lg);
}

.v8ca-mt-sm {
    margin-top: var(--v8ca-spacing-sm);
}

.v8ca-mt-md {
    margin-top: var(--v8ca-spacing-md);
}

.v8ca-mt-lg {
    margin-top: var(--v8ca-spacing-lg);
}

/* Animation utilities */
@keyframes v8ca-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v8ca-fade-in {
    animation: v8ca-fadeIn 0.6s ease-out;
}

@keyframes v8ca-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.v8ca-pulse {
    animation: v8ca-pulse 2s infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.v8ca-btn:focus,
.v8ca-nav-item:focus,
.v8ca-game-item:focus {
    outline: 2px solid var(--v8ca-primary);
    outline-offset: 2px;
}

/* Loading states */
.v8ca-loading {
    opacity: 0.6;
    pointer-events: none;
}

.v8ca-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--v8ca-primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}