@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
  font-family: 'ArkPixel';
  src: url('/fonts/ark-pixel-12px-monospaced-zh_cn.ttf.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* CJK fallback font with consistent weight */
@font-face {
  font-family: 'CJK Fallback';
  src: local('PingFang SC'), local('Microsoft YaHei'), local('Noto Sans SC'), local('Hiragino Sans GB');
  font-weight: 100 900;
  font-style: normal;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+F900-FAFF, U+FE30-FE4F;
}

/*
  DeepAudit Design System v3.1
  Theme System with CSS Variables
  - Light Mode: Clean, professional
  - Dark Mode: Cyberpunk Terminal
*/

@layer base {
  /* ====== Light Mode ====== */
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 5%;
    --card: 210 40% 98%;
    --card-foreground: 0 0% 5%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 5%;
    --primary: 21 90% 48%;
    --primary-foreground: 0 0% 100%;
    --secondary: 199 89% 48%;
    --secondary-foreground: 0 0% 100%;
    --success: 142 71% 45%;
    --success-foreground: 0 0% 100%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 35% 18%;
    --accent: 262 83% 58%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --warning: 32 95% 44%;
    --warning-foreground: 0 0% 100%;
    --border: 214 32% 70%;
    --input: 214 32% 88%;
    --ring: 21 90% 48%;
    --radius: 4px;

    /* Light mode specific */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-focus: 0 0 0 3px rgba(234, 88, 12, 0.25);
    --glow-primary: 0 2px 8px rgba(234, 88, 12, 0.15);
    --glow-success: 0 2px 8px rgba(22, 163, 74, 0.15);
    --glow-accent: 0 2px 8px rgba(124, 58, 237, 0.15);
    --glow-cyan: 0 2px 8px rgba(2, 132, 199, 0.15);
    --glow-red: 0 2px 8px rgba(220, 38, 38, 0.15);

    /* Theme-specific colors for utilities - 高对比度深色字体 */
    --cyber-bg: #ffffff;
    --cyber-bg-elevated: #f8fafc;
    --cyber-border: #94a3b8;
    --cyber-border-accent: rgba(234, 88, 12, 0.4);
    --cyber-text: #0a0a0a;
    --cyber-text-muted: #334155;
    --cyber-hover-bg: #f1f5f9;
  }

  /* ====== Dark Mode ====== */
  .dark {
    --background: 0 0% 0%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 2%;
    --popover-foreground: 0 0% 98%;
    --primary: 18 97% 59%;
    --primary-foreground: 0 0% 100%;
    --secondary: 199 89% 48%;
    --secondary-foreground: 0 0% 100%;
    --success: 142 71% 45%;
    --success-foreground: 0 0% 100%;
    --muted: 0 0% 12%;
    --muted-foreground: 0 0% 78%;
    --accent: 270 76% 66%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 10%;
    --border: 0 0% 24%;
    --input: 0 0% 10%;
    --ring: 18 97% 59%;

    /* Dark mode specific */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 2px rgba(255, 107, 44, 0.4);
    --glow-primary: 0 0 20px rgba(255, 107, 44, 0.25), 0 0 40px rgba(255, 107, 44, 0.1);
    --glow-success: 0 0 20px rgba(34, 197, 94, 0.25), 0 0 40px rgba(34, 197, 94, 0.1);
    --glow-accent: 0 0 20px rgba(168, 85, 247, 0.25), 0 0 40px rgba(168, 85, 247, 0.1);
    --glow-cyan: 0 0 20px rgba(14, 165, 233, 0.25), 0 0 40px rgba(14, 165, 233, 0.1);
    --glow-red: 0 0 20px rgba(239, 68, 68, 0.25), 0 0 40px rgba(239, 68, 68, 0.1);

    /* Theme-specific colors for utilities - 纯黑背景 + 高对比度浅色字体 */
    --cyber-bg: #000000;
    --cyber-bg-elevated: #0a0a0a;
    --cyber-border: #3d3d3d;
    --cyber-border-accent: rgba(255, 107, 44, 0.6);
    --cyber-text: #fafafa;
    --cyber-text-muted: #b8b8b8;
    --cyber-hover-bg: #1a1a1a;
  }

  * {
    @apply border-border;
  }

  html {
    scroll-behavior: smooth;
    font-size: 16px;
  }

  /* Smooth theme transition - optimized for performance */
  html.theme-transition {
    transition: background-color 0.25s ease-out !important;
  }

  html.theme-transition body,
  html.theme-transition .bg-background,
  html.theme-transition .bg-card,
  html.theme-transition .bg-muted {
    transition: background-color 0.25s ease-out !important;
  }

  html.theme-transition .text-foreground,
  html.theme-transition .text-muted-foreground {
    transition: color 0.25s ease-out !important;
  }

  body {
    @apply bg-background text-foreground font-mono antialiased;
    line-height: 1.65;
    font-weight: 550;
  }

  /* Typography - use foreground color from variables */
  h1, h2, h3, h4, h5, h6 {
    @apply font-display font-bold tracking-tight text-foreground;
  }

  h1 { @apply text-3xl; letter-spacing: -0.02em; }
  h2 { @apply text-2xl; letter-spacing: -0.01em; }
  h3 { @apply text-xl; }
  h4 { @apply text-lg font-semibold; }
  h5, h6 { @apply text-base font-semibold; }

  /* Paragraph text - ensure good readability */
  p {
    @apply text-foreground;
    line-height: 1.7;
  }

  /* Focus states */
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
  }

  ::selection {
    @apply bg-primary/30 text-foreground;
  }

  a {
    color: hsl(var(--secondary));
    transition: all 0.15s ease;
  }

  a:hover {
    @apply text-primary;
  }
}

