/* --- NGL PLATFORM ULTRA MODERN 3D DESIGN --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* Enhanced Color Scheme */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --neon-blue: #00d4ff;
    --neon-purple: #a855f7;
    --neon-pink: #ec4899;
    --neon-green: #10b981;
    
    /* Deep Dark Theme Colors for Readability */
    --bg-primary: #050509; /* Even deeper black */
    --bg-secondary: #111118; /* Darker secondary */
    --bg-tertiary: #10182c;
    --glass-bg: rgba(255, 255, 255, 0.03); /* Less bright glass */
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e5e7eb; /* Softer white for less eye strain */
    --text-secondary: #a0a0b0; /* Brighter secondary text */
    --text-muted: #888ea8; /* Brighter muted text for better contrast */

    /* Advanced Glassmorphism */
    --glass-blur: blur(30px);
    --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --glass-shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.4);
    
    /* 3D Effects */
    --card-3d-transform: perspective(1000px);
    --hover-lift: translateY(-10px) rotateX(5deg);
    --button-press: translateY(2px) scale(0.98);
    
    /* Animations */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Typography */
    --font-primary: 'Space Grotesk', 'Inter', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    line-height: 1.6; /* Improved line height for readability */
}

/* Enhanced Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 200, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -2;
}

/* Floating Particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 119, 198, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(120, 200, 255, 0.1), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(120, 255, 198, 0.1), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: float 30s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundShift {
    0%, 100% { 
        background-position: 0% 50%, 100% 50%, 50% 100%; 
        filter: hue-rotate(0deg);
    }
    25% { 
        background-position: 100% 50%, 0% 50%, 25% 75%; 
        filter: hue-rotate(90deg);
    }
    50% { 
        background-position: 50% 0%, 50% 100%, 75% 25%; 
        filter: hue-rotate(180deg);
    }
    75% { 
        background-position: 0% 100%, 100% 0%, 100% 50%; 
        filter: hue-rotate(270deg);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-200px); }
}

/* Enhanced Card System */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-15px) rotateX(8deg) rotateY(2deg);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.card:hover::before {
    opacity: 1;
}

/* Animated Card Border Effect */
.card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: 26px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition-smooth);
}

.card:hover::after {
    opacity: 0.3;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.card-header {
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.card-body {
    padding: 2rem;
    position: relative;
}

.card-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
}

/* Enhanced Buttons with 3D Effects */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    transform-style: preserve-3d;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: var(--secondary-gradient);
    box-shadow: 0 8px 32px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(240, 147, 251, 0.6);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.6);
}

.btn-danger {
    background: var(--danger-gradient);
    box-shadow: 0 8px 32px rgba(250, 112, 154, 0.4);
}

.btn-danger:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(250, 112, 154, 0.6);
}

/* 3D Form Elements */
.form-control {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    position: relative;
}

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

.form-control:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 
        0 0 20px rgba(0, 212, 255, 0.3),
        inset 0 2px 10px rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Navigation */
.navbar {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar-brand {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-gradient);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.navbar-brand:hover::after {
    width: 100%;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Sidebar Enhancement */
.sidebar {
    width: 280px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    z-index: -1;
}

.sidebar .navbar-brand {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.8rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.sidebar .nav-link i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    transform: translateX(8px);
}

.sidebar .nav-item.active .nav-link {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 3D Terminal Styling */
#terminal {
    border-radius: 16px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid var(--glass-border);
    box-shadow: 
        inset 0 4px 20px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

#terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg, #ff5f56 0%, #ffbd2e 33%, #27ca3f 66%);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

#terminal::after {
    content: '● ● ●';
    position: absolute;
    top: 12px;
    left: 1rem;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.8rem;
    z-index: 2;
}

/* Status Indicators */
.status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    position: relative;
    box-shadow: 0 0 10px currentColor;
}

.status-online {
    background: var(--neon-green);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-offline {
    background: #dc3545;
    animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 10px var(--neon-green); }
    50% { box-shadow: 0 0 20px var(--neon-green), 0 0 30px var(--neon-green); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 10px #dc3545; }
    50% { box-shadow: 0 0 20px #dc3545, 0 0 30px #dc3545; }
}

/* Enhanced Page Layout */
.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.container-tight {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.page {
    display: flex;
    min-height: 100vh;
}

.page-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.page-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* User Info Enhancement */
.username {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.user-balance {
    font-weight: 700;
    color: var(--neon-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

/* Input Group Enhancement */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-bottom: 1rem;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 16px 24px;
}

/* Hero Section for Homepage */
.hero-section {
    text-align: center;
    padding: 8rem 2rem 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.display-4 {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--neon-blue) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.lead {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Feature Icons */
.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

/* CTA Section */
.cta-section {
    padding: 6rem 3rem;
    border-radius: 24px;
    background: var(--primary-gradient);
    text-align: center;
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite reverse;
    z-index: 0;
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

/* Utility Classes */
.w-100 { width: 100%; }
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.text-muted { color: var(--text-muted) !important; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.me-3 { margin-right: 1rem !important; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .display-4 { font-size: 2.5rem; }
    .lead { font-size: 1.2rem; }
    .sidebar { width: 100%; height: auto; }
    .page { flex-direction: column; }
    .navbar { padding: 1rem; }
    .hero-section { padding: 4rem 1rem 3rem; }
    .cta-section { padding: 4rem 2rem; }
    .grid-container { 
        grid-template-columns: 1fr; 
        gap: 1rem; 
    }
    .btn { padding: 12px 24px; font-size: 0.9rem; }
    .card { border-radius: 16px; }
    .card-body { padding: 1.5rem; }
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 400% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

/* Notification Enhancement */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

/* Footer Enhancement */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
}

/* Darkmode styles */
body.dark-mode {
    background: #181c24 !important;
    color: #e0e6f0 !important;
}
.dark-mode .navbar,
.dark-mode .sidebar,
.dark-mode .footer-3d {
    background: #23283a !important;
    color: #e0e6f0 !important;
    box-shadow: 0 2px 16px #000a;
}
.dark-mode .card-3d {
    background: #23283a !important;
    color: #e0e6f0 !important;
    box-shadow: 0 4px 32px #000c;
    border: 1px solid #2c3145;
}
.dark-mode .btn-primary,
.dark-mode .btn-secondary,
.dark-mode .btn-dark {
    background: #0cf !important;
    color: #181c24 !important;
    border: none;
}
.dark-mode .btn-3d {
    box-shadow: 0 2px 8px #0cf6;
}
.dark-mode .form-control {
    background: #23283a !important;
    color: #e0e6f0 !important;
    border: 1px solid #2c3145;
}
.dark-mode .nav-link,
.dark-mode .card-title,
.dark-mode .card-text {
    color: #e0e6f0 !important;
}
.dark-mode .main-content {
    background: #181c24 !important;
}
.dark-mode .page-title,
.dark-mode h1,
.dark-mode h2,
.dark-mode h5 {
    color: #0cf !important;
    text-shadow: 0 4px 24px #0cf4;
}