/* Core Styling System - Bluemoon Redesign */

:root {
    --bg-main: #a2dbe1;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.75);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(0, 188, 212, 0.15);
    --bg-nested: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-blue: #0062ff;
    --accent-cyan: #00bcd4;
    --accent-gradient: linear-gradient(135deg, #0062ff 0%, #00bcd4 100%);
    --accent-gradient-hover: linear-gradient(135deg, #0056e0 0%, #00acc1 100%);
    
    --danger-red: #ff2a5f;
    --danger-gradient: linear-gradient(135deg, #ff2a5f 0%, #ff7e40 100%);
    
    --success-green: #00c853;
    
    --font-heading: 'Outfit', 'Kanit', sans-serif;
    --font-body: 'Outfit', 'Kanit', sans-serif;
    
    --card-shadow: 0 10px 30px -5px rgba(0, 98, 255, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
    --neon-shadow-blue: 0 4px 15px rgba(0, 98, 255, 0.35);
    --neon-shadow-cyan: 0 4px 15px rgba(0, 188, 212, 0.35);
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* SVG shape divider utility classes */
.text-surface {
    color: var(--bg-surface) !important;
}
.fill-current {
    fill: currentColor;
}
.leading-0 {
    line-height: 0;
}
.translate-y-px {
    transform: translateY(1px);
}
.relative {
    position: relative;
}
.w-full {
    width: 100%;
}
.overflow-hidden {
    overflow: hidden;
}
.transform-gpu {
    transform: translate3d(0, 0, 0);
}
.opacity-25 {
    opacity: 0.25;
}

/* Global resets & Scrollbar */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, var(--bg-main) 0%, #dbf2f5 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Lights */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 188, 212, 0.25) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 98, 255, 0.18) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Footer wave animations */
.wave-group-1 {
    animation: wave-move-left-right-1 14s ease-in-out infinite;
    transform-origin: center;
}
.wave-group-2 {
    animation: wave-move-left-right-2 9s ease-in-out infinite;
    transform-origin: center;
}

@keyframes wave-move-left-right-1 {
    0%, 100% {
        transform: translateX(-50px) scaleX(1.15);
    }
    50% {
        transform: translateX(50px) scaleX(1.15);
    }
}

@keyframes wave-move-left-right-2 {
    0%, 100% {
        transform: translateX(40px) scaleX(1.1);
    }
    50% {
        transform: translateX(-40px) scaleX(1.1);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p, span, td, th, label, a {
    font-weight: 400;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Glassmorphism Panel / Card */
.glass-card {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(0, 98, 255, 0.3);
    box-shadow: var(--card-shadow), var(--border-glow);
}

/* Custom Buttons overrides */
.btn {
    border-radius: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 24px;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    box-shadow: var(--neon-shadow-blue);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--accent-gradient-hover) !important;
    box-shadow: var(--neon-shadow-cyan) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background: var(--accent-gradient) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: var(--neon-shadow-blue) !important;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
    border-color: rgba(0, 98, 255, 0.2);
}

.btn-danger {
    background: var(--danger-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 42, 95, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff4c7b 0%, #ff9866 100%);
    box-shadow: 0 0 20px rgba(255, 42, 95, 0.5);
    transform: translateY(-2px);
}

.btn-close {
    opacity: 0.8;
}
.btn-close:hover {
    opacity: 1;
}

/* Custom Form elements */
.form-label {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: 12px 16px;
    transition: var(--transition-smooth) !important;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 10px rgba(0, 98, 255, 0.15) !important;
    outline: none;
}

.input-group-text {
    background-color: #f1f5f9 !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: 10px;
}

/* Navbar redone styling */
.navbar-custom {
    background: rgba(238, 247, 249, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(0, 188, 212, 0.4), transparent) 1;
    padding: 15px 0;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 30px rgba(0, 188, 212, 0.08);
}

.navbar-custom .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    transition: var(--transition-smooth);
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 0 12px rgba(0, 188, 212, 0.4));
}

.navbar-custom .navbar-brand .brand-logo-img {
    filter: drop-shadow(0 0 4px rgba(0, 188, 212, 0.2));
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-custom .navbar-brand:hover .brand-logo-img {
    transform: scale(1.1) rotate(8deg);
    filter: drop-shadow(0 0 10px rgba(0, 188, 212, 0.5));
}

.navbar-custom .nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary) !important;
    padding: 8px 16px !important;
    transition: var(--transition-smooth);
    position: relative;
}

.navbar-custom .nav-link i {
    color: var(--accent-cyan);
    transition: var(--transition-smooth);
    margin-right: 6px;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 16px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.4);
}

.navbar-custom .nav-link:hover::after, 
.navbar-custom .nav-item.active .nav-link::after {
    width: calc(100% - 32px);
}

.navbar-custom .nav-link:hover, 
.navbar-custom .nav-item.active .nav-link {
    color: var(--accent-blue) !important;
    text-shadow: 0 0 10px rgba(0, 98, 255, 0.15);
}

.navbar-custom .nav-link:hover i,
.navbar-custom .nav-item.active .nav-link i {
    color: var(--accent-blue);
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 0 6px rgba(0, 98, 255, 0.5));
}

/* User Account drop down */
.dropdown-menu-dark-custom {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 98, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 98, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 10px !important;
}

.dropdown-menu-dark-custom .dropdown-item {
    color: var(--text-secondary) !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.dropdown-menu-dark-custom .dropdown-item:hover {
    background: var(--accent-gradient) !important;
    color: #fff !important;
}

.dropdown-menu-dark-custom .dropdown-header {
    color: var(--text-muted) !important;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px 16px;
}

/* Product Cards */
.product-card {
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 242, 254, 0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(0, 242, 254, 0.15);
}

.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-card .card-img-top-custom {
    height: 100%;
    width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-top-custom {
    transform: scale(1.1);
}

.product-card .card-body-custom {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(245, 247, 251, 0.8) 100%);
}

.product-card .product-title {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}

.product-card .stock-status {
    font-size: 13px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Custom Badges */
.badge-discount-custom {
    background: var(--danger-gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 0 0 0 12px;
    box-shadow: 0 4px 10px rgba(255, 42, 95, 0.4);
    display: inline-block;
    text-align: center;
}

.badge-instock {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-outofstock {
    background: rgba(255, 42, 95, 0.1);
    color: var(--danger-red);
    border: 1px solid rgba(255, 42, 95, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Carousel Redesign */
.carousel-custom {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow), var(--neon-shadow-blue);
    border: 1px solid rgba(0, 98, 255, 0.2);
    margin-top: 130px;
    margin-bottom: 40px;
}

.carousel-custom .carousel-item {
    height: auto;
    aspect-ratio: 1200 / 480;
    position: relative;
}

.carousel-custom .carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-custom .carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 11, 16, 0.6) 0%, rgba(10, 11, 16, 0.2) 60%, rgba(0,0,0,0) 100%);
}

.carousel-custom .carousel-caption-custom {
    position: absolute;
    bottom: 50px;
    left: 50px;
    right: 50px;
    text-align: left;
    z-index: 10;
    max-width: 600px;
}

.carousel-custom .carousel-caption-custom h5 {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 15px rgba(0, 188, 212, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
}

.carousel-custom .carousel-caption-custom p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

/* Features grid homepage */
.features-section {
    padding: 40px 0;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 16px;
    transition: var(--transition-smooth);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: rgba(138, 43, 226, 0.4);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.1);
    transform: translateY(-5px);
}

.feature-card-overlay-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 130px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.04;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 0;
}

.feature-card:hover .feature-card-overlay-icon {
    transform: translate(-50%, -50%) scale(1.12) rotate(6deg);
    opacity: 0.07;
}

.feature-card .feature-icon {
    font-size: 40px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px rgba(0, 188, 212, 0.4));
}

.feature-card .feature-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.feature-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 0;
}

/* Modals Override */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: var(--card-shadow) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    padding: 20px 30px !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    padding: 20px 30px !important;
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* DataTables Styling Overrides */
.dataTables_wrapper {
    color: var(--text-secondary) !important;
}

table.dataTable {
    background: var(--bg-surface-glass) !important;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color) !important;
}

table.dataTable thead th {
    background-color: rgba(0, 98, 255, 0.08) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 15px !important;
}

table.dataTable tbody td {
    padding: 15px !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

table.dataTable tbody tr:hover td {
    background-color: rgba(0, 98, 255, 0.03) !important;
    color: var(--text-primary) !important;
}

.dataTables_filter input {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: 6px 12px;
    transition: var(--transition-smooth) !important;
}

.dataTables_filter input:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 10px rgba(0, 98, 255, 0.15) !important;
    outline: none;
}

.dataTables_length select {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: 4px 8px;
    transition: var(--transition-smooth) !important;
}

.dataTables_length select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 10px rgba(0, 98, 255, 0.15) !important;
    outline: none;
}

