/*
 * Trading Bot List - Clean Fintech Design
 */

/* ========== Variables ========== */
:root {
  --bg-primary: #f8f9fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0f2f5;
  --text-primary: #0f1419;
  --text-secondary: #536471;
  --text-muted: #8b98a5;
  --border: #e1e5ea;
  --border-hover: #cfd5dc;
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --accent-bg: rgba(0, 102, 255, 0.08);
  --success: #00c853;
  --success-bg: rgba(0, 200, 83, 0.12);
  --warning: #ff9500;
  --danger: #ff3b30;
  --purple: #7c3aed;
  --purple-bg: rgba(124, 58, 237, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0b0f;
    --bg-secondary: #12141a;
    --bg-tertiary: #1a1d24;
    --text-primary: #f0f2f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #252830;
    --border-hover: #363a45;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-bg: rgba(59, 130, 246, 0.12);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --purple: #a78bfa;
    --purple-bg: rgba(167, 139, 250, 0.12);
  }
}

/* ========== Reset ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ========== Layout ========== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Site Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 0.25rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
}

nav a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* ========== Main ========== */
main {
  flex: 1;
  width: 100%;
  padding: 0 0 6rem;
}

/* ========== Homepage Hero ========== */
.hero {
  padding: 2rem 0 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* ========== Market Type Cards ========== */
.markets {
  margin-bottom: 3rem;
}

.markets > h2,
.categories > h2,
.recent > h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.market-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.75rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.market-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}

.market-card .market-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.market-card .count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========== Homepage Recent ========== */
.recent {
  margin-bottom: 2rem;
}

.view-all {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.625rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.15s;
}

.view-all:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== Taxonomy List Page ========== */
.taxonomy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.taxonomy-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.taxonomy-header p,
.taxonomy-header .header-desc p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.bot-card-header h2,
.bot-card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 !important;
}

.bot-card-header h2 a,
.bot-card-header h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.bot-card-header h2 a:hover,
.bot-card-header h3 a:hover {
  color: var(--accent);
}

.bot-card-logo {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tag-market {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== Platform Grid ========== */
.platform-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.platform-card {
  display: inline-flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.platform-card:hover {
  border-color: var(--accent);
}

.platform-card .platform-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ========== Market Term Page ========== */
.market-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.market-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.market-header .market-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

.market-header .market-count {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.market-content {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

/* ========== Bot Cards (List) ========== */
.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.bot-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.bot-card:hover {
  border-color: var(--accent);
}

.bot-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.bot-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.bot-card .description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.bot-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag-meta-more {
  color: var(--text-muted);
  border-style: dashed;
}

/* ================================================
   SINGLE BOT PAGE
   ================================================ */

.bot-single {
  max-width: 100%;
}

/* --- Header --- */
.bot-single > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.bot-single .header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bot-single .bot-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--bg-tertiary);
  padding: 8px;
  border: 1px solid var(--border);
}

.bot-single h1 {
  font-size: 2rem;
  font-weight: 700;
}

.bot-single .company-name {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.bot-single .website {
  display: inline-flex;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.bot-single .website:hover {
  background: var(--accent-hover);
}

/* --- Headline Box --- */
.bot-single .bot-headline {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.bot-single .bot-headline .description {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.bot-single .bot-headline .quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.bot-single .bot-headline .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.bot-single .bot-headline .info-item strong {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.bot-single .bot-headline .info-item span {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bot-single .status-active {
  color: var(--success) !important;
}

/* --- Social Links --- */
.bot-single .social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bot-single .social-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
}

.bot-single .social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Stats Bar --- */
.bot-single .stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bot-single .stat-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.bot-single .stat-item strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.bot-single .stat-item span {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- Sections --- */
.bot-single .product-details,
.bot-single .company-info,
.bot-single .technical-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.bot-single .product-details > h2,
.bot-single .company-info > h2,
.bot-single .technical-info > h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
}

/* --- Product Category Grid --- */
.bot-single .category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.bot-single .category-item {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1rem 1.125rem;
}

.bot-single .category-item strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

/* --- Product Subsections --- */
.bot-single .product-subsection {
  display: grid;
  grid-template-columns: 25% 75%;
  align-items: start;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.bot-single .product-subsection:last-child {
  border-bottom: none;
}

.bot-single .product-subsection > strong {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-muted);
  padding-top: 0.3rem;
}

/* --- Tags --- */
.bot-single .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.bot-single .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}

.bot-single .feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.bot-single .feature-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4375rem 0.75rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
}

.bot-single .strategy-tag {
  background: var(--purple-bg) !important;
  border-color: var(--purple) !important;
  color: var(--purple) !important;
  font-weight: 600;
}

.bot-single .integration-tag {
  background: rgba(255, 149, 0, 0.1) !important;
  border-color: var(--warning) !important;
  color: var(--warning) !important;
  font-weight: 600;
}

/* --- Risk Management --- */
.bot-single .risk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
}

.bot-single .risk-item {
  background: var(--bg-tertiary);
  border-radius: 6px;
  padding: 0.75rem 0.875rem;
  text-align: center;
}

.bot-single .risk-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.3125rem;
}

.bot-single .risk-value {
  font-size: 0.9375rem;
  font-weight: 700;
}

.bot-single .risk-value.yes {
  color: var(--success);
}

.bot-single .risk-value.no {
  color: var(--text-muted);
}

/* --- Security --- */
.bot-single .security-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.bot-single .security-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.4375rem 0.75rem;
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: 4px;
  color: var(--success);
}

/* --- Company Grid --- */
.bot-single .company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

.bot-single .company-info table {
  width: 100%;
  border-collapse: collapse;
}

.bot-single .company-info td {
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
}

.bot-single .company-info td:first-child {
  color: var(--text-muted);
  width: 50%;
}

.bot-single .company-info td:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

.bot-single .company-info tr:last-child td {
  border-bottom: none;
}

.bot-single .leadership {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.125rem;
  margin-left: 1.5rem;
}

.bot-single .leadership > strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.625rem;
}

.bot-single .leader-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.4375rem;
}

.bot-single .leader-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4375rem;
}

