/* AI-Vision Modern Light Theme Stylesheet */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-light: #E2E8F0;
  --border-subtle: #F1F5F9;
  --brand-primary: #2563EB;
  --brand-hover: #1D4ED8;
  --brand-ph: #FF6154;
  --brand-ph-hover: #EA5346;
  --accent-purple: #7C3AED;
  --accent-purple-light: #F5F3FF;
  --accent-emerald: #10B981;
  --accent-emerald-light: #ECFDF5;
  --accent-amber: #F59E0B;
  --accent-amber-light: #FFFBEB;
  --accent-rose: #EF4444;
  --accent-rose-light: #FEF2F2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

input, select, textarea, button {
  font-family: inherit;
  box-sizing: border-box;
}

/* Header */
.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}
.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.brand-logo .logo-tld {
  color: var(--brand-ph);
  font-size: 14px;
  margin-left: 1px;
}

.header-search {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  font-size: 14px;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.header-search input:focus {
  background: #FFF;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Mobile search bar (hidden by default on desktop) */
.mobile-search-bar {
  display: none;
  padding: 8px 16px;
  position: relative;
  background: #FFF;
  border-top: 1px solid var(--border-subtle);
}
.mobile-search-bar input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  font-size: 13px;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  background: var(--bg-secondary);
  outline: none;
}
.mobile-search-bar .search-icon {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.queue-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F1F5F9;
  color: #475569;
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.queue-pill:hover {
  background: #E2E8F0;
}
.queue-pill .pulse-dot {
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
}

.btn-submit-header {
  background: var(--brand-ph);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-submit-header:hover {
  background: var(--brand-ph-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 97, 84, 0.25);
}

/* Layout */
.main-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  width: 100%;
}

/* Hero Section */
.hero-banner {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.hero-content {
  max-width: 700px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #0F172A;
}
.hero-title span {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.hero-stats {
  display: flex;
  gap: 24px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  flex-wrap: wrap;
}
.stat-item .stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.stat-item .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.btn-hero-primary {
  background: #0F172A;
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  text-align: center;
}
.btn-hero-primary:hover {
  background: #1E293B;
  transform: translateY(-1px);
}
.hero-cta-sub {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
}

/* Category Filter Tabs */
.categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar {
  display: none;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.cat-pill:hover {
  border-color: #CBD5E1;
  color: var(--text-primary);
  background: #F8FAFC;
}
.cat-pill.active {
  background: #0F172A;
  color: #FFF;
  border-color: #0F172A;
  font-weight: 600;
}

/* Content Grid: Main feed (70%) + Sidebar (30%) */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* Feed Column */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.feed-tabs {
  display: flex;
  gap: 4px;
  background: #FFF;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.feed-tab:hover {
  color: var(--text-primary);
}
.feed-tab.active {
  background: #F1F5F9;
  color: var(--text-primary);
}

/* Tools List Cards */
.tools-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tool-card {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  min-width: 0;
}
.tool-card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.tool-card.priority-highlight {
  border-left: 4px solid var(--accent-purple);
}

.tool-rank {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.tool-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.tool-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tool-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.tool-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.tool-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.tool-name:hover {
  color: var(--brand-primary);
}
.badge-priority {
  background: linear-gradient(135deg, #7C3AED 0%, #6366F1 100%);
  color: #FFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.badge-verified {
  background: var(--accent-emerald-light);
  color: #065F46;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #A7F3D0;
  white-space: nowrap;
}
.badge-geo-score {
  background: #EFF6FF;
  color: #1E40AF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid #BFDBFE;
  white-space: nowrap;
}

.tool-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  word-break: break-word;
}

.tool-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.meta-cat-pill {
  background: #F1F5F9;
  color: var(--text-secondary);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}
.meta-pricing {
  color: #64748B;
  font-weight: 500;
}

/* Upvote Button */
.upvote-btn {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 52px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
}
.upvote-btn:hover {
  border-color: var(--brand-ph);
  background: #FFF5F5;
}
.upvote-btn.voted {
  border-color: var(--brand-ph);
  background: var(--brand-ph);
  color: #FFF !important;
}
.upvote-btn .up-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #475569;
  margin-bottom: 3px;
  transition: border-bottom-color 0.2s;
}
.upvote-btn:hover .up-arrow {
  border-bottom-color: var(--brand-ph);
}
.upvote-btn.voted .up-arrow {
  border-bottom-color: #FFF !important;
}
.upvote-btn .vote-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.upvote-btn.voted .vote-count {
  color: #FFF !important;
}

/* Sidebar Widgets */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.promo-card {
  background: #FFF;
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4F46E5 0%, #7C3AED 100%);
}
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EEF2FF;
  color: #4338CA;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.promo-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 8px;
  line-height: 1.3;
}
.promo-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}
.promo-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #334155;
}
.promo-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.promo-points li svg {
  color: #10B981;
  flex-shrink: 0;
}
.btn-promo-submit {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFF;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
}
.btn-promo-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

/* Spider Status Widget */
.widget-box {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
}
.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.spider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.spider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.spider-row:last-child {
  border-bottom: none;
}
.spider-name {
  font-weight: 600;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  font-size: 11px;
}

/* Floating Activity Toast */
.activity-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  z-index: 80;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.activity-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast-icon {
  width: 32px;
  height: 32px;
  background: #EFF6FF;
  color: var(--brand-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.toast-body {
  font-size: 12px;
  color: var(--text-secondary);
}
.toast-body strong {
  color: var(--text-primary);
}
.toast-time {
  font-size: 10px;
  color: var(--text-muted);
}

/* Auth Modal Styles (Strictly bounded so it never overflows) */
.auth-modal-dialog {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-light);
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.auth-tab-btn.active {
  background: #FFF !important;
  color: #0F172A !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@keyframes modal-pop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ==================================================== */
/* RESPONSIVE & MOBILE FIXES                            */
/* ==================================================== */

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  .hero-cta {
    align-items: flex-start;
    width: 100%;
  }
  .btn-hero-primary {
    width: 100%;
  }
  .hero-cta-sub {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 8px 12px;
    gap: 8px;
  }
  .header-search {
    display: none;
  }
  .mobile-search-bar {
    display: block;
  }
  .brand-logo .brand-name {
    font-size: 16px;
  }
  .brand-logo .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .queue-pill {
    padding: 4px 8px;
    font-size: 11px;
  }
  .btn-submit-header {
    padding: 6px 12px;
    font-size: 12px;
  }
  .auth-btn-label {
    display: none;
  }
  .btn-sign-in {
    padding: 6px 9px !important;
  }
  .main-wrapper {
    padding: 14px 12px 40px 12px;
  }
  .hero-title {
    font-size: 24px;
    letter-spacing: -0.5px;
  }
  .hero-subtitle {
    font-size: 13px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
  }
  .tool-card {
    padding: 12px;
    gap: 10px;
  }
  .tool-rank {
    font-size: 12px;
    min-width: 16px;
  }
  .tool-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .tool-logo img {
    width: 24px;
    height: 24px;
  }
  .tool-name {
    font-size: 14px;
  }
  .tool-tagline {
    font-size: 12px;
  }
  .upvote-btn {
    min-width: 48px;
    min-height: 46px;
    padding: 6px 8px;
  }
  .activity-toast {
    bottom: 20px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 20px;
  }
  .hero-banner {
    padding: 16px 14px;
  }
  .feed-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .feed-tabs {
    width: 100%;
  }
  .auth-modal-dialog {
    max-width: 100%;
    margin: 0 4px;
  }
}

/* ==================================================== */
/* TOOL DETAIL PAGE RESPONSIVE STYLES                   */
/* ==================================================== */

.tool-detail-main {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.tool-breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  word-break: break-word;
}

.tool-under-review-banner {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
  box-sizing: border-box;
  width: 100%;
}

.tool-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 620px;
  flex: 1;
  min-width: 0;
}

.tool-banner-action {
  flex-shrink: 0;
}

.btn-tool-accelerate {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFF !important;
  font-weight: 800;
  font-size: 13px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  box-sizing: border-box;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-tool-accelerate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45);
}

.tool-header-card {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  box-sizing: border-box;
  width: 100%;
}

.tool-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
  width: 100%;
}

.tool-main-info {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.tool-detail-logo-box {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.tool-detail-name {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.5px;
  word-break: break-word;
  line-height: 1.2;
}

.tool-detail-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
  word-break: break-word;
}

.tool-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.tool-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-visit-site {
  background: #0F172A;
  color: #FFF !important;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  box-sizing: border-box;
  text-decoration: none;
  white-space: nowrap;
}

.btn-visit-site:hover {
  background: #1E293B;
}

.tool-detail-upvote {
  min-width: 68px;
  padding: 10px 14px;
}

.tool-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.tool-left-column {
  min-width: 0;
  width: 100%;
}

.tool-right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
}

.tool-card-box {
  background: #FFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  width: 100%;
}

.jsonld-snippet-box {
  background: #1E293B;
  border-radius: var(--radius-md);
  padding: 16px;
  color: #E2E8F0;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

@media (max-width: 840px) {
  .tool-content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .tool-under-review-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }
  .tool-banner-content {
    max-width: 100%;
  }
  .tool-banner-action {
    width: 100%;
  }
  .btn-tool-accelerate {
    width: 100%;
    text-align: center;
    white-space: normal;
  }
  .tool-header-card {
    padding: 18px 16px;
    margin-bottom: 20px;
  }
  .tool-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .tool-main-info {
    flex-direction: row;
    gap: 14px;
  }
  .tool-detail-logo-box {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }
  .tool-detail-logo-box img {
    width: 36px;
    height: 36px;
  }
  .tool-detail-name {
    font-size: 20px;
  }
  .tool-detail-tagline {
    font-size: 14px;
  }
  .tool-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .btn-visit-site {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }
  .tool-card-box {
    padding: 18px 16px;
    margin-bottom: 18px;
  }
}

@media (max-width: 480px) {
  .tool-main-info {
    flex-direction: column;
    align-items: flex-start;
  }
  .tool-header-actions {
    grid-template-columns: 1fr;
  }
  .tool-header-actions button {
    width: 100%;
  }
  .btn-tool-accelerate {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* ==================================================== */
/* INTERACTIVE TAG SELECTOR COMPONENT                   */
/* ==================================================== */

.tag-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.tag-pill-btn:hover {
  border-color: #94A3B8;
  background: #F1F5F9;
  color: #0F172A;
}
.tag-pill-btn.active {
  background: #4F46E5 !important;
  border-color: #4F46E5 !important;
  color: #FFFFFF !important;
  font-weight: 700;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #4338CA;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  animation: tag-pop 0.15s ease;
}
.tag-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: #6366F1;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
}
.tag-chip button:hover {
  color: #DC2626;
}
@keyframes tag-pop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
