/**
 * maclin - Custom Styles
 * Minimal custom styles that complement Tailwind CSS
 */

/* Smooth transitions for dark mode */
html {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Copy button animation */
.copy-btn {
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Command card hover effect */
.command-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

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

/* Category card hover effect */
.category-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.category-card:hover {
  transform: translateY(-2px);
}

/* Search input focus ring */
#search-input:focus {
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.dark #search-input:focus {
  box-shadow: 0 0 0 3px rgba(252, 198, 36, 0.2);
}

/* Platform filter active state */
.platform-filter.active {
  font-weight: 500;
}

/* Code styling */
.command {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
  word-break: break-all;
}

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

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

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Keyboard shortcuts styling */
kbd {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
  font-size: 0.75rem;
}

/* Mobile menu animation */
#sidebar {
  transition: transform 0.2s ease-out;
}

/* Fade in animation for cards */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.command-card,
.category-card {
  animation: fadeIn 0.3s ease-out;
}

/* Stagger animation for grid items */
.command-card:nth-child(1) { animation-delay: 0.05s; }
.command-card:nth-child(2) { animation-delay: 0.1s; }
.command-card:nth-child(3) { animation-delay: 0.15s; }
.command-card:nth-child(4) { animation-delay: 0.2s; }
.command-card:nth-child(5) { animation-delay: 0.25s; }

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(8px)) {
  .backdrop-blur-sm {
    background-color: rgba(255, 255, 255, 0.95);
  }
  .dark .backdrop-blur-sm {
    background-color: rgba(17, 24, 39, 0.95);
  }
}

/* Print styles */
@media print {
  #sidebar,
  .copy-btn,
  #search-input,
  .platform-filter,
  #dark-mode-toggle,
  #dark-mode-toggle-mobile,
  #mobile-menu-btn {
    display: none !important;
  }

  main {
    margin-left: 0 !important;
  }

  .command-card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
  }
}
