/* ==========================================
   💎 BALANCED LIQUID GLASS THEME
   Beautiful & Readable Glassmorphism
   ========================================== */

:root {
    /* Balanced Glass Properties */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-light: rgba(255, 255, 255, 0.15);
    --glass-bg-heavy: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --glass-blur: 25px;  /* Giảm từ 45px → 25px */
    --glass-saturate: 150%;  /* Giảm từ 200% → 150% */
    
    /* Premium Colors */
    --primary-color: #9c27b0;
    --primary-gradient-start: #8e24aa;
    --primary-gradient-end: #ba68c8;
    --secondary-color: #673ab7;
    --accent-color: #e91e63;
    --glow-color: rgba(156, 39, 176, 0.5);
    
    /* Enhanced Text Colors - DỄ ĐỌC HƠN */
    --text-primary: rgba(255, 255, 255, 1);  /* 100% opacity - rõ ràng */
    --text-secondary: rgba(255, 255, 255, 0.9);  /* 90% */
    --text-muted: rgba(255, 255, 255, 0.7);  /* 70% */
}

/* ==========================================
   1. LIQUID BACKGROUND WITH MORPHING BLOBS
   ========================================== */

.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: linear-gradient(135deg, 
        #0a0015 0%, 
        #1a0033 25%, 
        #2d0052 50%, 
        #1a0033 75%, 
        #0a0015 100%
    );
}

.blob {
    position: absolute;
    border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
    filter: blur(60px) saturate(150%);  /* Giảm blur */
    opacity: 0.6;  /* Giảm opacity */
    animation: morph 20s ease-in-out infinite, float 15s ease-in-out infinite;
    will-change: transform, border-radius;
}

.blob-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
    background: linear-gradient(135deg, 
        rgba(156, 39, 176, 0.5) 0%, 
        rgba(103, 58, 183, 0.4) 50%,
        rgba(233, 30, 99, 0.3) 100%
    );
    animation-delay: 0s;
}

.blob-2 {
    width: 450px;
    height: 450px;
    top: 50%;
    right: -100px;
    background: linear-gradient(135deg, 
        rgba(233, 30, 99, 0.4) 0%, 
        rgba(156, 39, 176, 0.5) 50%,
        rgba(103, 58, 183, 0.3) 100%
    );
    animation-delay: -7s;
}

.blob-3 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    left: 30%;
    background: linear-gradient(135deg, 
        rgba(103, 58, 183, 0.4) 0%, 
        rgba(233, 30, 99, 0.3) 50%,
        rgba(156, 39, 176, 0.5) 100%
    );
    animation-delay: -14s;
}

@keyframes morph {
    0%, 100% {
        border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%;
    }
    25% {
        border-radius: 60% 40% 45% 55% / 55% 50% 45% 50%;
    }
    50% {
        border-radius: 55% 45% 50% 50% / 45% 60% 40% 55%;
    }
    75% {
        border-radius: 50% 50% 55% 45% / 50% 45% 60% 40%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(40px, -60px) rotate(120deg) scale(1.05);
    }
    66% {
        transform: translate(-50px, 50px) rotate(240deg) scale(0.95);
    }
}

/* ==========================================
   2. BALANCED GLASS CARD
   ========================================== */

