/**
 * cv999 - Theme Stylesheet
 * All classes use v870- prefix for namespace isolation
 * Color palette: #FFD700 (gold) | #141414 (dark bg) | #FFB74D (warm accent)
 * Mobile-first design, max-width 430px
 */

/* CSS Variables */
:root {
    --v870-primary: #FFD700;
    --v870-bg: #141414;
    --v870-bg-secondary: #1a1a1a;
    --v870-bg-card: #222222;
    --v870-accent: #FFB74D;
    --v870-text: #f5f5f5;
    --v870-text-muted: #b0b0b0;
    --v870-text-dark: #333333;
    --v870-border: #333333;
    --v870-success: #4caf50;
    --v870-danger: #f44336;
    --v870-gold-gradient: linear-gradient(135deg, #FFD700, #FFB74D);
    --v870-dark-gradient: linear-gradient(180deg, #1a1a1a, #141414);
    font-size: 62.5%;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Noto Sans Bengali', Tahoma, sans-serif;
    background-color: var(--v870-bg);
    color: var(--v870-text);
    line-height: 1.5rem;
    font-size: 1.4rem;
    max-width: 430px;
    margin: 0 auto;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--v870-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--v870-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.v870-container {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 1.2rem;
}

/* Header */
.v870-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 5.4rem;
    background: var(--v870-bg-secondary);
    border-bottom: 1px solid var(--v870-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
}

.v870-logo-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.v870-logo-area img {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.4rem;
}

.v870-logo-area span {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--v870-primary);
    letter-spacing: 0.5px;
}

.v870-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.v870-btn-register {
    background: var(--v870-gold-gradient);
    color: var(--v870-text-dark);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.v870-btn-register:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.35);
}

.v870-btn-login {
    background: transparent;
    color: var(--v870-primary);
    border: 1.5px solid var(--v870-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.v870-btn-login:hover {
    background: rgba(255, 215, 0, 0.1);
}

.v870-menu-btn {
    background: none;
    border: none;
    color: var(--v870-primary);
    font-size: 2.2rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
}

/* Mobile Menu */
.v870-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s;
}

.v870-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 300px;
    height: 100%;
    background: var(--v870-bg-secondary);
    z-index: 9999;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--v870-border);
}

.v870-mobile-menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--v870-text);
    font-size: 2.4rem;
    cursor: pointer;
}

.v870-mobile-menu a {
    display: block;
    padding: 1rem 0;
    color: var(--v870-text);
    font-size: 1.4rem;
    border-bottom: 1px solid var(--v870-border);
    transition: color 0.2s, padding-left 0.2s;
}

.v870-mobile-menu a:hover {
    color: var(--v870-primary);
    padding-left: 0.5rem;
}

/* Carousel / Banner */
.v870-carousel {
    position: relative;
    width: 100%;
    margin-top: 5.4rem;
    overflow: hidden;
    border-radius: 0;
}

.v870-slide {
    display: none;
    width: 100%;
    cursor: pointer;
}

.v870-slide-active {
    display: block;
}

.v870-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/7;
    object-fit: cover;
}

/* Section Headings */
.v870-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--v870-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--v870-primary);
}

.v870-section-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--v870-accent);
    margin: 1.5rem 0 0.8rem;
}

/* Game Grid */
.v870-game-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--v870-primary);
    margin: 1.5rem 0 0.8rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--v870-accent);
}

.v870-game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.v870-game-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s;
    padding: 0.3rem;
    border-radius: 0.6rem;
    background: var(--v870-bg-card);
}

.v870-game-item:hover {
    transform: translateY(-2px);
    background: #2a2a2a;
}

.v870-game-item img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    object-fit: cover;
    margin-bottom: 0.3rem;
}

.v870-game-item span {
    font-size: 1rem;
    color: var(--v870-text);
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.4rem;
}

/* Content Cards */
.v870-card {
    background: var(--v870-bg-card);
    border-radius: 0.8rem;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--v870-border);
}

.v870-card h2, .v870-card h3 {
    color: var(--v870-primary);
    margin-bottom: 0.8rem;
}