@layer utilities {
  /* ============ Cyber Card - uses CSS variables ============ */
  .cyber-card {
    background: var(--cyber-bg);
    border: 1px solid var(--cyber-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
  }

  .cyber-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 1px solid var(--cyber-border-accent);
    border-left: 1px solid var(--cyber-border-accent);
    pointer-events: none;
  }

  .cyber-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 1px solid var(--cyber-border-accent);
    border-right: 1px solid var(--cyber-border-accent);
    pointer-events: none;
  }

  .cyber-card:hover {
    box-shadow: var(--shadow-lg), var(--glow-primary);
  }

  .cyber-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--cyber-bg-elevated);
    border-bottom: 1px solid var(--cyber-border);
  }

  /* ============ Terminal Window ============ */
  .terminal-window {
    background: var(--cyber-bg);
    border: 1px solid var(--cyber-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
  }

  .terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--cyber-bg-elevated);
    border-bottom: 1px solid var(--cyber-border);
  }

  .terminal-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .terminal-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    transition: all 0.2s;
  }

  .terminal-dot-red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #cc3333);
    box-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
  }
  .terminal-dot-yellow {
    background: radial-gradient(circle at 30% 30%, #ffd93d, #cc9900);
    box-shadow: 0 0 6px rgba(255, 217, 61, 0.5);
  }
  .terminal-dot-green {
    background: radial-gradient(circle at 30% 30%, #6bcb77, #2e8b3a);
    box-shadow: 0 0 6px rgba(107, 203, 119, 0.5);
  }

  .terminal-title {
    font-size: 13px;
    margin-left: 0.75rem;
    font-family: monospace;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyber-text-muted);
  }

  .terminal-content {
    padding: 1rem;
    font-family: monospace;
    font-size: 1rem;
    color: var(--cyber-text);
  }

  /* ============ Cyber Buttons ============ */
  .cyber-btn {
    font-family: monospace;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    border: 1px solid var(--cyber-border);
    background: var(--cyber-bg);
    color: var(--cyber-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 14px;
    position: relative;
  }

  .cyber-btn:hover:not(:disabled) {
    background: var(--cyber-hover-bg);
    transform: translateY(-1px);
  }

  .cyber-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .cyber-btn-primary {
    background: linear-gradient(180deg, #ff6a2c 0%, #e55a1c 100%);
    border-color: rgba(255, 106, 44, 0.5);
    color: white;
    box-shadow: 0 0 20px rgba(255, 107, 44, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  }

  .cyber-btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #ff7a3c 0%, #f56a2c 100%);
    box-shadow: 0 0 30px rgba(255, 107, 44, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
  }

  .cyber-btn-success {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    border-color: rgba(34, 197, 94, 0.5);
    color: white;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
  }

  .cyber-btn-success:hover:not(:disabled) {
    background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.35);
  }

  .cyber-btn-ghost {
    background: transparent;
    border-color: transparent;
  }

  .cyber-btn-ghost:hover:not(:disabled) {
    background: var(--cyber-hover-bg);
    border-color: var(--cyber-border);
  }

  .cyber-btn-outline {
    background: transparent;
    border-color: var(--cyber-border);
    color: var(--cyber-text-muted);
  }

  .cyber-btn-outline:hover:not(:disabled) {
    background: var(--cyber-hover-bg);
    color: var(--cyber-text);
  }

  /* ============ Cyber Input ============ */
  .cyber-input {
    background: var(--cyber-bg);
    border: 1px solid var(--cyber-border);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 1rem;
    color: var(--cyber-text);
    transition: all 0.15s ease;
  }

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

  .cyber-input:focus {
    outline: none;
    border-color: hsl(var(--primary) / 0.6);
    box-shadow: var(--shadow-focus);
  }

  .cyber-input:hover:not(:focus) {
    border-color: hsl(var(--border));
  }

  /* ============ Cyber Badges ============ */
  .cyber-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 13px;
    font-family: monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid;
  }

  .cyber-badge-primary {
    background: rgba(255, 107, 44, 0.15);
    color: hsl(var(--primary));
    border-color: rgba(255, 107, 44, 0.4);
  }

  .cyber-badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: hsl(var(--success));
    border-color: rgba(34, 197, 94, 0.4);
  }

  .cyber-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: hsl(var(--warning));
    border-color: rgba(245, 158, 11, 0.4);
  }

  .cyber-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: hsl(var(--destructive));
    border-color: rgba(239, 68, 68, 0.4);
  }

  .cyber-badge-info {
    background: rgba(14, 165, 233, 0.15);
    color: hsl(var(--secondary));
    border-color: rgba(14, 165, 233, 0.4);
  }

  .cyber-badge-muted {
    background: rgba(100, 116, 139, 0.15);
    color: var(--cyber-text-muted);
    border-color: rgba(100, 116, 139, 0.4);
  }

  /* ============ Severity Badges ============ */
  .severity-critical {
    background: rgba(220, 38, 38, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.4);
  }

  .dark .severity-critical {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.25);
  }

  .severity-high {
    background: rgba(234, 88, 12, 0.15);
    color: #c2410c;
    border: 1px solid rgba(234, 88, 12, 0.4);
  }

  .dark .severity-high {
    background: rgba(234, 88, 12, 0.2);
    color: #fdba74;
    border: 1px solid rgba(234, 88, 12, 0.5);
    box-shadow: 0 0 20px rgba(234, 88, 12, 0.25);
  }

  .severity-medium {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.4);
  }

  .dark .severity-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  }

  .severity-low {
    background: rgba(14, 181, 196, 0.15);
    color: #0e7490;
    border: 1px solid rgba(14, 181, 196, 0.4);
  }

  .dark .severity-low {
    background: rgba(14, 181, 196, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(14, 181, 196, 0.5);
    box-shadow: 0 0 20px rgba(14, 181, 196, 0.25);
  }

  .severity-info {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.4);
  }

  .dark .severity-info {
    background: rgba(100, 116, 139, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.5);
  }

  /* ============ Status Indicators ============ */
  .status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    position: relative;
  }

  .status-active {
    background: radial-gradient(circle, #34d399 0%, #10b981 100%);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.6), 0 0 20px rgba(52, 211, 153, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
  }

  .status-warning {
    background: radial-gradient(circle, #fcd34d 0%, #f59e0b 100%);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6), 0 0 20px rgba(251, 191, 36, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
  }

  .status-error {
    background: radial-gradient(circle, #f87171 0%, #ef4444 100%);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.6), 0 0 20px rgba(248, 113, 113, 0.3);
    animation: pulse-glow 1.5s ease-in-out infinite;
  }

  .status-inactive {
    background: var(--cyber-text-muted);
  }

  /* ============ Glow Effects ============ */
  .glow-primary { box-shadow: var(--glow-primary); }
  .glow-success { box-shadow: var(--glow-success); }
  .glow-accent { box-shadow: var(--glow-accent); }
  .glow-cyan { box-shadow: var(--glow-cyan); }

  /* ============ Grid Background ============ */
  .cyber-grid {
    background-image:
      linear-gradient(var(--cyber-border-accent) 1px, transparent 1px),
      linear-gradient(90deg, var(--cyber-border-accent) 1px, transparent 1px);
    background-size: 32px 32px;
  }

  .cyber-grid-subtle {
    background-image:
      linear-gradient(rgba(14, 181, 196, 0.02) 1px, transparent 1px),
      linear-gradient(90deg, rgba(14, 181, 196, 0.02) 1px, transparent 1px);
    background-size: 24px 24px;
  }

  /* ============ Gradient Background ============ */
  .gradient-bg {
    background: hsl(var(--background));
  }

  /* ============ Scrollbar ============ */
  .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .custom-scrollbar::-webkit-scrollbar-track {
    background: var(--cyber-bg);
    border-radius: 3px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--cyber-border);
    border-radius: 3px;
  }

  .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-text-muted);
  }

  /* ============ Section Headers ============ */
  .section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--cyber-border);
    position: relative;
  }

  .section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, hsl(var(--primary) / 0.8), transparent);
  }

  .section-title {
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyber-text);
  }

  /* ============ Stat Cards ============ */
  .stat-card {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cyber-text);
  }

  .stat-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: monospace;
    font-weight: 700;
    color: var(--cyber-text-muted);
  }

  .stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cyber-bg-elevated);
    border: 1px solid var(--cyber-border);
  }

  /* ============ Table Styles ============ */
  .cyber-table {
    width: 100%;
    font-size: 1rem;
  }

  .cyber-table thead {
    background: var(--cyber-bg-elevated);
    border-bottom: 1px solid var(--cyber-border);
  }

  .cyber-table th {
    padding: 1rem 1rem;
    text-align: left;
    font-size: 14px;
    font-family: monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyber-text-muted);
  }

  .cyber-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--cyber-border);
    color: var(--cyber-text);
  }

  .cyber-table tbody tr:hover {
    background: var(--cyber-hover-bg);
  }

  /* ============ Empty State ============ */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    text-align: center;
  }

  .empty-state-icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.5rem;
    color: var(--cyber-text-muted);
  }

  .empty-state-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--cyber-text);
  }

  .empty-state-description {
    font-size: 1rem;
    color: var(--cyber-text-muted);
  }

  /* ============ Loading States ============ */
  .loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--cyber-border);
    border-top-color: hsl(var(--primary));
    border-radius: 9999px;
    animation: spin 1s linear infinite;
  }

  .loading-dots {
    display: flex;
    gap: 0.375rem;
  }

  .loading-dots span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #ff6a2c 0%, #e55a1c 100%);
    box-shadow: 0 0 10px rgba(255, 107, 44, 0.4);
    animation: bounce 1s ease-in-out infinite;
  }

  .loading-dots span:nth-child(2) { animation-delay: 0.15s; }
  .loading-dots span:nth-child(3) { animation-delay: 0.3s; }

  /* ============ Animations ============ */
  @keyframes pulse-glow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.8; filter: brightness(1.1); }
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.5rem); }
  }

  @keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }

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

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

  @keyframes float {
    0%, 100% {
      transform: translateY(0) translateX(0);
      opacity: 0.3;
    }
    25% {
      transform: translateY(-20px) translateX(10px);
      opacity: 0.6;
    }
    50% {
      transform: translateY(-40px) translateX(-5px);
      opacity: 0.3;
    }
    75% {
      transform: translateY(-20px) translateX(-10px);
      opacity: 0.5;
    }
  }

  @keyframes grid-pulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.05; }
  }

  @keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 44, 0.2); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 44, 0.4); }
  }

  @keyframes border-glow {
    0%, 100% { border-color: rgba(255, 107, 44, 0.3); }
    50% { border-color: rgba(255, 107, 44, 0.6); }
  }

  .animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
  .animate-blink { animation: blink 1s step-end infinite; }
  .animate-fade-slide-in { animation: fadeSlideIn 0.3s ease-out forwards; }
  .animate-shimmer { animation: shimmer 2s ease-in-out infinite; }
  .animate-float { animation: float 10s ease-in-out infinite; }
  .animate-grid-pulse { animation: grid-pulse 4s ease-in-out infinite; }
  .animate-glow-pulse { animation: glow-pulse 2s ease-in-out infinite; }
  .animate-border-glow { animation: border-glow 2s ease-in-out infinite; }

  /* ============ Data Display ============ */
  .data-value {
    font-family: 'JetBrains Mono', 'Roboto Mono', monospace;
    color: hsl(var(--secondary));
  }

  .data-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--cyber-text-muted);
  }

  /* ============ Theme-Aware Dialog ============ */
  .cyber-dialog {
    background: var(--cyber-bg) !important;
    border: 1px solid var(--cyber-border) !important;
    border-radius: var(--radius);
  }

  .cyber-dialog-header {
    background: var(--cyber-bg-elevated);
    border-bottom: 1px solid var(--cyber-border);
  }

  .cyber-dialog-footer {
    border-top: 1px solid var(--cyber-border);
  }

  /* ============ Theme-Aware Form Elements ============ */
  .cyber-label {
    font-family: monospace;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
    color: var(--cyber-text-muted);
  }

  .cyber-select-content {
    background: var(--cyber-bg) !important;
    border-color: var(--cyber-border) !important;
  }

  /* ============ Theme-Aware List Items ============ */
  .cyber-list-item {
    background: var(--cyber-bg-elevated);
    border: 1px solid var(--cyber-border);
    border-radius: var(--radius);
    transition: all 0.15s ease;
  }

  .cyber-list-item:hover {
    background: var(--cyber-hover-bg);
    border-color: var(--cyber-border-accent);
  }

  /* ============ Theme-Aware Text ============ */
  .cyber-text {
    color: var(--cyber-text);
  }

  .cyber-text-muted {
    color: var(--cyber-text-muted);
  }

  .cyber-text-primary {
    color: hsl(var(--primary));
  }

  /* ============ Theme-Aware Borders ============ */
  .cyber-border {
    border-color: var(--cyber-border);
  }

  .cyber-border-b {
    border-bottom: 1px solid var(--cyber-border);
  }

  .cyber-border-t {
    border-top: 1px solid var(--cyber-border);
  }

  /* ============ Theme-Aware Backgrounds ============ */
  .cyber-bg {
    background: var(--cyber-bg);
  }

  .cyber-bg-elevated {
    background: var(--cyber-bg-elevated);
  }

  .cyber-bg-hover {
    background: var(--cyber-hover-bg);
  }

  /* ============ Theme-Aware Drop Zone ============ */
  .cyber-dropzone {
    border: 1px dashed var(--cyber-border);
    background: var(--cyber-bg-elevated);
    transition: all 0.15s ease;
  }

  .cyber-dropzone:hover {
    border-color: var(--cyber-border-accent);
    background: var(--cyber-hover-bg);
  }

  /* ============ Theme-Aware Scroll Area ============ */
  .cyber-scroll-area {
    border: 1px solid var(--cyber-border);
    background: var(--cyber-bg-elevated);
    border-radius: var(--radius);
  }

  /* ============ Project Card ============ */
  .project-card {
    background: var(--cyber-bg);
    border: 1px solid var(--cyber-border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
  }

  .project-card:hover {
    border-color: var(--cyber-border-accent);
    box-shadow: var(--shadow-lg);
  }

  .project-card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--cyber-border);
    background: var(--cyber-bg-elevated);
  }

  .project-card-body {
    padding: 1rem;
  }

  .project-card-footer {
    padding: 1rem;
    border-top: 1px solid var(--cyber-border);
    background: var(--cyber-bg-elevated);
  }

  /* ============ Enhanced Visual Effects ============ */

  /* Scanline overlay effect */
  .scanline-overlay {
    background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
  }

  /* Text glow effects */
  .text-glow-primary {
    text-shadow: 0 0 10px rgba(255, 107, 44, 0.5), 0 0 20px rgba(255, 107, 44, 0.3);
  }

  .text-glow-success {
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.5), 0 0 20px rgba(52, 211, 153, 0.3);
  }

  .text-glow-cyan {
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5), 0 0 20px rgba(6, 182, 212, 0.3);
  }

  /* Glass morphism effect */
  .glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .dark .glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Gradient borders */
  .gradient-border {
    position: relative;
  }

  .gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 107, 44, 0.5), transparent, rgba(255, 107, 44, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
  }

  /* Hover lift effect */
  .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  }

  /* Border left accent with gradient */
  .border-l-3 {
    border-left-width: 3px;
  }

  /* Smooth transitions for interactive elements */
  .interactive {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Focus ring enhancement */
  .focus-ring:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--cyber-bg), 0 0 0 4px hsl(var(--primary) / 0.5);
  }

  /* Subtle background patterns */
  .pattern-dots {
    background-image: radial-gradient(circle, var(--cyber-border) 1px, transparent 1px);
    background-size: 20px 20px;
  }

  /* Animated underline */
  .animated-underline {
    position: relative;
  }

  .animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--primary) / 0.5));
    transition: width 0.3s ease;
  }

  .animated-underline:hover::after {
    width: 100%;
  }
}
