/**
 * BB8 App Core Stylesheet
 * All classes use v816- prefix for namespace isolation
 * Color palette: #00BFFF (primary), #1B263B (dark), #FFD700 (accent)
 * @version 1.0.0
 */

/* CSS Variables */
:root {
    --v816-primary: #00BFFF;
    --v816-dark: #1B263B;
    --v816-accent: #FFD700;
    --v816-bg: #0d1421;
    --v816-text: #ffffff;
    --v816-text-muted: #a0aec0;
    --v816-border: #2d3748;
    --v816-gradient: linear-gradient(135deg, #00BFFF 0%, #0099cc 100%);
    --v816-shadow: 0 4px 15px rgba(0, 191, 255, 0.3);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.6rem;
    line-height: 1.5;
    background-color: var(--v816-bg);
    color: var(--v816-text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container */
.v816-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.v816-wrapper {
    padding: 2rem 0;
}

/* Header */
.v816-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--v816-dark) 0%, rgba(27, 38, 59, 0.95) 100%);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.v816-header-scrolled {
    background: rgba(27, 38, 59, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.v816-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.v816-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.v816-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.v816-logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v816-primary);
}

.v816-header-buttons {
    display: flex;
    gap: 0.8rem;
}

.v816-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: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.v816-btn-primary {
    background: var(--v816-gradient);
    color: var(--v816-dark);
    box-shadow: var(--v816-shadow);
}

.v816-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.4);
}

.v816-btn-secondary {
    background: transparent;
    color: var(--v816-primary);
    border: 2px solid var(--v816-primary);
}

.v816-btn-secondary:hover {
    background: var(--v816-primary);
    color: var(--v816-dark);
}

/* Hamburger Menu */
.v816-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
}

.v816-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--v816-primary);
    transition: all 0.3s ease;
}

.v816-hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.v816-hamburger-active span:nth-child(2) {
    opacity: 0;
}

.v816-hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.v816-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--v816-dark);
    z-index: 9999;
    transition: right 0.3s ease;
    padding: 8rem 2rem 2rem;
    overflow-y: auto;
}

.v816-menu-active {
    right: 0;
}

.v816-mobile-menu ul {
    list-style: none;
}

.v816-mobile-menu li {
    margin-bottom: 1rem;
}

.v816-mobile-menu a {
    display: block;
    padding: 1.2rem 1.5rem;
    color: var(--v816-text);
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.v816-mobile-menu a:hover {
    background: rgba(0, 191, 255, 0.1);
    color: var(--v816-primary);
}

.v816-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;
}

.v816-overlay-active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.v816-main {
    padding-top: 70px;
}

@media (max-width: 768px) {
    .v816-main {
        padding-bottom: 80px;
    }
}

/* Carousel/Slider */
.v816-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.v816-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    cursor: pointer;
}

.v816-slide-active {
    opacity: 1;
}

.v816-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Titles */
.v816-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--v816-text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.v816-section-title span {
    color: var(--v816-primary);
}

/* Game Grid */
.v816-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.v816-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.v816-game-item:hover {
    transform: scale(1.05);
}

.v816-game-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.v816-game-name {
    font-size: 1.1rem;
    color: var(--v816-text);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

/* Cards */
.v816-card {
    background: var(--v816-dark);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--v816-border);
}

.v816-card-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--v816-primary);
    margin-bottom: 1rem;
}

.v816-card-text {
    font-size: 1.4rem;
    color: var(--v816-text-muted);
    line-height: 1.6;
}

/* Features Grid */
.v816-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.v816-feature-item {
    background: var(--v816-dark);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--v816-border);
}

.v816-feature-icon {
    font-size: 2.8rem;
    color: var(--v816-accent);
    margin-bottom: 0.8rem;
}

.v816-feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--v816-text);
    margin-bottom: 0.5rem;
}

.v816-feature-desc {
    font-size: 1.2rem;
    color: var(--v816-text-muted);
}