.v870-card p {
    color: var(--v870-text-muted);
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

/* Promo Link Button */
.v870-promo-btn {
    display: inline-block;
    background: var(--v870-gold-gradient);
    color: var(--v870-text-dark);
    padding: 0.8rem 2rem;
    border-radius: 2.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s;
    margin: 0.8rem 0;
}

.v870-promo-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.v870-promo-text {
    color: var(--v870-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Footer */
.v870-footer {
    background: var(--v870-bg-secondary);
    border-top: 1px solid var(--v870-border);
    padding: 2rem 1.2rem 8rem;
    text-align: center;
}

.v870-footer-desc {
    color: var(--v870-text-muted);
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
}

.v870-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.v870-footer-links a {
    background: var(--v870-bg-card);
    color: var(--v870-text);
    padding: 0.4rem 1rem;
    border-radius: 1.5rem;
    font-size: 1.1rem;
    border: 1px solid var(--v870-border);
    transition: border-color 0.2s;
}

.v870-footer-links a:hover {
    border-color: var(--v870-primary);
    color: var(--v870-primary);
}

.v870-footer-copy {
    color: #666;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Bottom Navigation (Mobile) */
.v870-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: 60px;
    background: linear-gradient(180deg, #1f1f1f, #111111);
    border-top: 1px solid var(--v870-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 0.3rem;
}

.v870-bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 54px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--v870-text-muted);
    font-size: 1rem;
    transition: color 0.2s, transform 0.15s;
    gap: 0.2rem;
    padding: 0.2rem;
}

.v870-bottom-nav-btn i,
.v870-bottom-nav-btn .material-icons {
    font-size: 2.2rem;
}

.v870-bottom-nav-btn span {
    font-size: 1rem;
    line-height: 1.2;
}

.v870-bottom-nav-btn:hover,
.v870-bottom-nav-btn-active {
    color: var(--v870-primary);
}

.v870-bottom-nav-btn-active {
    position: relative;
}

.v870-bottom-nav-btn-active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--v870-primary);
    border-radius: 1px;
}

/* Utility */
.v870-text-center { text-align: center; }
.v870-mt-1 { margin-top: 1rem; }
.v870-mb-1 { margin-bottom: 1rem; }
.v870-mb-2 { margin-bottom: 2rem; }
.v870-hidden { display: none; }

.v870-divider {
    border: none;
    border-top: 1px solid var(--v870-border);
    margin: 1.5rem 0;
}

/* Main content spacing for fixed header and bottom nav */
.v870-main-content {
    padding-top: 5.4rem;
    min-height: 100vh;
}

/* FAQ / Tips styling */
.v870-faq-item {
    background: var(--v870-bg-card);
    border-radius: 0.6rem;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-left: 3px solid var(--v870-accent);
}

.v870-faq-item strong {
    color: var(--v870-primary);
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1.3rem;
}

.v870-faq-item p {
    color: var(--v870-text-muted);
    font-size: 1.2rem;
    line-height: 1.5;
}

/* Winners table */
.v870-winners-list {
    list-style: none;
}

.v870-winners-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--v870-border);
    font-size: 1.2rem;
}

.v870-winners-list li .v870-winner-name {
    color: var(--v870-accent);
    font-weight: 600;
}

.v870-winners-list li .v870-winner-amount {
    color: var(--v870-primary);
    font-weight: 700;
}

/* Payment icons */
.v870-payment-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin: 1rem 0;
}

.v870-payment-item {
    background: var(--v870-bg-card);
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    font-size: 1.1rem;
    color: var(--v870-text-muted);
    border: 1px solid var(--v870-border);
}

/* Testimonial */
.v870-testimonial {
    background: var(--v870-bg-card);
    border-radius: 0.8rem;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--v870-border);
}

.v870-testimonial p {
    color: var(--v870-text-muted);
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 0.4rem;
}

.v870-testimonial .v870-testimonial-author {
    color: var(--v870-accent);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Desktop: hide bottom nav */
@media (min-width: 769px) {
    .v870-bottom-nav {
        display: none;
    }
}

/* Mobile: add bottom padding for fixed bottom nav */
@media (max-width: 768px) {
    .v870-main-content {
        padding-bottom: 80px;
    }
    .v870-footer {
        padding-bottom: 8rem;
    }
}