.bot-single .leader-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3125rem 0.625rem;
  background: var(--accent-bg);
  border-radius: 4px;
}

/* --- Compliance --- */
.bot-single .compliance-info {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.bot-single .compliance-info > strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.bot-single .compliance-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
}

.bot-single .compliance-item {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.bot-single .compliance-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.bot-single .compliance-value {
  font-size: 0.9375rem;
  font-weight: 700;
}

.bot-single .compliance-value.yes {
  color: var(--success);
}

.bot-single .compliance-value.no {
  color: var(--text-muted);
}

/* --- Technical --- */
.bot-single .technical-info table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.bot-single .technical-info td {
  padding: 0.625rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
}

.bot-single .technical-info td:first-child {
  color: var(--text-muted);
  width: 25%;
}

.bot-single .technical-info td:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

.bot-single .technical-info tr:last-child td {
  border-bottom: none;
}

.bot-single .resources {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.bot-single .resources > strong {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.bot-single .resources ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bot-single .resources li::before {
  display: none;
}

.bot-single .resources a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 0.4375rem 0.875rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  display: inline-block;
}

/* --- Bot Content --- */
.bot-single .bot-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.bot-single .bot-content h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
}

.bot-single .bot-content h2:first-child {
  margin-top: 0;
}

.bot-single .bot-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.625rem;
}

.bot-single .bot-content p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.bot-single .bot-content ul,
.bot-single .bot-content ol {
  margin-bottom: 1rem;
  padding-left: 1.375rem;
}

.bot-single .bot-content li {
  font-size: 1rem;
  margin-bottom: 0.4375rem;
}

.bot-single .bot-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.bot-single .bot-content a {
  color: var(--accent);
  text-decoration: none;
}

/* ========== Footer ========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.site-footer p {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .bot-single .category-grid {
    grid-template-columns: 1fr;
  }

  .bot-single .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bot-single .company-grid {
    grid-template-columns: 1fr;
  }

  .bot-single .stats-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  nav {
    width: 100%;
    justify-content: center;
  }

  .bot-single > header {
    flex-direction: column;
    text-align: center;
  }

  .bot-single .header-left {
    flex-direction: column;
    gap: 0.75rem;
  }

  .bot-single .website {
    width: 100%;
    justify-content: center;
  }
}