/* Promo Links */
.v816-promo-link {
    color: var(--v816-primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.v816-promo-link:hover {
    color: var(--v816-accent);
}

.v816-text-link {
    color: var(--v816-primary);
    font-weight: 500;
    cursor: pointer;
}

/* Footer */
.v816-footer {
    background: var(--v816-dark);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--v816-border);
}

.v816-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.v816-footer-links a {
    color: var(--v816-text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.v816-footer-links a:hover {
    color: var(--v816-primary);
}

.v816-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.v816-partners img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.v816-partners img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.v816-copyright {
    text-align: center;
    font-size: 1.2rem;
    color: var(--v816-text-muted);
}

/* Mobile Bottom Navigation */
.v816-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg, var(--v816-dark) 0%, #0a0f18 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    border-top: 1px solid var(--v816-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

@media (min-width: 769px) {
    .v816-bottom-nav {
        display: none;
    }
}

.v816-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.v816-nav-item:hover {
    background: rgba(0, 191, 255, 0.1);
}

.v816-nav-item:active {
    transform: scale(0.95);
}

.v816-nav-item i,
.v816-nav-item .material-icons {
    font-size: 24px;
    color: var(--v816-text-muted);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.v816-nav-item span {
    font-size: 10px;
    color: var(--v816-text-muted);
    transition: color 0.3s ease;
}

.v816-nav-item:hover i,
.v816-nav-item:hover .material-icons,
.v816-nav-item:hover span {
    color: var(--v816-primary);
}

.v816-nav-item-active i,
.v816-nav-item-active .material-icons,
.v816-nav-item-active span {
    color: var(--v816-accent);
}

/* Desktop Navigation */
@media (min-width: 769px) {
    .v816-hamburger {
        display: none;
    }

    .v816-desktop-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .v816-desktop-nav a {
        color: var(--v816-text);
        text-decoration: none;
        font-size: 1.4rem;
        transition: color 0.3s ease;
    }

    .v816-desktop-nav a:hover {
        color: var(--v816-primary);
    }
}

@media (max-width: 768px) {
    .v816-desktop-nav {
        display: none;
    }
}

/* RTP Stats */
.v816-rtp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.v816-rtp-item {
    background: var(--v816-dark);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.v816-rtp-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--v816-accent);
}

.v816-rtp-label {
    font-size: 1.2rem;
    color: var(--v816-text-muted);
}

/* CTA Section */
.v816-cta {
    background: var(--v816-gradient);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem 0;
}

.v816-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--v816-dark);
    margin-bottom: 1rem;
}

.v816-cta-text {
    font-size: 1.4rem;
    color: var(--v816-dark);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.v816-cta-btn {
    display: inline-block;
    background: var(--v816-dark);
    color: var(--v816-primary);
    padding: 1rem 3rem;
    font-size: 1.6rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.v816-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* List Styles */
.v816-list {
    list-style: none;
    padding: 0;
}

.v816-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--v816-border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.v816-list li:last-child {
    border-bottom: none;
}

.v816-list-icon {
    color: var(--v816-accent);
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Accordion/FAQ */
.v816-accordion-item {
    background: var(--v816-dark);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.v816-accordion-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--v816-text);
}

.v816-accordion-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--v816-text-muted);
    font-size: 1.4rem;
    line-height: 1.6;
}

/* Utility Classes */
.v816-text-center {
    text-align: center;
}

.v816-mb-1 {
    margin-bottom: 1rem;
}

.v816-mb-2 {
    margin-bottom: 2rem;
}

.v816-mt-2 {
    margin-top: 2rem;
}

.v816-highlight {
    color: var(--v816-accent);
    font-weight: 600;
}

.v816-divider {
    height: 1px;
    background: var(--v816-border);
    margin: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .v816-game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .v816-game-icon {
        width: 60px;
        height: 60px;
    }
}
