/* ============================================
   魔翼MOD社区 - Custom Styles
   ============================================ */

/* Base */
* {
  scrollbar-width: thin;
  scrollbar-color: #4d4d85 #0f0f2e;
}

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

*::-webkit-scrollbar-track {
  background: #0f0f2e;
}

*::-webkit-scrollbar-thumb {
  background: #4d4d85;
  border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #6b21a8;
}

body {
  font-family: 'Noto Sans SC', 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, #080816 0%, #0f0f2e 5%, #0f0f2e 100%);
  background-attachment: fixed;
}

/* Navigation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, #00d4ff);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Card Hover Effects */
.mod-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.mod-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(168,85,247,0), rgba(0,212,255,0));
  -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;
  transition: background 0.3s ease;
}

.mod-card:hover::before {
  background: linear-gradient(135deg, rgba(168,85,247,0.5), rgba(0,212,255,0.3));
}

.mod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.1);
}

/* Image Cover */
.mod-cover {
  position: relative;
  overflow: hidden;
}

.mod-cover img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mod-card:hover .mod-cover img {
  transform: scale(1.05);
}

.mod-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,10,28,0.8) 100%);
  pointer-events: none;
}

/* Tag Styles */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.2);
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.4);
}

.tag-cyan {
  background: rgba(0, 212, 255, 0.1);
  color: #67e8f9;
  border-color: rgba(0, 212, 255, 0.2);
}

/* Category Filter Bar */
.category-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.category-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.category-btn.active {
  background: linear-gradient(135deg, #7e22ce, #6b21a8);
  color: white;
  border-color: #9333ea;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* Search Input */
.search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: #e5e7eb;
  transition: all 0.2s ease;
  width: 100%;
}

.search-input:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
  color: #6b7280;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: white;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
}

/* Download Button */
.btn-download {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.btn-download:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
  transform: translateY(-2px);
}

/* Form Inputs */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #e5e7eb;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

/* Toast Notifications */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(8px);
  animation: slideInRight 0.3s ease-out;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.toast-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.toast-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.toast-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
}

.pagination button {
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.2);
}

.pagination button.active {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
  color: white;
  border-color: #9333ea;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* Sort Buttons */
.sort-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 0.5rem;
  color: #9ca3af;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.05);
}

.sort-btn.active {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0f0f2e 0%, #1a0a2e 30%, #0f1a2e 70%, #0f0f2e 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Detail Page */
.detail-gallery {
  display: flex;
  overflow-x: auto;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.detail-gallery::-webkit-scrollbar {
  display: none;
}

.detail-gallery img {
  scroll-snap-align: start;
  flex-shrink: 0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.detail-gallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Admin Panel */
.admin-sidebar {
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.admin-tab:hover {
  background: rgba(168, 85, 247, 0.05);
  color: #d1d5db;
}

.admin-tab.active {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-left: 3px solid #9333ea;
}

/* Stats Card */
.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: rgba(168, 85, 247, 0.2);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.05);
}

/* Image Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .mod-card:hover {
    transform: none;
  }
  
  .hero-section {
    padding: 2rem 1rem;
  }
}

/* Fade transitions */
.page-enter {
  animation: fadeIn 0.3s ease-out;
}

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

/* Featured badge */
.featured-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* File upload area */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-area:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.05);
}

.upload-area.dragover {
  border-color: #9333ea;
  background: rgba(168, 85, 247, 0.1);
}

/* Game Select */
.game-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 2rem 0.75rem 1rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
  min-width: 120px;
}

.game-select:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.game-select option {
  background: #1a1a3e;
  color: #e5e7eb;
}

/* Tool Card (for publish/steam-repair pages) */
.tool-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.tool-card:hover {
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.08);
  transform: translateY(-2px);
}

/* Feature list */
.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.6;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}

/* Feedback form */
.feedback-type-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-type-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.3);
}

.feedback-type-btn.active {
  background: linear-gradient(135deg, #7e22ce, #6b21a8);
  color: white;
  border-color: #9333ea;
}
