@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Tối giản và chuyên nghiệp */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    
    --success: #10b981;
    --success-dark: #059669;
    --success-50: #ecfdf5;
    
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-50: #fef2f2;
    
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --warning-50: #fffbeb;
    
    --info: #06b6d4;
    --info-dark: #0891b2;
    
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --lighter: #f1f5f9;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    
    /* Gradients - Tinh tế hơn */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* Shadows - Tinh tế hơn */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
    
    /* Border Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --border-radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

/* Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-brand i {
    font-size: 1.75rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark);
    padding: 0.5rem 1rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-normal);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover {
    color: var(--primary);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    background: white;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: white;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-header .card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: var(--gradient-warning);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: var(--gradient-dark);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* Countdown Timer */
.countdown-container {
    background: var(--gradient-dark);
    border-radius: var(--border-radius-lg);
    padding: 3px;
    margin: 1rem 0;
    text-align: center;
    color: white;
place-items: center;
}

.countdown-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.countdown-timer {
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 50%;
    display: inline-block;
    backdrop-filter: blur(10px);
min-width: 30px;
}

.countdown-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Code Display */
.code-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.25rem;
    background: var(--gray-50);
    color: var(--dark);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    display: inline-block;
    min-width: 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.code-display:hover::before {
    transform: scaleX(1);
}

.code-display:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

/* Progress Bars */
.progress {
    border-radius: var(--border-radius-full);
    background: var(--gray-200);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    font-weight: bold;
    height: 20px !important;
    background: var(--gradient-primary);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Badges */
.badge {
    border-radius: var(--border-radius-full);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary);
}

.badge-success {
    background: var(--success-50);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-50);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-50);
    color: var(--danger);
}

/* Tables */
.table-container {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
}

.table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    background: var(--gray-50);
    color: var(--dark);
    font-weight: 600;
    border: none;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    padding: 1rem;
    transition: background var(--transition-fast);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover td {
    background: var(--gray-50);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control, .form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    width: 100%;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-text {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-content {
    flex: 1;
}

.alert-success {
    background: var(--success-50);
    color: var(--success-dark);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: var(--warning-50);
    color: var(--warning-dark);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: var(--primary-50);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

.alert-danger {
    background: var(--danger-50);
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: white;
    color: var(--dark);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Feature Icons */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.feature-icon:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Floating Animations */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating-delay-1 { animation-delay: 0.2s; }
.floating-delay-2 { animation-delay: 0.4s; }
.floating-delay-3 { animation-delay: 0.6s; }

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

.bg-gradient-warning {
    background: var(--gradient-warning) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-xl);
}

.border-gradient {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
}

/* Grid System Enhancements */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .code-display {
        font-size: 1.125rem;
        padding: 0.75rem 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #0f172a;
        --lighter: #1e293b;
        --dark: #f1f5f9;
        --gray-50: #1e293b;
        --gray-100: #334155;
        --gray-200: #475569;
    }
    
    body {
        background-color: var(--light);
        color: var(--dark);
    }
    
    .card {
        background: var(--lighter);
    }
    
    .navbar {
        background: rgba(30, 41, 59, 0.95);
    }
    
    .navbar-nav .nav-link {
        color: var(--dark);
    }
    
    .form-control, .form-select {
        background: var(--lighter);
        border-color: var(--gray-200);
        color: var(--dark);
    }
    
    .table-container {
        background: var(--lighter);
    }
    
    .table th {
        background: var(--gray-100);
        color: var(--dark);
    }
    
    .table td {
        border-color: var(--gray-200);
    }
    
    .code-display {
        background: var(--gray-100);
        color: var(--dark);
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .alert, .modal, .floating {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
.ad-banner {
    background: #ffffff;
    border: 2px dashed #e5e7eb;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
    border-radius: 8;
    color: #6b7280;
}