/* ============================================
   DomainAI Pro - Dashboard Specific Styles
   ============================================ */

/* Override font family globally */
body,
.md-top-bar,
.md-card,
.md-btn,
.md-field__input,
.md-search-bar__input,
.md-table,
.md-drawer__nav-item,
.md-bottom-nav__label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
}

/* Monospace for domain names and data */
.domain-name,
.md-table td:nth-child(2),
.score-ring__value {
  font-family: 'JetBrains Mono', 'SF Mono', monospace !important;
}

/* Tab content visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Hero gradient animation */
.hero-section {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

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

/* Enhanced card interactions */
.md-card {
  will-change: transform, box-shadow;
}

.md-card:hover {
  transform: translateY(-1px);
}

/* Better table row hover */
.md-table tbody tr {
  transition: all 0.15s ease;
}

.md-table tbody tr:hover {
  background: rgba(67, 56, 202, 0.04);
}

/* Stat card counter animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-card__value {
  animation: countUp 0.5s ease;
}

/* Search bar focus glow */
.md-search-bar:focus-within {
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15), var(--md-shadow-2);
}

/* Niche tag hover effects */
.niche-tag {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.niche-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Score ring animation */
.score-ring__progress {
  animation: drawRing 1.5s ease forwards;
}

@keyframes drawRing {
  from { stroke-dashoffset: 1000; }
}

/* Chart container responsive */
canvas {
  max-width: 100%;
}

/* Progress bar shimmer */
.md-progress__bar {
  position: relative;
  overflow: hidden;
}

.md-progress__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Better chip hover */
.md-chip {
  transition: all 0.15s ease;
}

.md-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Drawer backdrop blur */
.md-drawer-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Bottom nav safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .md-bottom-nav {
    padding-bottom: calc(env(safe-area-inset-bottom) + 4px);
  }
  .md-main {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* Dark mode support (auto) */
@media (prefers-color-scheme: dark) {
  :root {
    --md-primary: #818CF8;
    --md-primary-light: #A5B4FC;
    --md-primary-dark: #6366F1;
    --md-primary-container: #312E81;
    --md-on-primary: #1E1B4B;
    --md-on-primary-container: #E0E7FF;

    --md-secondary: #34D399;
    --md-secondary-light: #6EE7B7;
    --md-secondary-container: #064E3B;
    --md-on-secondary: #022C22;

    --md-surface: #0F0F1A;
    --md-surface-dim: #0A0A14;
    --md-surface-container: #1A1A2E;
    --md-surface-container-low: #151528;
    --md-surface-container-high: #222240;
    --md-surface-variant: #2A2A45;

    --md-on-surface: #E8E8F0;
    --md-on-surface-variant: #A0A0C0;
    --md-outline: #7070A0;
    --md-outline-variant: #353560;
  }
}

/* Print styles */
@media print {
  .md-top-bar,
  .md-bottom-nav,
  .md-drawer,
  .md-drawer-overlay,
  .md-btn--fab,
  .md-snackbar {
    display: none !important;
  }

  .md-main {
    max-width: 100%;
    padding: 0;
  }

  .md-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Selection color */
::selection {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--md-primary);
  outline-offset: 2px;
  border-radius: var(--md-radius-xs);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
