/* V6 Common CSS - Ayala Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #F5F7FA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    padding-bottom: 80px;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Utility Classes */
.hide { display: none; }
.show { display: block; }
.flex { display: flex; }
.flex_center { display: flex; justify-content: center; align-items: center; }
.flex_space { display: flex; justify-content: space-between; align-items: center; }
.flex_left { display: flex; align-items: center; }
.flex_column { display: flex; flex-direction: column; }
.flex_wrap { flex-wrap: wrap; }
.text_center { text-align: center; }
.text_right { text-align: right; }
.position { position: relative; }

/* Spacing */
.mt_5 { margin-top: 5px; }
.mt_10 { margin-top: 10px; }
.mt_15 { margin-top: 15px; }
.mt_20 { margin-top: 20px; }
.mb_5 { margin-bottom: 5px; }
.mb_10 { margin-bottom: 10px; }
.mb_15 { margin-bottom: 15px; }
.mb_20 { margin-bottom: 20px; }
.ml_5 { margin-left: 5px; }
.ml_10 { margin-left: 10px; }
.mr_5 { margin-right: 5px; }
.mr_10 { margin-right: 10px; }
.p_10 { padding: 10px; }
.p_15 { padding: 15px; }
.p_20 { padding: 20px; }

/* Colors */
:root {
    --primary: #2970FF;
    --primary-light: #E8F1FF;
    --primary-dark: #1A5AD9;
    --secondary: #FFB800;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --background: #F5F7FA;
    --white: #FFFFFF;
}

/* ============================================
   Header Section
   ============================================ */
