/* Modern Elegant UI Design for ShellOps */
/* Inspired by latest UI trends: glassmorphism, subtle animations, and modern spacing */

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

:root {
    /* Modern Color Palette */
    --primary: #6366f1;
    --primary-light: #8b5cf6;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --secondary-light: #34d399;
    --accent: #f59e0b;
    
    /* Neutral Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.02);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-accent: #a855f7;
    
    /* Border Colors */
    --border-primary: rgba(255, 255, 255, 0.1);
    --border-secondary: rgba(99, 102, 241, 0.2);
    --border-accent: rgba(16, 185, 129, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --shadow-glow-secondary: 0 0 30px rgba(16, 185, 129, 0.3);
    
    /* Spacing Scale */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.font-display {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.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 var(--transition-slow);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-outline {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-secondary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* Form Elements */
.form-input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

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

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-error {
    margin-top: var(--spacing-xs);
    color: #ef4444;
    font-size: 0.75rem;
}

/* Navigation */
.nav-modern {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-secondary);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-primary);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Stats Cards */
.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-secondary {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width var(--transition-slow);
    border-radius: var(--radius-sm);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp var(--transition-normal) ease-out;
}

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

/* Mobile Menu Toggle - Hidden by default, shown on mobile */
.mobile-menu-toggle {
    display: none;
}

/* Responsive Design */
/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
    .nav-modern {
        padding: var(--spacing-sm) 0;
        position: relative;
        z-index: 1000;
    }
    
    /* New Navigation Mobile Styles */
    .nav-menu {
        display: none;
    }
    
    .nav-actions .lang-toggle {
        display: none;
    }
    
    .nav-actions .user-profile {
        display: none;
    }
    
    .nav-actions .auth-buttons {
        display: none;
    }
    
    .mobile-toggle {
        display: flex !important;
    }
    
    .nav-content {
        height: 60px;
    }
    
    .brand-logo {
        height: 32px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .card {
        padding: var(--spacing-md);
        margin: var(--spacing-sm) 0;
    }
    
    .challenge-card {
        padding: var(--spacing-md);
    }
    
    .btn-lg {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    /* Challenge grid - single column on mobile */
    .challenge-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }
    
    /* Form adjustments */
    .form-input {
        padding: var(--spacing-sm);
        font-size: 1rem;
    }
    
    /* Navigation adjustments */
    .logo {
        font-size: 1rem;
    }
    
    .logo img {
        height: 1.5rem !important;
    }
    
    .nav-links {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
        padding: var(--spacing-sm);
        background: var(--bg-tertiary);
        border: 1px solid var(--border-primary);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        cursor: pointer;
        transition: all var(--transition-normal);
    }
    
    .mobile-menu-toggle:hover {
        background: var(--bg-secondary);
        border-color: var(--primary);
    }
    
    /* Properly hide desktop elements on mobile */
    .nav-modern .hidden.md\\:flex {
        display: none !important;
    }
    
    .nav-modern .hidden.md\\:block {
        display: none !important;
    }
    
    /* Mobile menu overlay */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        z-index: 9999;
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .mobile-menu-content {
        position: absolute;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-primary);
        padding: var(--spacing-lg);
        transform: translateX(100%);
        transition: transform var(--transition-normal);
    }
    
    .mobile-menu.active .mobile-menu-content {
        transform: translateX(0);
    }
    
    .mobile-nav-link {
        display: block;
        padding: var(--spacing-md);
        color: var(--text-primary);
        text-decoration: none;
        border-bottom: 1px solid var(--border-primary);
        transition: all var(--transition-normal);
    }
    
    .mobile-nav-link:hover {
        background: var(--bg-tertiary);
        color: var(--primary);
    }
    
    .mobile-nav-link i {
        margin-right: var(--spacing-sm);
        width: 20px;
        text-align: center;
    }
}

/* New Navigation Design */
.new-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Brand Section */
.nav-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-link:hover {
    transform: translateY(-2px);
}

.brand-logo {
    height: 40px;
    width: auto;
    margin-right: 12px;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.admin-link {
    color: #f59e0b;
}

.admin-link:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
}

/* Actions Section */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.lang-btn {
    padding: 6px 12px;
    color: #64748b;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #6366f1;
    color: white;
}

.lang-btn:hover:not(.active) {
    color: #cbd5e1;
    background: rgba(99, 102, 241, 0.1);
}

/* User Profile */
.user-profile {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.profile-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #f8fafc;
}

.profile-level {
    font-size: 0.75rem;
    color: #64748b;
}

.profile-arrow {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.3s ease;
}

.profile-btn:hover .profile-arrow {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 280px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.profile-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6366f1;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.profile-action:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.profile-action i {
    width: 16px;
    text-align: center;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
}

.auth-btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-align: center;
}

.login-btn {
    color: #cbd5e1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.login-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.5);
}

.register-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: 1px solid transparent;
}

.register-btn:hover {
    background: linear-gradient(135deg, #5855eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.mobile-toggle:hover .hamburger-line {
    background: #6366f1;
}

/* Add top padding to body to account for fixed nav */
body {
    padding-top: 70px !important;
}

/* Tablet devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .nav-modern {
        padding: var(--spacing-sm) 0;
    }
    
    .card {
        padding: var(--spacing-lg);
    }
    
    .challenge-card {
        padding: var(--spacing-lg);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Challenge grid - two columns on tablet */
    .challenge-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-lg);
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 1.875rem !important;
    }
}

