/**
 * 88I Professional Header & Logo - Inspired by jun88wh.com
 * Ultra Premium Casino Design with Custom Logo
 */

/* ===================================
   HEADER STRUCTURE - PROFESSIONAL LAYOUT
   =================================== */

#masthead.header {
    background: #000000 !important;
    border-bottom: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-bg-color,
.header-bg-container {
    background: #000000 !important;
}

/* Header Inner Layout */
.header-inner {
    padding: 0 !important;
    max-width: 1400px;
    margin: 0 auto;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: #000000;
}

/* ===================================
   TOP RED BANNER - JUN88 STYLE
   =================================== */

.header-top {
    background: linear-gradient(90deg, #DC2626 0%, #B91C1C 50%, #DC2626 100%) !important;
    color: #FFFFFF !important;
    padding: 10px 0 !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #FFA500;
}

.header-top strong {
    color: #FFD700 !important;
    font-weight: 900;
    font-size: 15px;
    text-transform: uppercase;
}

.header-top a {
    color: #FFD700 !important;
    text-decoration: none !important;
    font-weight: 800;
    margin-left: 8px;
    padding: 5px 16px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #FFD700;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-block;
}

.header-top a:hover {
    background: #FFD700 !important;
    color: #DC2626 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* ===================================
   CUSTOM 88I LOGO - PROFESSIONAL STYLE
   =================================== */

.header-logo,
.custom-logo-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-decoration: none !important;
    gap: 2px !important;
}

/* Hide default logo image, use custom text */
.header-logo img,
.custom-logo-link img {
    display: none !important;
}

/* Create custom 88I logo */
.header-logo:after,
.custom-logo-link:after {
    content: "88I.COM";
    font-size: 42px;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 25%, #FFA500 50%, #FFD700 75%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    text-transform: uppercase;
    filter: drop-shadow(0 2px 10px rgba(255, 165, 0, 0.5));
    animation: logo-shine 3s infinite;
    line-height: 1;
}

@keyframes logo-shine {
    0%, 100% {
        filter: drop-shadow(0 2px 10px rgba(255, 165, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 2px 20px rgba(255, 215, 0, 0.8));
    }
}

/* Logo subtitle */
.header-logo:before,
.custom-logo-link:before {
    content: "NHÀ CÁI UY TÍN #1";
    font-size: 11px;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 2px;
    text-transform: uppercase;
    order: -1;
    opacity: 0.9;
}

.site-title {
    display: none !important;
}

.site-description {
    display: none !important;
}

/* Logo hover effect */
.header-logo:hover:after,
.custom-logo-link:hover:after {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ===================================
   PROFESSIONAL NAVIGATION MENU
   =================================== */

.header-nav,
.header-nav-main {
    margin: 0 !important;
    padding: 0 !important;
}

.header-nav > ul,
.header-nav-main > ul {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.header-nav li,
.nav-top > li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.header-nav li a,
.nav-top > li > a {
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.header-nav li a:hover,
.nav-top > li > a:hover {
    color: #FFA500 !important;
    background: rgba(255, 165, 0, 0.1) !important;
    border-color: rgba(255, 165, 0, 0.3) !important;
}

.header-nav li.current-menu-item > a,
.header-nav li.current_page_item > a {
    color: #FFA500 !important;
    background: rgba(255, 165, 0, 0.15) !important;
    border-color: #FFA500 !important;
    font-weight: 900 !important;
}

/* Dropdown menus */
.header-nav .sub-menu {
    background: #1A1A1A !important;
    border: 2px solid #FFA500 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9) !important;
    padding: 10px 0 !important;
    margin-top: 5px !important;
    min-width: 220px !important;
}

.header-nav .sub-menu li a {
    background: transparent !important;
    border: none !important;
    padding: 12px 24px !important;
    color: #FFFFFF !important;
    border-radius: 0 !important;
}

.header-nav .sub-menu li a:hover {
    background: rgba(255, 165, 0, 0.15) !important;
    color: #FFA500 !important;
    padding-left: 32px !important;
}

/* ===================================
   🔥 PREMIUM CTA BUTTONS - MEGA PROMINENT
   =================================== */

.header-button,
.header-button-1,
.header-button-2 {
    margin: 0 8px !important;
    position: relative;
    z-index: 10;
}

/* === BUTTON 1: ĐĂNG KÝ +888K (RED FIRE) === */
.header-button-1 {
    position: relative;
}

.header-button-1 a,
.header-button-1 .button {
    background: linear-gradient(135deg, #FF1744 0%, #D50000 50%, #B71C1C 100%) !important;
    color: #FFFFFF !important;
    padding: 16px 38px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    border: 3px solid #FFD700 !important;
    box-shadow: 
        0 6px 25px rgba(255, 23, 68, 0.6),
        0 0 30px rgba(255, 23, 68, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative;
    overflow: hidden !important;
    animation: pulse-red 2s infinite;
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 255, 255, 0.4) !important;
    min-width: 200px;
    justify-content: center;
    white-space: nowrap;
    z-index: 1;
}

/* Shine effect overlay for button 1 */
.header-button-1 a:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    border-radius: 12px;
    pointer-events: none;
}

/* Big +888K badge - SEPARATE ELEMENT, NOT ON BUTTON */
.header-button-1:after {
    content: "+888K";
    position: absolute !important;
    top: -14px !important;
    right: -8px !important;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #B71C1C !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border: 2px solid #FFFFFF !important;
    z-index: 100 !important;
    animation: badge-bounce 2s infinite;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap;
}

/* Icon for register button */
.header-button-1 a .button-icon {
    display: none;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 
            0 6px 25px rgba(255, 23, 68, 0.6),
            0 0 30px rgba(255, 23, 68, 0.4),
            inset 0 2px 0 rgba(255, 255, 255, 0.3),
            inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 35px rgba(255, 23, 68, 0.9),
            0 0 50px rgba(255, 23, 68, 0.6),
            inset 0 2px 0 rgba(255, 255, 255, 0.4),
            inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    }
}

@keyframes badge-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.08);
    }
}

.header-button-1 a:hover {
    background: linear-gradient(135deg, #FF4569 0%, #FF1744 50%, #D50000 100%) !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 
        0 12px 40px rgba(255, 23, 68, 0.8),
        0 0 60px rgba(255, 23, 68, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
    border-color: #FFFFFF !important;
}

.header-button-1 a:hover:before {
    left: 100%;
}

.header-button-1 a:hover:after {
    animation: badge-shake 0.5s ease;
}

@keyframes badge-shake {
    0%, 100% { transform: translateY(-3px) scale(1.08) rotate(0deg); }
    25% { transform: translateY(-5px) scale(1.12) rotate(-5deg); }
    75% { transform: translateY(-5px) scale(1.12) rotate(5deg); }
}

/* === BUTTON 2: ĐĂNG NHẬP +288K (GREEN EMERALD) === */
.header-button-2 {
    position: relative;
}

.header-button-2 a,
.header-button-2 .button {
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%) !important;
    color: #FFFFFF !important;
    padding: 16px 38px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    border: 3px solid #FFD700 !important;
    box-shadow: 
        0 6px 25px rgba(16, 185, 129, 0.6),
        0 0 30px rgba(16, 185, 129, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative;
    overflow: hidden !important;
    animation: pulse-green 2s infinite;
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(255, 255, 255, 0.4) !important;
    min-width: 200px;
    justify-content: center;
    white-space: nowrap;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force show text inside button */
.header-button-2 a *,
.header-button-2 a span,
.header-button-2 a strong,
.header-button-2 a b,
.header-button-2 a em {
    color: #FFFFFF !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline !important;
    text-shadow: 
        0 1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(255, 255, 255, 0.5) !important;
}

/* Shine effect overlay for button 2 */
.header-button-2 a:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    border-radius: 12px;
    pointer-events: none;
}

/* Big +288K badge - SEPARATE ELEMENT ON PARENT */
.header-button-2:after {
    content: "+288K";
    position: absolute !important;
    top: -14px !important;
    right: -8px !important;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #047857 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border: 2px solid #FFFFFF !important;
    z-index: 100 !important;
    animation: badge-bounce 2s infinite;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap;
}

/* Also force the existing text inside button 2 */
.header-button-2 a {
    content: "ĐĂNG NHẬP +288K" !important;
}

/* Hide original text but show our custom content - actually let's just make sure original is visible */
.header-button-2 a:not(:empty) {
    visibility: visible !important;
}

@keyframes pulse-green {
    0%, 100% {
        box-shadow: 
            0 6px 25px rgba(16, 185, 129, 0.6),
            0 0 30px rgba(16, 185, 129, 0.4),
            inset 0 2px 0 rgba(255, 255, 255, 0.3),
            inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 35px rgba(16, 185, 129, 0.9),
            0 0 50px rgba(16, 185, 129, 0.6),
            inset 0 2px 0 rgba(255, 255, 255, 0.4),
            inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    }
}

.header-button-2 a:hover {
    background: linear-gradient(135deg, #34D399 0%, #10B981 50%, #059669 100%) !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 
        0 12px 40px rgba(16, 185, 129, 0.8),
        0 0 60px rgba(16, 185, 129, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4) !important;
    border-color: #FFFFFF !important;
}

.header-button-2 a:hover:before {
    left: 100%;
}

.header-button-2 a:hover:after {
    animation: badge-shake 0.5s ease;
}

/* === FIRE/SPARK EFFECT FOR REGISTER BUTTON === */
.header-button-1:before {
    content: "🔥";
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 20px;
    z-index: 3;
    animation: fire-flicker 1.5s infinite;
    filter: drop-shadow(0 0 8px rgba(255, 100, 0, 0.8));
}

@keyframes fire-flicker {
    0%, 100% { 
        transform: scale(1) rotate(-5deg);
        opacity: 1;
    }
    25% { 
        transform: scale(1.15) rotate(5deg);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.05) rotate(-3deg);
        opacity: 1;
    }
    75% { 
        transform: scale(1.2) rotate(3deg);
        opacity: 0.9;
    }
}

/* === LIGHTNING EFFECT FOR LOGIN BUTTON === */
.header-button-2:before {
    content: "⚡";
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 20px;
    z-index: 3;
    animation: lightning-flash 1.5s infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

@keyframes lightning-flash {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* ===================================
   HEADER RIGHT SECTION - TRUST BADGES
   =================================== */

.flex-right,
.header-right {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

/* PAGCOR Badge */
.header-trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10B981;
    border-radius: 6px;
    font-size: 12px;
    color: #10B981;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-trust-badge:before {
    content: "✓";
    background: #10B981;
    color: #000000;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
}

/* Live users counter */
.header-live-users {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10B981;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.header-live-users:before {
    content: "";
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    box-shadow: 0 0 8px #10B981;
}

@keyframes pulse-dot {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.4);
    }
}

/* ===================================
   MOBILE MENU - PROFESSIONAL
   =================================== */

.mobile-nav {
    background: #000000 !important;
    border-top: 2px solid #FFA500;
}

.mobile-nav li a {
    color: #FFFFFF !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid rgba(255, 165, 0, 0.1) !important;
    font-weight: 700;
    font-size: 15px;
}

.mobile-nav li a:hover {
    background: rgba(255, 165, 0, 0.15) !important;
    color: #FFA500 !important;
}

.mobile-nav .button {
    margin: 20px !important;
}

/* Hamburger menu */
.nav-icon {
    background: rgba(255, 165, 0, 0.2) !important;
    padding: 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.nav-icon span {
    background: #FFA500 !important;
    height: 3px !important;
}

/* ===================================
   STICKY HEADER - PROFESSIONAL
   =================================== */

.header.stuck {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.9) !important;
    border-bottom: 2px solid #FFA500 !important;
}

.header.stuck .header-logo:after,
.header.stuck .custom-logo-link:after {
    font-size: 36px !important;
}

.header.stuck .header-button-1 a,
.header.stuck .header-button-2 a {
    padding: 12px 28px !important;
    font-size: 14px !important;
}

/* ===================================
   RESPONSIVE - MOBILE OPTIMIZED
   =================================== */

@media (max-width: 992px) {
    .header-wrapper {
        padding: 12px 20px;
    }
    
    .header-logo:after,
    .custom-logo-link:after {
        font-size: 36px !important;
    }
    
    .header-logo:before,
    .custom-logo-link:before {
        font-size: 10px !important;
    }
    
    .header-nav li a {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
    
    .header-button-1 a,
    .header-button-2 a {
        padding: 12px 24px !important;
        font-size: 14px !important;
        min-width: 160px !important;
    }
    
    .header-button-1 a:after,
    .header-button-2 a:after {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
}

@media (max-width: 768px) {
    .header-logo:after,
    .custom-logo-link:after {
        font-size: 32px !important;
    }
    
    .header-logo:before,
    .custom-logo-link:before {
        font-size: 9px !important;
        letter-spacing: 1px;
    }
    
    .header-top {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    .header-top strong {
        font-size: 13px;
    }
    
    .header-trust-badge,
    .header-live-users {
        display: none !important;
    }
    
    .header-button-1,
    .header-button-2 {
        margin: 0 4px !important;
    }
    
    .header-button-1 a,
    .header-button-2 a {
        padding: 10px 18px !important;
        font-size: 13px !important;
        min-width: 140px !important;
    }
}

@media (max-width: 550px) {
    .header-logo:after,
    .custom-logo-link:after {
        font-size: 28px !important;
        letter-spacing: -1px;
    }
    
    .header-logo:before,
    .custom-logo-link:before {
        font-size: 8px !important;
    }
    
    .header-button-1 a,
    .header-button-2 a {
        padding: 8px 14px !important;
        font-size: 12px !important;
        min-width: 120px !important;
    }
    
    .header-button-1 a:after,
    .header-button-2 a:after {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}

/* ===================================
   ADDITIONAL PROFESSIONAL TOUCHES
   =================================== */

/* Header border glow */
#masthead.header:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #FFA500 50%, transparent 100%);
    opacity: 0.5;
}

/* Logo container */
.flex-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Menu container */
.flex-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Buttons container */
.flex-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hide default flatsome elements that conflict */
.header-main {
    background: transparent !important;
}

.stuck .header-main {
    padding: 0 !important;
}

/* ===================================
   EXTRA: RIPPLE EFFECT ON CLICK
   =================================== */

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.header-button-1 a:active,
.header-button-2 a:active {
    transform: translateY(-2px) scale(0.98) !important;
}
