@import "tailwindcss";

/**
 * ThrillWiki Tailwind Input CSS
 *
 * This file imports Tailwind CSS and adds custom component styles.
 * Color definitions are inherited from design-tokens.css.
 * Do NOT define inline colors here - use design token variables instead.
 */

/* Base Component Styles */
.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.2s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

/* Navigation Styles */
.nav-container {
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: var(--color-muted-foreground);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-primary-100);
}

.nav-link i,
.nav-link svg {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
}

@media (max-width: 640px) {
  .nav-link span {
    display: none;
  }
}

/* Form Styles */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background-color: var(--color-background);
  color: var(--color-foreground);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-100);
}

.form-input::placeholder {
  color: var(--color-muted-foreground);
}

/* Dark mode form styles */
.dark .form-input {
  background-color: var(--color-secondary-800);
  border-color: var(--color-secondary-700);
  color: var(--color-foreground);
}

.dark .form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-900);
}

.dark .form-input::placeholder {
  color: var(--color-secondary-500);
}

/* Button Styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary-foreground);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-700));
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-foreground);
  background-color: var(--color-background);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--color-secondary-100);
  border-color: var(--color-secondary-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Dark mode button styles */
.dark .btn-secondary {
  border-color: var(--color-secondary-700);
  color: var(--color-secondary-100);
  background-color: var(--color-secondary-800);
}

.dark .btn-secondary:hover {
  background-color: var(--color-secondary-700);
  border-color: var(--color-secondary-600);
}

/* Menu Styles */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-foreground);
  background: none;
  border: none;
  text-align: left;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.menu-item:hover {
  background-color: var(--color-secondary-100);
  color: var(--color-primary);
}

.menu-item i,
.menu-item svg {
  width: 1.25rem;
  text-align: center;
}

/* Dark mode menu styles */
.dark .menu-item {
  color: var(--color-secondary-100);
}

.dark .menu-item:hover {
  background-color: var(--color-secondary-700);
  color: var(--color-primary);
}

/* Theme Toggle Styles */
.theme-toggle-btn {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--color-primary-100);
}

.dark .theme-toggle-btn:hover {
  background-color: var(--color-primary-900);
}

/* Mobile Menu Styles */
#mobileMenu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  margin-top: 1rem;
}

#mobileMenu.show {
  display: block;
}

.dark #mobileMenu {
  border-top-color: var(--color-secondary-700);
}

/* Grid Adaptive Styles */
.grid-adaptive-sm {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-adaptive {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@media (min-width: 768px) {
  .grid-adaptive {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid-adaptive {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card Styles */
.card {
  background: var(--color-card);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.dark .card {
  background: var(--color-card);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dark .card:hover {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4);
}

/* Alert Styles - Using design tokens */
.alert {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  animation: slideInRight 0.3s ease-out;
}

.alert-success {
  background-color: var(--color-success-500);
  color: white;
}

.alert-error {
  background-color: var(--color-error-500);
  color: white;
}

.alert-info {
  background-color: var(--color-info-500);
  color: white;
}

.alert-warning {
  background-color: var(--color-warning-500);
  color: white;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-secondary-200);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-700));
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-accent-700));
}

/* Responsive Utilities */
@media (max-width: 1023px) {
  .lg\:hidden {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex !important;
  }

  .lg\:hidden {
    display: none !important;
  }
}

/* Focus States */
.focus-ring {
  transition: all 0.2s ease;
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-200);
}

.dark .focus-ring:focus {
  box-shadow: 0 0 0 3px var(--color-primary-800);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