.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)) !important;
    border: 1.5px solid var(--glass-border) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(156, 39, 176, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text Shadow cho Contrast */
.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card h4,
.glass-card h5,
.glass-card h6,
.glass-card p,
.glass-card span,
.glass-card a,
.glass-card label {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    color: var(--text-primary) !important;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(156, 39, 176, 0.4) !important;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(156, 39, 176, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 60px rgba(156, 39, 176, 0.3) !important;
}

/* ==========================================
   3. ENHANCED NAVBAR
   ========================================== */

.glass-navbar {
    background: rgba(10, 0, 21, 0.9) !important;
    backdrop-filter: blur(30px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(150%) !important;
    border-bottom: 1.5px solid rgba(156, 39, 176, 0.3) !important;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(156, 39, 176, 0.2) !important;
}

.glass-navbar .nav-link {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
}

.glass-navbar .nav-link:hover {
    background: rgba(156, 39, 176, 0.2);
    color: #fff !important;
    text-shadow: 0 0 15px rgba(156, 39, 176, 0.8);
    transform: translateY(-2px);
}

.glass-navbar .navbar-brand {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

/* ==========================================
   4. PREMIUM BUTTONS
   ========================================== */

.btn-liquid {
    background: linear-gradient(135deg, 
        var(--primary-gradient-start), 
        var(--primary-gradient-end)
    ) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 14px !important;
    padding: 10px 28px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 6px 20px rgba(156, 39, 176, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-liquid:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 12px 32px rgba(156, 39, 176, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(156, 39, 176, 0.5) !important;
}

.btn-liquid:active {
    transform: translateY(-1px) scale(1.01);
}

/* ==========================================
   5. GLASS INPUTS - DỄ ĐỌC
   ========================================== */

.glass-input {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(15px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(130%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 12px 16px !important;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 0 0 rgba(156, 39, 176, 0);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(156, 39, 176, 0.2),
        0 8px 24px rgba(156, 39, 176, 0.3) !important;
    transform: translateY(-2px);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    text-shadow: none;
}

/* ==========================================
   6. GLASS MODALS
   ========================================== */

.glass-modal .modal-content {
    background: rgba(26, 0, 51, 0.92) !important;
    backdrop-filter: blur(35px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(150%) !important;
    border: 1.5px solid rgba(156, 39, 176, 0.4) !important;
    border-radius: 24px !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 4px 20px rgba(156, 39, 176, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.glass-modal .modal-title {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(156, 39, 176, 0.4);
    font-weight: 600;
}

.glass-modal .modal-body {
    color: var(--text-primary) !important;
}

.glass-modal .modal-body * {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   7. GLASS TABLES
   ========================================== */

.glass-table {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(20px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(130%) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.glass-table thead {
    background: linear-gradient(180deg, 
        rgba(156, 39, 176, 0.25) 0%, 
        rgba(156, 39, 176, 0.15) 100%
    );
}

.glass-table thead th {
    color: var(--text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.8px;
    padding: 16px 14px;
    border: none !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.glass-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.glass-table tbody tr:hover {
    background: rgba(156, 39, 176, 0.15) !important;
    box-shadow: 0 2px 12px rgba(156, 39, 176, 0.2);
}

.glass-table tbody td {
    color: var(--text-primary) !important;
    padding: 14px;
    border: none !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

/* ==========================================
   8. GLASS BADGES
   ========================================== */

.glass-badge {
    background: rgba(156, 39, 176, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(156, 39, 176, 0.4) !important;
    border-radius: 10px !important;
    padding: 5px 12px !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
    transition: all 0.3s ease;
}

.glass-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.5);
}

/* Badge Variants */
.badge-success.glass-badge {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: rgba(76, 175, 80, 0.4) !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.badge-danger.glass-badge {
    background: rgba(244, 67, 54, 0.3) !important;
    border-color: rgba(244, 67, 54, 0.4) !important;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.badge-warning.glass-badge {
    background: rgba(255, 193, 7, 0.3) !important;
    border-color: rgba(255, 193, 7, 0.4) !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.badge-info.glass-badge {
    background: rgba(33, 150, 243, 0.3) !important;
    border-color: rgba(33, 150, 243, 0.4) !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

/* ==========================================
   9. ENHANCED TEXT READABILITY
   ========================================== */

body {
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(156, 39, 176, 0.3);
    font-weight: 600;
}

p, span, a, label, li {
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ==========================================
   10. SCROLLBAR THEME
   ========================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    margin: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(156, 39, 176, 0.6), 
        rgba(103, 58, 183, 0.6)
    );
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(156, 39, 176, 0.8), 
        rgba(103, 58, 183, 0.8)
    );
}

/* ==========================================
   11. RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    :root {
        --glass-blur: 20px;
    }
    
    .glass-card {
        border-radius: 16px !important;
    }
    
    .blob {
        filter: blur(50px) saturate(130%);
    }
    
    .blob-1 {
        width: 350px;
        height: 350px;
    }
    
    .blob-2 {
        width: 320px;
        height: 320px;
    }
    
    .blob-3 {
        width: 340px;
        height: 340px;
    }
}

/* ==========================================
   12. UTILITY CLASSES
   ========================================== */

.text-glow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(156, 39, 176, 0.4);
}

.glass-glow {
    position: relative;
}

.glass-glow:hover {
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 4px 16px rgba(156, 39, 176, 0.5),
        0 0 60px rgba(156, 39, 176, 0.4) !important;
}

/* Remove particles overlay - giảm phức tạp */
.glass-particles {
    display: none;
}