/* Nav Pills payments top-up */
.nav-pills-custom {
    background: rgba(0, 0, 0, 0.03);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.nav-pills-custom .nav-link {
    color: var(--text-secondary) !important;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition-smooth);
    border: none !important;
    background: transparent !important;
}

.nav-pills-custom .nav-link.active {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    box-shadow: var(--neon-shadow-blue);
}

.nav-pills-custom .nav-link.disabled {
    opacity: 0.3;
}

/* Profile Avatar glow and frame */
.avatar-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.avatar-image-glow {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent-cyan);
    box-shadow: var(--neon-shadow-cyan);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: var(--transition-smooth);
}

.avatar-container:hover .avatar-image-glow {
    border-color: var(--accent-blue);
    box-shadow: var(--neon-shadow-blue);
}

.avatar-upload-trigger {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.avatar-upload-trigger:hover {
    transform: scale(1.1);
}

/* Sidebar Custom backend */
.sidebar-backend {
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    padding: 10px;
}

.sidebar-backend .btn-vertical-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sidebar-backend .btn-backend-item {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid transparent;
    color: var(--text-secondary);
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    width: 100%;
    transition: var(--transition-smooth);
}

.sidebar-backend .btn-backend-item:hover,
.sidebar-backend .btn-backend-item.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--neon-shadow-blue);
}

