:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
  /* Status Colors */
  --status-ended: rgba(180, 180, 180, 0.15);
  --status-pending: rgba(220, 38, 38, 0.15);
  --status-active: rgba(59, 130, 246, 0.15);
}

/* ===========================
   Utility: Shadow
   =========================== */
.shadow {
  box-shadow: var(--shadow-md);
}

.shadow-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}
a{
  text-shadow: none;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.header-simple {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.625rem 0;
}

.header-simple .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-simple .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.header-simple .logo-icon {
  width: 28px;
  height: 28px;
  background: transparent;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-simple .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-simple .logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-simple .header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: left;
}

.header-simple .header-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header-simple .header-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.header-simple .header-nav a.active {
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

.header-simple .header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-simple .header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.header-simple .header-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.header-simple .header-link svg {
  width: 1rem;
  height: 1rem;
}

/* ===== Header 搜索框样式 ===== */
.header-search-wrapper {
  position: relative;
  flex-shrink: 0;
}

.header-search-input {
  width: 200px;
  height: 36px;
  padding: 0 1rem 0 2.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition-fast);
}

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

.header-search-input:focus {
  width: 280px;
  border-color: var(--primary-color);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.header-search-wrapper::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  pointer-events: none;
}

/* 下拉容器样式 */
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: none;
}

@media (max-width: 768px) {
  .header-search-input {
    width: 140px;
  }
  .header-search-input:focus {
    width: 180px;
  }
  .header-search-dropdown {
    width: 300px;
    right: -20px;
  }
}

/* ===== 暗色主题下拉适配 ===== */
@media (prefers-color-scheme: dark) {
  .header-search-dropdown.rfj-search-dropdown {
    --rfj-sd-bg: #1e293b;
    --rfj-sd-border: #334155;
    --rfj-sd-text: #f1f5f9;
    --rfj-sd-text-muted: #94a3b8;
    --rfj-sd-header-bg: #0f172a;
    --rfj-sd-item-hover: #334155;
  }
}

/* ===== 通用搜索框样式 ===== */
.search-wrapper {
  max-width: 600px;
  margin: 1.5rem auto 0;
}

