@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --primary: #331635;
    --primary-light: #4a2350;
    --primary-dark: #1a0b1b;
    --secondary: #cfa73d;
    --secondary-light: #e8c45a;
    --accent: #6c5ce7;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --surface: #ffffff;
    --surface-alt: #f8f6f3;
    --bg: #f0ebe3;
    --text: #2d3436;
    --text-muted: #636e72;
    --border: #e8e4df;
    --shadow-sm: 0 2px 8px rgba(51, 22, 53, 0.06);
    --shadow-md: 0 4px 20px rgba(51, 22, 53, 0.08);
    --shadow-lg: 0 8px 40px rgba(51, 22, 53, 0.12);
    --shadow-xl: 0 20px 60px rgba(51, 22, 53, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.primary-bg { background-color: var(--primary); }
.primary-text, .text-primary-text { color: var(--primary); }
.text-primary-bg { background-color: var(--primary); color: #fff; }
.secondary-bg { background-color: var(--secondary); }
.secondary-text { color: var(--secondary); }

/* Animated gradient background */
.gradient-animated {
    background: linear-gradient(-45deg, #331635, #1a0b1b, #4a2350, #2d1a30);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism card */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

/* Stat card with hover lift */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transition: var(--transition);
}

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

.stat-card.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.gold::before { background: linear-gradient(90deg, #cfa73d, #e8c45a); }

/* Course card */
.course-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.course-card:hover .course-card-img {
    transform: scale(1.05);
}

.course-card-img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button styles */
.btn-primary {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 22, 53, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(207, 167, 61, 0.3);
}

/* Progress bar animation */
.progress-bar {
    height: 8px;
    border-radius: var(--radius-full);
    background: #e5e7eb;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Pulse dot for live indicators */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--success);
    opacity: 0.4;
    animation: pulse 2s infinite;
}

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

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }

/* Code containers */
.workspace-container {
    background-color: #1E1E1E;
    color: #D4D4D4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

.file-tree {
    background-color: #252526;
    border-right: 1px solid #3A3A3A;
    color: #D4D4D4;
    padding: 1rem;
}

.code-editor {
    background-color: #1E1E1E;
    color: #D4D4D4;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    overflow: auto;
}

.terminal-container {
    background-color: #0d1117;
    color: #58a6ff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    min-height: 400px;
    font-family: 'JetBrains Mono', monospace;
    overflow: auto;
    border: 1px solid #21262d;
}

.code-container {
    font-family: 'JetBrains Mono', monospace;
    background-color: #1E1E1E;
    color: #D4D4D4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-height: 400px;
}

/* Sidebar nav item */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(207, 167, 61, 0.15);
    color: var(--secondary);
    font-weight: 600;
}

/* Badge/tag styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Chart bar animation */
.chart-bar {
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px 6px 0 0;
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4b5a3; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a89580; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    input, select, textarea, button { font-size: 16px !important; }
    table { font-size: 12px; }
    .certificate { width: 100% !important; height: auto !important; }
    .stat-card { padding: 1rem; }
}

a[class*="rounded-full"], button[class*="rounded-full"] {
    white-space: nowrap;
    min-width: fit-content;
}

/* Dark mode */
.dark body { background-color: #0a0a0a; color: #e0e0e0; }
.dark .bg-white { background-color: #1a1a1a; }
.dark .bg-gray-50, .dark .bg-gray-100 { background-color: #111111; }
.dark .text-gray-700, .dark .text-gray-800, .dark .text-gray-600 { color: #c4c4c4; }
.dark .border-gray-200, .dark .border-gray-100 { border-color: #2a2a2a; }
.dark .primary-text { color: #e0c97f; }
.dark .shadow-md, .dark .shadow-lg, .dark .shadow-sm { box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.dark .stat-card, .dark .course-card { background: #1a1a1a; border-color: #2a2a2a; }
