/* Global Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Dark Mode (Default) */
body {
    background-color: #020617;
    color: #e2e8f0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light Mode */
html.light-mode body {
    background-color: #f8fafc;
    color: #1e293b;
}

html.light-mode ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

html.light-mode ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

html.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Touch Optimizations */
@media (max-width: 768px) {
    /* Larger touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text size adjustment */
    body {
        -webkit-text-size-adjust: 100%;
    }
    
    /* Improve tap highlighting */
    * {
        -webkit-tap-highlight-color: rgba(6, 182, 212, 0.2);
    }
}

/* Performance: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Utility: Line clamp for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