.v6_header {
    background: var(--white);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.v6_header .logo {
    height: 28px;
}

.v6_header .header_btns {
    display: flex;
    gap: 10px;
}

.v6_header .btn_login {
    padding: 8px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.v6_header .btn_register {
    padding: 8px 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   Banner Section
   ============================================ */
.v6_banner {
    margin: 10px 15px;
    border-radius: 12px;
    overflow: hidden;
}

.v6_banner img {
    width: 100%;
    display: block;
}

.swiper-container {
    width: 100%;
}

/* ============================================
   Quick Menu Section
   ============================================ */
.v6_quick_menu {
    background: var(--white);
    margin: 10px 15px;
    padding: 20px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-around;
}

.v6_quick_menu .menu_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.v6_quick_menu .menu_item .icon_wrap {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v6_quick_menu .menu_item .icon_wrap img {
    width: 24px;
    height: 24px;
}

.v6_quick_menu .menu_item span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   Section Title
   ============================================ */
.v6_section {
    margin: 15px;
}

.v6_section_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.v6_section_title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.v6_section_title .hot_icon {
    width: 20px;
    height: 20px;
}

.v6_section_nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v6_section_nav .nav_arrow {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v6_section_nav .nav_arrow img {
    width: 12px;
    height: 12px;
    opacity: 0.5;
}

.v6_section_nav .nav_count {
    font-size: 13px;
    color: var(--text-secondary);
}

.v6_section_nav .nav_count span {
    color: var(--primary);
    font-weight: 500;
}

.v6_section_nav .nav_more {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   Games Section
   ============================================ */
.v6_games_list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}

.v6_games_list::-webkit-scrollbar {
    display: none;
}

.v6_game_card {
    flex: 0 0 auto;
    width: 120px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

.v6_game_card .game_image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.v6_game_card .game_name {
    padding: 10px;
    font-size: 12px;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Investment/Product Section
   ============================================ */
.v6_products_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.v6_product_card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    padding: 12px;
}

.v6_product_card .product_image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v6_product_card .product_image .product_letter {
    font-size: 48px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
}

.v6_product_card .product_name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.v6_product_card .product_name .vip_badge {
    width: 16px;
    height: 16px;
}

.v6_product_card .product_info {
    margin-top: 8px;
}

.v6_product_card .product_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.v6_product_card .product_label {
    font-size: 12px;
    color: var(--text-muted);
}

.v6_product_card .product_value {
    font-size: 12px;
    color: var(--text-primary);
}

.v6_product_card .product_price {
    color: var(--secondary);
    font-weight: 600;
}

.v6_product_card .product_price_highlight {
    color: #FF6B00;
    font-weight: 700;
    font-size: 14px;
}

/* ============================================
   Footer Menu
   ============================================ */
.v6_footer_menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background-image: url('/public/v6/img/footer/menu_bg.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-color: transparent;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 1000;
}

.v6_footer_menu::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    z-index: -1;
}

.v6_footer_menu .menu_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    flex: 1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.v6_footer_menu .menu_item .menu_icon {
    width: 26px;
    height: 26px;
    transition: transform 0.2s ease;
}

.v6_footer_menu .menu_item:active .menu_icon {
    transform: scale(0.9);
}

.v6_footer_menu .menu_item .menu_icon_large {
    width: 32px;
    height: 32px;
}

.v6_footer_menu .menu_item span {
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 500;
}

.v6_footer_menu .menu_item.active span {
    color: #2970FF;
    font-weight: 600;
}

/* Center Prize Button */
.v6_footer_menu .menu_center {
    position: relative;
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.v6_footer_menu .menu_center .center_btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.v6_footer_menu .menu_center .center_btn::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(91, 156, 255, 0.3) 0%, rgba(41, 112, 255, 0.3) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.v6_footer_menu .menu_center:active .center_btn::before {
    opacity: 1;
}

.v6_footer_menu .menu_center:active .center_btn {
    transform: translateX(-50%) scale(0.95);
}

.v6_footer_menu .menu_center .center_btn img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.v6_footer_menu .menu_center span {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    color: #9CA3AF;
    font-weight: 500;
}

.v6_footer_menu .menu_center.active span {
    color: #2970FF;
    font-weight: 600;
}

/* ============================================
   Buttons
   ============================================ */
.v6_btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.v6_btn_primary {
    background: var(--primary);
    color: var(--white);
}

.v6_btn_primary:active {
    background: var(--primary-dark);
}

.v6_btn_outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.v6_btn_block {
    display: block;
    width: 100%;
}

/* ============================================
   Cards
   ============================================ */
.v6_card {
    background: var(--white);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
}

.v6_card_title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ============================================
   Dialog/Popup
   ============================================ */
.layui-layer-page {
    background-color: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.v6_dialog {
    padding: 20px;
}

.v6_dialog_title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 15px;
}

.v6_dialog_content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   Form Elements
   ============================================ */
.v6_input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.v6_input:focus {
    border-color: var(--primary);
}

.v6_input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   User Info (for logged in users)
   ============================================ */
.v6_user_header {
    background: linear-gradient(135deg, #2970FF 0%, #5B9CFF 100%);
    padding: 20px 15px;
    color: var(--white);
}

.v6_user_info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.v6_user_avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.v6_user_name {
    font-size: 16px;
    font-weight: 600;
}

.v6_user_id {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.v6_user_id .copy_btn {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.v6_vip_badge {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    margin-left: 8px;
}

/* ============================================
   Balance Section
   ============================================ */
.v6_balance_section {
    background: var(--white);
    margin: -20px 15px 15px;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.v6_balance_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.v6_balance_item .balance_label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.v6_balance_item .balance_value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   Swiper Customization
   ============================================ */
.swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
}

.swiper-pagination-bullet-active {
    background: var(--white);
    width: 18px;
    border-radius: 3px;
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
    }

    .v6_footer_menu {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================
   Loading State
   ============================================ */
.v6_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.v6_loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Empty State
   ============================================ */
.v6_empty {
    text-align: center;
    padding: 40px 20px;
}

.v6_empty img {
    width: 120px;
    opacity: 0.5;
    margin-bottom: 15px;
}

.v6_empty p {
    color: var(--text-muted);
    font-size: 14px;
}