.search-wrapper .search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 0.375rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.search-wrapper .search-box .search-icon {
  position: static;
  transform: none;
  flex-shrink: 0;
  margin-left: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrapper .search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-wrapper .search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

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

.search-wrapper .search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gradient-1);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.search-wrapper .search-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.search-wrapper .search-btn svg {
  width: 20px;
  height: 20px;
}

 .help-text {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.help-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.help-text a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .search-wrapper {
    margin: 1rem auto 0;
  }

  .search-wrapper .search-input {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  .search-wrapper .search-btn {
    width: 44px;
    height: 44px;
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.header-back:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.header-back svg {
  width: 20px;
  height: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.logo-icon-transparent {
  background: transparent;
}

.logo-icon-transparent img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-container {
  flex: 1;
  max-width: 500px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-normal);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero {
  padding: 2.5rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
}


/* Shared hero layout used by multiple pages */
.post-hero,
.categories-hero,
.company-hero {
  padding: 3rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.post-hero::before,
.categories-hero::before,
.company-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.post-hero-title,
.categories-hero-title,
.company-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.post-hero-subtitle,
.categories-hero-subtitle,
.company-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-banner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.hero-tag:hover,
.hero-tag.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.categories-nav {
  position: sticky;
  top: 50px;
  z-index: 50;
  padding: 1rem 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.categories-list {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.category-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.category-btn.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-glow);
}

.category-btn .icon {
  font-size: 1.1rem;
}

.category-btn .count {
  padding: 0.125rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.main-content {
  padding-bottom: 4rem;
}

.section {
  margin-bottom: 3rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-title .icon {
  font-size: 1.75rem;
}

.section-count {
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  opacity: 0.7;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
}

.ranking-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.ranking-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.ranking-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.ranking-card:hover::before {
  opacity: 1;
}

.ranking-card-image {
  width: 130px;
  min-height: 110px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 12px;
  border-radius: var(--radius-lg);
}

.ranking-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
  border-radius: var(--radius-lg);
}

.ranking-card:hover .ranking-card-image img {
  transform: scale(1.05);
}

.ranking-card-content {
  flex: 1;
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.ranking-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.ranking-card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ranking-card-date svg {
  width: 12px;
  height: 12px;
}

.ranking-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Shared card shell & hover, using tool-card as canonical style */
:where(.tool-card,
       .card-surface,
       .ranking-card,
       .category-card,
       .categories-nav-card,
       .company-card,
       .simple-card,
       .reseller-card,
       .post-card,
       .case-card,
       .guides-card,
       .video-card,
       .advisor-card,
       .ai-nav-tool-card,
       .featured-post-card,
       .event_card) {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

:where(.tool-card,
       .card-surface,
       .ranking-card,
       .category-card,
       .categories-nav-card,
       .company-card,
       .simple-card,
       .reseller-card,
       .post-card,
       .case-card,
       .guides-card,
       .video-card,
       .advisor-card,
       .ai-nav-tool-card,
       .featured-post-card,
       .event_card):hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.ai-tool-card{
  padding: 1.5rem;
}
.tool-card {
  cursor: pointer;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card.hot::after {
  content: 'HOT';
  position: absolute;
  top: 1rem;
  right: -2rem;
  padding: 0.25rem 2.5rem;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transform: rotate(45deg);
}

.tool-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tool-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  background: white;
  padding: 4px;
  flex-shrink: 0;
}

.tool-logo-transparent {
  background: transparent;
  padding: 0;
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-pricing {
  padding: 0.125rem 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--primary-color);
  font-weight: 500;
}

.tool-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  padding: 0.25rem 0.625rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tool-card:hover .tool-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
}

.tool-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
}

.footer-text {
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-color);
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.1s;
  opacity: 0;
}

.fade-in-delay-2 {
  animation-delay: 0.2s;
  opacity: 0;
}

.fade-in-delay-3 {
  animation-delay: 0.3s;
  opacity: 0;
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }

  .header-simple .header-nav {
    display: none;
  }

  .header-simple .header-content {
    gap: 0.5rem;
  }

  .header-simple .logo-text {
    font-size: 1rem;
  }

  .header-simple .header-link span {
    display: none;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .header-back {
    display: none;
  }

  .header-stats {
    display: none;
  }

  .hero {
    padding: 2rem 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-banner {
    margin: 1.5rem auto 0;
    border-radius: var(--radius-lg);
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card-image {
    width: 90px;
    min-height: 90px;
    margin: 10px;
  }

  .ranking-card-content {
    padding: 10px 10px 10px 0;
  }

  .ranking-card-title {
    font-size: 1rem;
  }

  .ranking-card-desc {
    font-size: 0.9rem;
  }

  .categories-list {
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .tool-header {
    gap: 0.75rem;
  }

  .tool-logo {
    width: 40px;
    height: 40px;
  }

  .tool-name {
    font-size: 1rem;
  }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

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

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: white;
}

.rfj-operator-tools {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  transition: all var(--transition-normal);
  display: none;
}

.rfj-operator-tools.visible {
  display: block;
}

.rfj-operator-tools.dragging {
  cursor: move;
  opacity: 0.8;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rfj-operator-tools .rfj-drag-handle {
  cursor: move;
  padding: 0.5rem;
  margin: -0.5rem -0.5rem 0.5rem -0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.rfj-operator-tools .rfj-drag-handle i {
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.rfj-operator-tools .rfj-drag-handle span {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.rfj-operator-tools .rfj-show-tools-btn,
.rfj-operator-tools .rfj-close-tools-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.rfj-operator-tools .rfj-show-tools-btn:hover,
.rfj-operator-tools .rfj-close-tools-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.rfj-operator-tools .rfj-show-tools-btn i,
.rfj-operator-tools .rfj-close-tools-btn i {
  font-size: 0.875rem;
}

.ranking-card:hover .rfj-operator-tools {
  border-top-color: var(--primary-color);
}

@media (max-width: 768px) {
  .rfj-operator-tools {
    bottom: 100px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }
}

.operator-panel-container {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
}

.operator-panel-container a {
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.operator-panel-container a:hover {
  color: var(--primary-hover) !important;
  text-decoration: underline;
}

.operator-panel-container .btn {
  color: var(--text-primary) !important;
  text-decoration: none;
}

.operator-panel-container .btn:hover {
  text-decoration: none;
}

.operator-panel-container .rfj-close-tools-btn {
  color: var(--text-secondary) !important;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.operator-panel-container .rfj-close-tools-btn:hover {
  color: var(--text-primary) !important;
}

.operator-panel-container i {
  color: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  margin: 0.25rem;
  justify-content: center;
}

.btn-primary {
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
}

.btn-default {
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.btn-default:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}

.btn-success {
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  color: white;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-inquiry {
  color: white;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  border-color: #f59e0b;
}

.btn-inquiry:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.btn-xs {
  color: var(--bg-primary);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
}

.btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-info {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  border-color: #06b6d4;
}

.btn-info:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-outline-primary {
  color: var(--primary-color);
  background: transparent;
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.btn-outline-secondary:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-color: var(--text-secondary);
}

.btn-outline-success {
  color: #10b981;
  background: transparent;
  border-color: #10b981;
}

.btn-outline-success:hover {
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-outline-danger {
  color: #ef4444;
  background: transparent;
  border-color: #ef4444;
}

.btn-outline-danger:hover {
  color: white;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: #ef4444;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-xs {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.text-success {
  color: #10b981;
}

.text-danger {
  color: #ef4444;
}

.text-warning {
  color: #f59e0b;
}

.text-info {
  color: #06b6d4;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }

.mx-0 { margin-left: 0; margin-right: 0; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-3 { padding-right: 0.75rem; }
.pr-4 { padding-right: 1rem; }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.align-items-baseline { align-items: baseline; }
.align-items-stretch { align-items: stretch; }

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-primary {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.badge-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border-color: #10b981;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: #ef4444;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border-color: #f59e0b;
}

.badge-info {
  background: rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  border-color: #06b6d4;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

strong {
  font-weight: 600;
  color: var(--text-primary);
}

.pretty-tabs {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.pretty-tabs > li {
  flex: 1;
}

.pretty-tabs > li > a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 70px;
  font-size: 20px;
  font-weight: 400;
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.pretty-tabs > li > a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pretty-tabs > li.active > a,
.pretty-tabs > li.active > a:hover {
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
  font-weight: 400;
}

.pretty-tabs > li.active > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  margin-left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--primary-color);
}

.pretty-tabs i {
  font-size: 32px;
  opacity: 0.7;
}

.pretty-tabs > li.active > a i {
  opacity: 1;
}

@media (max-width: 768px) {
  .pretty-tabs > li > a {
    height: 70px;
    font-size: 18px;
  }
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.vendor_warp {
  transition: all var(--transition-normal);
}

.vendor_warp.hidden {
  display: none;
}

.badge-cat {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.badge-cat:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  color: var(--text-primary);
}

.badge-cat.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-primary);
  border-color: var(--primary-color);
}

#location_filter {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}

#location_filter > div {
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

#location_filter li {
  display: inline-block;
  margin: 0.25rem;
}

.location_child {
  display: none;
}

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

.text-blue:hover {
  color: var(--primary-hover);
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

.select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 48px;
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.select2-container--default .select2-selection--single:hover {
  border-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px;
  padding-left: 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 1rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: var(--primary-color) transparent transparent transparent;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent var(--primary-color) transparent;
}

.select2-dropdown {
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  margin-top: 0.5rem;
  box-shadow: var(--shadow-xl);
}

.select2-results__option {
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--bg-card-hover);
  color: var(--primary-color);
}

.select2-container--default .select2-results__option--selected[aria-selected=true] {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.select2-search--dropdown {
  padding: 0.75rem;
}

.select2-search--dropdown .select2-search__field {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}

.select2-search--dropdown .select2-search__field:focus {
  outline: none;
  border-color: var(--primary-color);
}

.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 1rem;
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-select-selection:hover {
  border-color: var(--primary-hover);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.custom-select-rendered {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-rendered:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.custom-select-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  transition: transform var(--transition-fast);
}

.custom-select-arrow.open {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: none;
  max-height: 400px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.custom-select-dropdown.open {
  display: flex;
}

.custom-select-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-select-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.custom-select-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-card);
}

.custom-select-search-input::placeholder {
  color: var(--text-muted);
}

.custom-select-results {
  max-height: 300px;
  overflow-y: auto;
}

.custom-select-option {
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-select-option:hover {
  background: var(--bg-card-hover);
  color: var(--primary-color);
}

.custom-select-option img {
  max-width: 60px;
  max-height: 20px;
  object-fit: contain;
}

.custom-select-message {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.custom-select-error {
  color: #ef4444;
}

.custom-select-loading {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.custom-select-loading .loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.simple-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.simple-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.simple-card-link{
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
  align-items: center;
  justify-content: center;
}

.simple-card-logo{
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.simple-card-logo img{
  max-width: 150px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-normal);
  background-color: #fff;
  border-radius: 6px;
  padding: 5px;
}

.simple-card:hover .simple-card-logo img{
  transform: scale(1.05);
}

.simple-card-title{
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

@media (max-width: 1200px) {
  .simple-card {
    min-height: 160px;
  }
  
  .simple-card-logo {
    height: 70px;
  }
  
  .simple-card-logo img {
    max-width: 130px;
    max-height: 55px;
  }
}

@media (max-width: 992px) {
  .simple-card {
    min-height: 150px;
  }
  
  .simple-card-link {
    padding: 1rem;
  }
  
  .simple-card-logo {
    height: 60px;
    margin-bottom: 0.75rem;
  }
  
  .simple-card-logo img {
    max-width: 120px;
    max-height: 50px;
  }
  
  .simple-card-title {
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .simple-card {
    min-height: auto;
  }
  
  .simple-card-link {
    padding: 1rem;
  }
  
  .simple-card-logo {
    height: 70px;
  }
  
  .simple-card-logo img {
    max-width: 140px;
    max-height: 55px;
  }
  
  .simple-card-title {
    font-size: 0.9rem;
  }
}

.reseller-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.reseller-card * {
  max-width: 100%;
}

.reseller-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.reseller-card-link{
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}

.reseller-card-logo{
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.reseller-card-logo img{
  max-width: 150px;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition-normal);
  background-color: #fff;
  border-radius: 6px;
  padding: 5px;
}

.reseller-card:hover .reseller-card-logo img{
  transform: scale(1.05);
}

.reseller-card-title{
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reseller-card-meta{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.reseller-level{
  font-size: 0.75rem;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.reseller-badge{
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.reseller-badge-agency{
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.reseller-badge-direct{
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.reseller-badge-manufacturer{
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.reseller-card-manufacturer{
  border-color: #f59e0b;
  background: #fffbf5;
}

.reseller-card-manufacturer .reseller-card-logo{
  background: #fef3e2;
}

.reseller-card-status-verified{
  color: #10b981;
  font-weight: 500;
}

.reseller-card-location{
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 0.5rem;
  position: relative;
}

.reseller-card-location[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  white-space: normal;
  max-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.reseller-card-location i{
  font-size: 0.875rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.reseller-card-status{
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reseller-card-status-expired{
  color: #f59e0b;
  font-weight: 500;
}

.reseller-card-status-pending{
  color: var(--primary-color);
  font-weight: 500;
}

.reseller-card-verified{
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 50px;
  height: auto;
  z-index: 2;
}

.reseller-card-verified img{
  width: 100%;
  height: auto;
}

.reseller-card-actions{
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  padding-top: 0;
  margin-top: auto;
}

.reseller-card-actions .btn{
  flex: 1;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  justify-content: center;
}

.reseller-card-active{
  border-color: #10b981;
  background: #f0fdf4;
}

.reseller-card-active:hover{
  border-color: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.reseller-card-expired{
  border-color: #f59e0b;
  background: #fffbf5;
}

.reseller-card-expired:hover{
  opacity: 1;
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

@media (max-width: 1200px) {
  .reseller-card {
    min-height: 260px;
  }
  
  .reseller-card-logo {
    height: 70px;
  }
  
  .reseller-card-logo img {
    max-width: 130px;
    max-height: 55px;
  }
}

@media (max-width: 992px) {
  .reseller-card {
    min-height: 240px;
  }
  
  .reseller-card-link {
    padding: 1rem;
  }
  
  .reseller-card-logo {
    height: 60px;
    margin-bottom: 0.75rem;
  }
  
  .reseller-card-logo img {
    max-width: 120px;
    max-height: 50px;
  }
  
  .reseller-card-title {
    font-size: 0.875rem;
  }
  
  .reseller-card-actions {
    padding: 0.75rem;
    flex-direction: column;
  }
  
  .reseller-card-actions .btn {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .reseller-card {
    min-height: auto;
    margin-bottom: 0;
  }
  
  .reseller-card-link {
    padding: 1rem;
  }
  
  .reseller-card-logo {
    height: 70px;
  }
  
  .reseller-card-logo img {
    max-width: 140px;
    max-height: 55px;
  }
  
  .reseller-card-title {
    font-size: 0.9rem;
  }
  
  .reseller-card-actions {
    flex-direction: row;
    padding: 0.75rem 1rem 1rem;
  }
  
  .reseller-card-actions .btn {
    font-size: 0.75rem;
  }
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
}

.alert-info {
  color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-info i {
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.alert-info a {
  color: var(--primary-color);
  font-weight: 500;
}

.alert-info a:hover {
  text-decoration: underline;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-title-row .page-title {
  margin-bottom: 0;
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.help-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.content-section {
  margin-bottom: 2rem;
}

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

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

.text-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.row-cols-1 {
  grid-template-columns: 1fr;
}

.row-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.row-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.row-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.row-cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.row-cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.col > * {
  flex: 1;
}

@media (max-width: 1200px) {
  .row {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .row-cols-4,
  .row-cols-5,
  .row-cols-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .container {
    padding: 0 1rem;
  }
  
  .row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .row-cols-3,
  .row-cols-4,
  .row-cols-5,
  .row-cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .row-cols-2,
  .row-cols-3,
  .row-cols-4,
  .row-cols-5,
  .row-cols-6 {
    grid-template-columns: 1fr;
  }
}

.resellers-page {
  min-height: 100vh;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header .banner {
  margin-bottom: 1rem;
}

.page-header .pretty-tabs {
  margin-bottom: 1rem;
}

.page-header #search_form {
  margin-bottom: 1rem;
}

.page-content {
  min-height: 400px;
}

.location-filter {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.location-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.location-filter-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-filter-title i {
  color: var(--primary-color);
}

.location-filter-reset {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.location-filter-reset:hover {
  color: var(--primary-color);
}

.filter-level {
  margin-bottom: 1rem;
}

.filter-level:last-child {
  margin-bottom: 0;
}

.filter-level-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  user-select: none;
}

.filter-tag:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.filter-tag.active {
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.filter-tag.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.filter-tag-icon {
  margin-right: 0.375rem;
  font-size: 0.75rem;
}

.filter-tag-count {
  margin-left: 0.375rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
}

.filter-tag.active .filter-tag-count {
  background: rgba(255, 255, 255, 0.25);
}

.filter-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1rem 0;
}

.filter-children {
  display: none;
  animation: fadeIn 0.3s ease;
}

.filter-children.visible {
  display: block;
}

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

@media (max-width: 768px) {
  .location-filter {
    padding: 1rem;
  }
  
  .location-filter-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .filter-tag {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .filter-tags {
    gap: 0.375rem;
  }
}

.banner {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
}

.company-info {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}


.load-more-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.load-more-btn:active {
  transform: translateY(-1px);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}


.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results-text {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
