/* ==========================================================================
   Bangla Nodes™ - Global Premium Cyber-Neon Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-primary: #0b0b12;
    --bg-surface: rgba(18, 18, 29, 0.7);
    --bg-surface-hover: rgba(28, 28, 45, 0.9);
    --accent-neon: #6C63FF;
    --accent-neon-glow: rgba(108, 99, 255, 0.4);
    --accent-secondary: #00f2fe;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(108, 99, 255, 0.2);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glass-blur: blur(14px);
}

/* Base Adjustments */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    position: relative;
}

/* Background Systems: Matrix Grid Lines & Animated Canvas Particles */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Global Typography & Scrollbars */
h1, h2, h3, h4, .brand-font {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-neon);
}

/* Universal Loading Screen & Toast UI */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-neon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toast {
    background: rgba(11, 11, 18, 0.9);
    border-left: 4px solid var(--accent-neon);
    padding: 16px 24px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: var(--glass-blur);
    transform: translateY(100px);
    opacity: 0;
    animation: fadeUp 0.4s forwards;
}

/* Layout Utilities & Reusable Navigation UI */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 11, 18, 0.75);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}
.nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo span { color: var(--accent-neon); }
.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}
.nav-links a:hover {
    color: var(--accent-neon);
    text-shadow: 0 0 10px var(--accent-neon-glow);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium Component System: Buttons & Glass Cards */
.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    text-align: center;
}
.btn-primary {
    background: var(--accent-neon);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-neon-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-neon);
}
.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-muted);
}

.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-smooth);
}
.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-neon);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.15);
}

/* Hero & General Homepage Content Blocks */
.hero {
    padding: 140px 0 80px 0;
    text-align: center;
    position: relative;
}
.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 40%, var(--accent-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.stat-card {
    text-align: center;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 100px 0 48px 0;
}
.section-title span { color: var(--accent-neon); }

/* Category Showcase Design */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.category-card {
    text-align: center;
    padding: 40px 24px;
}
.category-card .icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* Product Marketplace Hub Design */
.marketplace-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding-top: 40px;
}
.sidebar-filter {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.filter-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.form-input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent-neon);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.product-img {
    width: 100%;
    height: 200px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 16px;
}
.badge-stack {
    position: absolute;
    top: 36px;
    left: 36px;
    display: flex;
    gap: 8px;
}
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-new { background: var(--accent-secondary); color: #000; }
.badge-discount { background: #ff0055; color: #fff; }

/* Enhanced Price Styling */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 12px 0;
}
.current-price { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--accent-secondary); 
}
.old-price { 
    text-decoration: line-through; 
    color: var(--text-muted); 
    font-size: 1rem; 
    opacity: 0.7;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

/* Reviews / Testimonials Systems */
.carousel-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 20px;
}
.review-card {
    min-width: 350px;
    flex: 1;
}

/* Fluid Video Presentation Gallery */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Why Choose Us & Advanced Accordion Systems */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    cursor: pointer;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: var(--text-muted);
    padding-top: 0;
}
.accordion-item.active .accordion-content {
    max-height: 200px;
    padding-top: 16px;
}

/* Gateways & Transaction Verification Forms */
.gateway-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.gateway-card {
    padding: 20px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}
.gateway-card.selected {
    border-color: var(--accent-neon);
    background: rgba(108, 99, 255, 0.05);
}

/* Full Width Structural Sticky Footer Blocks */
.footer-main {
    background: #06060a;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
    margin-top: 120px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 40px;
}
.footer-col h4 { margin-bottom: 20px; font-size: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a { color: var(--text-muted); }
.footer-col ul a:hover { color: var(--accent-neon); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Structural Engineering (Mobile & Tablet Support) */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.back-to-top {
    position: fixed;
    bottom: 32px;
    left: 32px;
    background: var(--accent-neon);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Tablet / Laptop Media Query optimization */
@media(max-width: 1024px) {
    .container { padding: 0 20px; }
    .marketplace-layout { grid-template-columns: 1fr; gap: 30px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .gateway-row { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

/* Mobile Media Query Optimization */
@media(max-width: 768px) {
    .navbar { padding: 15px 0; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-actions { gap: 10px; }
    .btn { padding: 10px 20px; font-size: 0.9rem; }
    
    .hero { padding: 100px 0 50px 0; }
    .hero h1 { font-size: 2.4rem; line-height: 1.3; }
    .hero p { font-size: 1rem; margin-bottom: 30px; }
    .hero-cta { flex-direction: column; gap: 12px; width: 100%; max-width: 300px; margin: 0 auto 50px auto; }
    .hero-cta .btn { width: 100%; }

    .section-title { font-size: 2rem; margin: 60px 0 32px 0; }
    
    .stats-grid, 
    .category-grid, 
    .products-grid, 
    .why-grid, 
    .video-grid, 
    .gateway-row,
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }

    .product-card { padding: 16px; }
    .card-actions { grid-template-columns: 1fr; gap: 10px; }
    
    .review-card { min-width: 280px; }
    
    .footer-main { padding: 60px 0 30px 0; margin-top: 80px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 16px; }
}

/* Animations engine */
@keyframes fadeUp {
    to { transform: translateY(0); opacity: 1; }
}
.animate-fade-up {
    transform: translateY(30px);
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}