/* iPad and larger tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .challenge-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-xl);
    }
    
    .card {
        padding: var(--spacing-xl);
    }
    
    .challenge-card {
        padding: var(--spacing-xl);
    }
    
    /* Better spacing for tablets */
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Large screens (1025px and up) */
@media (min-width: 1025px) {
    .challenge-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: var(--spacing-xl);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .challenge-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .challenge-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .form-input {
        min-height: 44px;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: var(--spacing-md) var(--spacing-lg);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* Focus Styles */
.focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary);
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.theme-toggle.active::before {
    transform: translateX(1.5rem);
}

/* Loading Spinner */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border-primary);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 1000;
}

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

/* Challenge Cards */
.challenge-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary);
}

.challenge-card-header {
    margin-bottom: var(--spacing-md);
}

.challenge-card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.difficulty-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty-easy {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.difficulty-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-hard {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.blur-bg {
    backdrop-filter: blur(20px);
}

.border-gradient {
    border: 1px solid;
    border-image: linear-gradient(135deg, var(--primary), var(--primary-light)) 1;
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

.shadow-glow-secondary {
    box-shadow: var(--shadow-glow-secondary);
}
/* Virtual Terminal Styles */
.virtual-terminal {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #00ff66;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    flex: 1;
    margin-left: 8px;
}

.terminal-input:focus {
    outline: none;
}

.terminal-line {
    display: flex;
    align-items: center;
    padding: 2px 15px;
    min-height: 20px;
}

.terminal-prompt {
    color: #00ff66;
    font-weight: bold;
    white-space: nowrap;
}

.terminal-command {
    color: #ffffff;
    margin-left: 8px;
}

.terminal-output {
    color: #cccccc;
    margin-left: 8px;
}

.terminal-error {
    color: #ff6b6b;
    margin-left: 8px;
}

.terminal-success {
    color: #51cf66;
    margin-left: 8px;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    animation: slideIn 0.4s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.toast.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast.toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00ff66, #00bfff);
    animation: progressBar 4s linear forwards;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
    min-width: 24px;
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.toast-description {
    font-size: 14px;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* XP Celebration Animation */
.xp-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    pointer-events: none;
    font-size: 48px;
    font-weight: bold;
    color: #00ff66;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.8);
    animation: celebrationBounce 2s ease-out forwards;
}

@keyframes celebrationBounce {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Confetti Animation */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00ff66;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.4s ease-out;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff66, #00bfff);
    animation: progressBar 4s linear;
}

.toast-success {
    border-color: rgba(0, 255, 102, 0.4);
}

.toast-success::before {
    background: linear-gradient(90deg, #00ff66, #00ff66);
}

.toast-error {
    border-color: rgba(239, 68, 68, 0.4);
}

.toast-error::before {
    background: linear-gradient(90deg, #ef4444, #ef4444);
}

.toast-warning {
    border-color: rgba(245, 158, 11, 0.4);
}

.toast-warning::before {
    background: linear-gradient(90deg, #f59e0b, #f59e0b);
}

.toast-xp {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
}

.toast-xp::before {
    background: linear-gradient(90deg, #ffd700, #ffa500);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    color: #e2e8f0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #00ff66;
}

.toast-description {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    padding: 0;
    margin-left: 8px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #e2e8f0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Mobile responsiveness for toasts */
@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
        padding: 12px;
    }
    
    .toast-icon {
        font-size: 20px;
    }
    
    .xp-celebration {
        font-size: 36px;
    }
}