.sidebar-backend .btn-backend-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Kbank payment layout and other bank boxes */
.kbank-box-custom {
    background: linear-gradient(135deg, #138f2e 0%, #0e6b22 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(19, 143, 46, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bbl-box-custom {
    background: linear-gradient(135deg, #003399 0%, #001f66 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 51, 153, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ktb-box-custom {
    background: linear-gradient(135deg, #00aeef 0%, #0082b3 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ttb-box-custom {
    background: linear-gradient(135deg, #002d63 0%, #e04a0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 45, 99, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.scb-box-custom {
    background: linear-gradient(135deg, #4e2a84 0%, #361d5c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(78, 42, 132, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.bay-box-custom {
    background: linear-gradient(135deg, #8a7355 0%, #6e583f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(138, 115, 85, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.baac-box-custom {
    background: linear-gradient(135deg, #00773c 0%, #005028 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 119, 60, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.gsb-box-custom {
    background: linear-gradient(135deg, #ec008c 0%, #a30060 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(236, 0, 140, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.kkp-box-custom {
    background: linear-gradient(135deg, #514a6f 0%, #514a6f 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(245, 130, 32, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.cimbt-box-custom {
    background: linear-gradient(135deg, #cc0323 0%, #a20216 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(245, 130, 32, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.uobt-box-custom {
    background: linear-gradient(135deg, #005eb8 0%, #005eb8 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(245, 130, 32, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ghb-box-custom {
    background: linear-gradient(135deg, #f58220 0%, #c45c0d 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(245, 130, 32, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.default-box-custom {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Premium Uploader Layout styling */
.premium-file-uploader {
    position: relative;
    width: 100%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.premium-file-uploader:hover {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.15);
}

.premium-file-uploader input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.premium-file-uploader .uploader-icon {
    font-size: 38px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.premium-file-uploader:hover .uploader-icon {
    transform: scale(1.15) translateY(-2px);
}

.premium-file-uploader .uploader-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.premium-file-uploader .uploader-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.premium-file-uploader .uploader-preview-container {
    display: none;
    margin-top: 15px;
    width: 100%;
    max-width: 250px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.premium-file-uploader .uploader-preview-container img {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
}


/* Footer redesign logo alignment */
.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 28px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 15px;
}

/* Alert adjustments */
.swal2-popup {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    color: var(--text-primary) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-family: var(--font-heading) !important;
}

.swal2-content, .swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: var(--accent-gradient) !important;
    box-shadow: var(--neon-shadow-blue) !important;
    border-radius: 8px !important;
}

.swal2-cancel {
    background: #1f2235 !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
}

/* Admin Image Uploader */
.admin-uploader-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 180px;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    background: var(--bg-surface-glass);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.admin-uploader-container:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.15);
}

.admin-uploader-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
}

.admin-uploader-placeholder {
    z-index: 2;
    text-align: center;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.admin-uploader-preview + .admin-uploader-placeholder {
    opacity: 0;
}

.admin-uploader-container:hover .admin-uploader-placeholder {
    opacity: 1;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.6);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.admin-uploader-preview.is-placeholder {
    opacity: 0.5;
}

/* Popular Games Grid Section */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 576px) {
    .game-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .game-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.game-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    width: 100%;
    height: 100%;
}

.game-card-link:hover {
    transform: translateY(-6px);
}

.game-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    padding: 6px;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.game-card-link:hover .game-card-img-wrap {
    border-color: rgba(0, 188, 212, 0.3);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2);
}

.game-card-img-inner {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.game-card-img-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
    pointer-events: none;
    border-radius: 12px;
}

.game-card-img-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.game-card-link:hover .game-card-img-inner img {
    transform: scale(1.1);
}

.game-card-title {
    margin-top: 8px;
    text-align: center;
    width: 100%;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    transition: var(--transition-smooth);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-link:hover .game-card-title {
    color: var(--accent-blue);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-view-all:hover {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- Target Responsive Improvements for Selected Elements --- */

/* 1. Homepage Promote Banner Carousel & Features Layout */
@media (max-width: 767.98px) {
    body::before {
        width: 80vw;
        height: 80vw;
        top: -10%;
        left: -30%;
    }
    body::after {
        width: 80vw;
        height: 80vw;
        bottom: 0;
        right: -30%;
    }
    .carousel-custom {
        margin-top: 90px !important;
        margin-bottom: 20px !important;
    }
    .carousel-custom .carousel-item {
        height: auto !important;
        aspect-ratio: 1200 / 480 !important;
    }
    .carousel-custom .carousel-caption-custom {
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        max-width: 100% !important;
    }
    .carousel-custom .carousel-caption-custom h5 {
        font-size: 5.5vw !important;
        margin-bottom: 6px !important;
        text-shadow: 0 2px 10px rgba(0, 188, 212, 0.5) !important;
    }
    .carousel-custom .carousel-caption-custom p {
        font-size: 3vw !important;
    }
    
    .features-section {
        padding: 10px 0 20px 0 !important;
    }
    
    .feature-card {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        padding: 16px 20px !important;
        gap: 16px !important;
    }
    
    .feature-card-overlay-icon {
        left: auto !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 80px !important;
        opacity: 0.05 !important;
    }
    
    .feature-card:hover .feature-card-overlay-icon {
        transform: translateY(-50%) scale(1.15) rotate(-6deg) !important;
        opacity: 0.08 !important;
    }
    
    .feature-card .feature-icon {
        margin-bottom: 0 !important;
        font-size: 28px !important;
        flex-shrink: 0 !important;
    }
    
    .feature-card .feature-content {
        flex: 1 !important;
    }
    
    .feature-card h4 {
        font-size: 15px !important;
        margin-bottom: 4px !important;
    }
    
    .feature-card p {
        font-size: 12.5px !important;
        line-height: 1.4 !important;
    }
}

/* 2. Top-up Page Navigation/Action Buttons */
@media (max-width: 575.98px) {
    .container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
    .nav-pills-custom {
        flex-direction: column !important;
        padding: 6px !important;
        gap: 6px !important;
    }
    .nav-pills-custom .nav-item {
        width: 100% !important;
    }
    .nav-pills-custom .nav-link {
        text-align: center !important;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }
}

/* 3. Specific Tables and DataTables Wrappers */
#history_wrapper, 
#topup_history_wrapper, 
#stock_wrapper, 
#user_wrapper, 
#redeemcode_wrapper {
    width: 100% !important;
    overflow-x: auto !important;
}

@media (max-width: 767.98px) {
    /* Style DataTables controls on mobile */
    #history_wrapper .dataTables_length, #history_wrapper .dataTables_filter,
    #topup_history_wrapper .dataTables_length, #topup_history_wrapper .dataTables_filter,
    #stock_wrapper .dataTables_length, #stock_wrapper .dataTables_filter,
    #user_wrapper .dataTables_length, #user_wrapper .dataTables_filter,
    #redeemcode_wrapper .dataTables_length, #redeemcode_wrapper .dataTables_filter {
        text-align: left !important;
        margin-bottom: 10px !important;
        width: 100% !important;
        float: none !important;
    }
    
    #history_wrapper .dataTables_filter input,
    #topup_history_wrapper .dataTables_filter input,
    #stock_wrapper .dataTables_filter input,
    #user_wrapper .dataTables_filter input,
    #redeemcode_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
        display: block !important;
        margin-top: 5px !important;
    }
    
    #history_wrapper .dataTables_info, #history_wrapper .dataTables_paginate,
    #topup_history_wrapper .dataTables_info, #topup_history_wrapper .dataTables_paginate,
    #stock_wrapper .dataTables_info, #stock_wrapper .dataTables_paginate,
    #user_wrapper .dataTables_info, #user_wrapper .dataTables_paginate,
    #redeemcode_wrapper .dataTables_info, #redeemcode_wrapper .dataTables_paginate {
        text-align: left !important;
        margin-top: 10px !important;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-start !important;
        float: none !important;
    }
    
    #history_wrapper .dataTables_paginate .pagination,
    #topup_history_wrapper .dataTables_paginate .pagination,
    #stock_wrapper .dataTables_paginate .pagination,
    #user_wrapper .dataTables_paginate .pagination,
    #redeemcode_wrapper .dataTables_paginate .pagination {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    /* Style cells inside specified tables for tight sizing and scrolling */
    table#history tbody td, table#history thead th,
    table#topup_history tbody td, table#topup_history thead th,
    table#stock tbody td, table#stock thead th,
    table#user tbody td, table#user thead th,
    table#redeemcode tbody td, table#redeemcode thead th {
        padding: 10px 8px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }
}

/* Game Topup Layout styling */
.game-sidebar-img-wrap {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: var(--transition-smooth);
    background: #ffffff;
}

.game-sidebar-img-wrap:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-shadow-cyan);
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-cyan);
    display: inline-block;
    padding-bottom: 4px;
    margin-bottom: 15px;
}

.custom-input {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: var(--transition-smooth) !important;
}

.custom-input:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 12px rgba(0, 98, 255, 0.12) !important;
    outline: none !important;
}

/* Package Selection Grid */
.package-selection-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 576px) {
    .package-selection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .package-selection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.package-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.package-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 188, 212, 0.3);
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 188, 212, 0.08);
}

