/**
 * TryGC High-Performance & UI Polish Engine
 * Version: 20260814-perf-clean-v5
 * 
 * Provides ultra-fast 60/120 FPS rendering, GPU acceleration, silky scrolling,
 * and clean typography WITHOUT interfering with native shadcn/Tailwind colors,
 * icons, comment composers, or notification panels.
 */

/* ==========================================================================
   1. GLOBAL TYPOGRAPHY & SMOOTHING
   ========================================================================== */

html, body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular-nums,
[class*="metric"],
[class*="count"],
[class*="badge"],
[class*="number"],
[class*="stat"],
td, th {
  font-variant-numeric: tabular-nums lining-nums;
}

/* ==========================================================================
   2. HIGH-PERFORMANCE RENDERING & GPU ACCELERATION
   ========================================================================== */

/* GPU Layer Promotion for heavy composite elements to eliminate repaint lag */
header,
aside,
table,
.sticky {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Smooth page enter transition */
.page-enter {
  animation: gcPageEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Table Row Virtualization & Layout Containment:
   Enables 60/120 FPS scrolling over 1,000+ creator rows by skipping
   off-screen DOM rendering work until scrolled into viewport. */
tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 0 44px;
}

/* ==========================================================================
   3. CLEAN INTERACTIVE POLISH (Non-destructive)
   ========================================================================== */

/* Smooth tactile feedback on buttons without overriding their colors */
button {
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.14s ease,
              background-color 0.14s ease,
              border-color 0.14s ease,
              color 0.14s ease;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

/* Subtle card hover elevation */
.cursor-pointer.bg-card:hover {
  transform: translateY(-1px) translateZ(0);
}

/* ==========================================================================
   4. CLEAN MINIMALIST SCROLLBARS
   ========================================================================== */

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.45);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}