.package-card.active {
    background: #e8f7fa !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 0 1px var(--accent-cyan), 0 8px 20px rgba(0, 188, 212, 0.15);
}

.package-card .pack-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.package-card .pack-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.package-card .pack-original-price {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.package-card .pack-discount-price {
    font-size: 13px;
    font-weight: 700;
    color: #ff2a5f;
}

.summary-box {
    background: rgba(0, 188, 212, 0.02) !important;
    border-color: rgba(0, 188, 212, 0.12) !important;
}

/* Premium Buy Button */
.buy-btn {
    background: #bfe3eb !important;
    color: #0f172a !important;
    border: 1px solid rgba(0, 188, 212, 0.2) !important;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.08) !important;
    transition: var(--transition-smooth) !important;
}

.buy-btn:hover:not(:disabled) {
    background: #a2dbe1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.18) !important;
}

.buy-btn:disabled {
    opacity: 0.6 !important;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* Footer Online Indicator Badge */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 200, 83, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 200, 83, 0);
    }
}

.pulse-dot-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 10px;
    height: 10px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-green, #00c853);
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    animation: pulse-green 2s infinite;
}

.online-indicator-badge {
    background: rgba(238, 247, 249, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 188, 212, 0.15) !important;
    border-top: none !important;
    color: var(--text-secondary);
    padding: 0 16px;
    height: 34px;
    border-radius: 0 0 12px 12px !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition-smooth);
    font-family: var(--font-heading);
    line-height: 1;
}

.online-count {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 14px;
}

.text-cyan-glow {
    color: var(--accent-cyan);
    text-shadow: 0 1px 3px rgba(0, 188, 212, 0.2);
}

/* Floating Online Users Badge */
.online-user-floating {
    position: absolute;
    top: 78px;
    right: 12px;
    z-index: 990;
    pointer-events: auto;
}

@media (max-width: 575px) {
    .online-user-floating {
        right: 24px;
    }
}

/* Website Promo Popup Modal */
.promo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.promo-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.promo-popup-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    background: transparent;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible;
}

.promo-popup-overlay.show .promo-popup-content {
    transform: scale(1);
}

.promo-popup-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.promo-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: #ff2a5f;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 42, 95, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10000;
}

.promo-popup-close:hover {
    background: #e02250;
    transform: scale(1.1) rotate(90deg);
}

@media (max-width: 576px) {
    .promo-popup-close {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}