/* ============================================
   3D SUPER GENERATOR - Hub Styles
   Hub View, Hero, Search, Generator Cards, Table
   ============================================ */

/* ===== HUB VIEW ===== */
#hub {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 24px 40px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(123,97,255,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(76,201,240,.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(247,37,133,.03) 0%, transparent 40%);
}
body.in-generator #hub { display: none; }

/* ===== HERO SECTION ===== */
.hub-hero {
  text-align: center; margin-bottom: 20px; position: relative;
  animation: fadeInUp .6s ease both; z-index: 1; padding-bottom: 8px;
}
.hub-hero h1 {
  font-size: 42px; font-weight: 800; margin-bottom: 12px;
  letter-spacing: -.5px; line-height: 1.1;
}
.hub-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  will-change: background-position;
}
.hub-hero p {
  color: var(--text-dim); font-size: 15px; max-width: 640px; margin: 0 auto;
  line-height: 1.6; animation: fadeInUp .6s ease .1s both;
}

/* Stats */
.hub-stats {
  display: flex; justify-content: center; gap: 40px; margin-top: 28px;
  animation: fadeInUp .6s ease .2s both;
}
.hub-stats .stat { text-align: center; }
.hub-stats .stat .val {
  font-size: 32px; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulseGlow 3s ease infinite;
}
.hub-stats .stat .lbl {
  font-size: 11px; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: .8px; margin-top: 2px;
}

/* Hero Actions */
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 20px 0 16px; animation: fadeInUp .6s ease .15s both;
}
.hero-btn {
  padding: 12px 24px; border: none; border-radius: 12px; font-weight: 800;
  font-size: 14px; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.hero-btn:hover { transform: translateY(-2px); }
.hero-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #000;
  box-shadow: 0 4px 20px rgba(76,201,240,.3);
}
.hero-btn-order {
  background: linear-gradient(135deg, #ff6b35, #ff9f1c); color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,53,.25);
}
.hero-btn-maker {
  background: linear-gradient(135deg, #3fb950, #2ea043); color: #fff;
  box-shadow: 0 4px 20px rgba(63,185,80,.25);
}

/* Hero Quick Links */
.hero-links {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 12px; animation: fadeInUp .6s ease .2s both;
}
.hero-links a {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text-dim);
  text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 11px;
  transition: border-color .2s, color .2s;
}
.hero-links a:hover { border-color: var(--accent); color: var(--accent); }

/* Hero Translate */
.hero-translate {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-wrap: wrap; animation: fadeInUp .6s ease .25s both;
}
.gt-mini {
  padding: 3px 8px; background: var(--bg2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 6px; font-size: 10px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.gt-mini:hover { border-color: var(--accent); color: var(--accent); }

/* Hub Tip */
.hub-tip {
  max-width: 600px; margin: 0 auto 20px; padding: 8px 14px;
  background: linear-gradient(135deg, rgba(76,201,240,.06), rgba(123,97,255,.04));
  border: 1px solid rgba(76,201,240,.12); border-radius: 10px;
  display: flex; align-items: center; gap: 8px; font-size: 12px;
}
.hub-tip span:first-child { font-size: 18px; flex-shrink: 0; }
.hub-tip div { flex: 1; color: var(--text-dim); }
.hub-tip button {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 4px; padding: 2px 6px; cursor: pointer; font-size: 10px; flex-shrink: 0;
}

/* Section Cards (Services, Community) */
.section-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; }
.section-card-maker {
  margin-top: 24px; padding: 28px 24px;
  border: 2px solid rgba(63,185,80,.25);
  background: linear-gradient(135deg, rgba(63,185,80,.04), rgba(46,160,67,.02));
}
.section-card-service {
  margin-top: 20px; padding: 28px 24px;
  border: 2px solid rgba(76,201,240,.2);
  background: linear-gradient(135deg, rgba(76,201,240,.04), rgba(123,97,255,.02));
}
.maker-step {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; text-align: center;
}
.maker-step strong { color: var(--accent); font-size: 12px; display: block; margin: 4px 0; }
.maker-step p { font-size: 11px; color: var(--text-dim); margin: 0; }

.donate-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px;
  text-decoration: none; border-radius: 8px; font-weight: 700; font-size: 12px;
  transition: transform .2s;
}
.donate-btn:hover { transform: translateY(-1px); }

.share-btn {
  padding: 5px 10px; border-radius: 6px; text-decoration: none;
  font-size: 11px; font-weight: 600;
}

.affiliate-link {
  color: var(--accent); text-decoration: none; font-size: 11px; padding: 4px 8px;
  background: rgba(76,201,240,.06); border-radius: 6px; transition: background .2s;
}
.affiliate-link:hover { background: rgba(76,201,240,.12); }

/* ===== SEARCH ===== */
.hub-search {
  max-width: 640px; margin: 0 auto 36px; position: relative;
  animation: fadeInUp .6s ease .3s both;
  display: flex; align-items: center;
  max-width: 100%; box-sizing: border-box;
}
.hub-search input {
  width: 100%; padding: 12px 18px 12px 44px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px;
  color: var(--text); font-size: 14px; outline: none;
  transition: all .3s;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  min-width: 0;
}
.hub-search input:focus {
  border-color: var(--accent);
  box-shadow: var(--glow-md), inset 0 0 20px rgba(76,201,240,.04);
}
.hub-search input::placeholder { color: var(--text-muted); }
.hub-search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); transition: color .2s;
}
.hub-search input:focus ~ svg,
.hub-search:focus-within svg { color: var(--accent); }

/* ===== SECTIONS ===== */
.hub-section { margin-bottom: 36px; animation: fadeInUp .5s ease both; }
.hub-section:nth-child(1) { animation-delay: .35s; }
.hub-section:nth-child(2) { animation-delay: .4s; }
.hub-section:nth-child(3) { animation-delay: .45s; }
.hub-section:nth-child(4) { animation-delay: .5s; }
.hub-section:nth-child(5) { animation-delay: .55s; }
.hub-section h2 {
  font-size: 13px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 16px; padding-left: 4px;
  display: flex; align-items: center; gap: 8px;
}
.hub-section h2::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
}
.hub-section h2 .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 18px; padding: 0 6px;
  background: var(--accent-glow); border: 1px solid var(--glass-border);
  border-radius: 10px; font-size: 10px; color: var(--accent);
  font-weight: 600; margin-left: 6px;
}

.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
  overflow: visible; padding: 4px 2px;
}

/* ===== GENERATOR CARDS ===== */
.gen-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 22px; cursor: pointer;
  transition: all .35s cubic-bezier(.22,.61,.36,1);
  position: relative; overflow: hidden;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: fadeInScale .4s ease both;
}
.gen-card:nth-child(1) { animation-delay: .05s; }
.gen-card:nth-child(2) { animation-delay: .1s; }
.gen-card:nth-child(3) { animation-delay: .15s; }
.gen-card:nth-child(4) { animation-delay: .2s; }
.gen-card:nth-child(5) { animation-delay: .25s; }
.gen-card:nth-child(6) { animation-delay: .3s; }
.gen-card:nth-child(7) { animation-delay: .35s; }
.gen-card:nth-child(8) { animation-delay: .4s; }
.gen-card:nth-child(9) { animation-delay: .45s; }
.gen-card:nth-child(10) { animation-delay: .5s; }
.gen-card:nth-child(11) { animation-delay: .55s; }
.gen-card:nth-child(12) { animation-delay: .6s; }
.gen-card:nth-child(13) { animation-delay: .65s; }
.gen-card:nth-child(14) { animation-delay: .7s; }
.gen-card:nth-child(15) { animation-delay: .75s; }
.gen-card:nth-child(16) { animation-delay: .8s; }
.gen-card:nth-child(17) { animation-delay: .85s; }
.gen-card:nth-child(18) { animation-delay: .9s; }
.gen-card:nth-child(19) { animation-delay: .95s; }
.gen-card:nth-child(20) { animation-delay: 1s; }

.gen-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,201,240,.3), transparent);
  opacity: 0; transition: opacity .35s;
}
.gen-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 12px;
  opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(76,201,240,.08), transparent 60%);
}
.gen-card:hover {
  border-color: rgba(76,201,240,.4);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 20px rgba(76,201,240,.1);
  background: rgba(22,29,39,.8);
}
.gen-card:hover::before { opacity: 1; }
.gen-card:hover::after { opacity: 1; }
.gen-card:active { transform: translateY(-1px) scale(.99); }

.gen-card .icon {
  font-size: 34px; margin-bottom: 12px; display: block;
  transition: transform .3s; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
}
.gen-card:hover .icon { animation: iconBounce .4s ease; }
.gen-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.gen-card p { font-size: 11px; color: #c8d4e0; line-height: 1.6; }
.gen-card .badge {
  position: absolute; top: 10px; right: 10px; font-size: 9px;
  padding: 3px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .3px;
}
.gen-card .badge.new {
  background: linear-gradient(135deg, var(--accent), #3ab8df); color: var(--bg);
  animation: badgePulse 2s ease infinite;
}
.gen-card .badge.pro {
  background: linear-gradient(135deg, var(--accent2), var(--accent3)); color: #fff;
  animation: badgePulse 2s ease infinite .5s;
}
.gen-card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.gen-card .tag {
  font-size: 9px; padding: 2px 7px;
  background: rgba(13,17,23,.6); border: 1px solid rgba(30,42,58,.5);
  border-radius: 8px; color: var(--text-muted);
  transition: all .25s; font-weight: 500;
}
.gen-card:hover .tag { border-color: var(--glass-border); color: var(--text-dim); }

/* Favorites Star */
.gen-card .fav-star {
  position: absolute; top: 10px; left: 10px; font-size: 16px;
  cursor: pointer; opacity: 0; transition: all .25s; z-index: 2;
  filter: grayscale(1); line-height: 1;
}
.gen-card:hover .fav-star { opacity: .5; }
.gen-card .fav-star:hover { opacity: 1; filter: grayscale(0); transform: scale(1.2); }
.gen-card .fav-star.active { opacity: 1; filter: grayscale(0); }

/* Fav button offset when badge present */
.gen-card .fav-btn { right: 8px; }
.gen-card:has(.badge) .fav-btn { right: auto; left: 8px; }

/* ===== FAVORITES SECTION ===== */
.hub-favorites { margin-bottom: 32px; animation: fadeInUp .5s ease .2s both; }
.hub-favorites:empty { display: none; }
.hub-favorites h2 {
  font-size: 13px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 16px; padding-left: 4px;
  display: flex; align-items: center; gap: 8px;
}
.hub-favorites h2::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent3), var(--accent2));
}
.hub-favorites .hub-grid { gap: 10px; }
.hub-favorites .gen-card { border-color: rgba(247,37,133,.15); }
.hub-favorites .gen-card:hover { border-color: rgba(247,37,133,.4); }

/* ===== PARTICLE CANVAS ===== */
#particle-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 300px;
  pointer-events: none; opacity: .4; z-index: 0;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle { display: flex; gap: 4px; margin-left: 8px; }
.view-toggle .btn { min-width: 32px; text-align: center; font-size: 16px; padding: 4px 8px; }
.view-toggle .btn.active { background: var(--accent); color: var(--bg); }

/* ===== TABLE VIEW ===== */
.hub-table-wrap { max-width: 1200px; margin: 0 auto 30px; padding: 0 20px; }
.gen-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.gen-table thead {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: var(--bg); position: sticky; top: 0; z-index: 2;
}
.gen-table th {
  padding: 10px 12px; text-align: left; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
  -webkit-user-select: none; user-select: none;
}
.gen-table th.sortable { cursor: pointer; }
.gen-table th.sortable:hover { background: rgba(255,255,255,.15); }
.gen-table th.sortable::after { content: ' \2195'; opacity: .4; }
.gen-table th.sort-asc::after { content: ' \2191'; opacity: 1; }
.gen-table th.sort-desc::after { content: ' \2193'; opacity: 1; }
.gen-table td {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  color: var(--text-dim); vertical-align: middle;
}
.gen-table tbody tr { transition: background .15s; }
.gen-table tbody tr:hover { background: var(--card-hover); }
.gen-table .t-nr { color: var(--text-muted); width: 40px; text-align: center; }
.gen-table .t-icon { font-size: 20px; width: 40px; text-align: center; }
.gen-table .t-name { color: var(--text); font-weight: 600; white-space: nowrap; }
.gen-table .t-cat .tag { font-size: 11px; }
.gen-table .t-desc {
  color: var(--text-muted); font-size: 12px; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== SCROLL TO TOP ===== */
.scroll-top-btn {
  position: fixed; bottom: 90px; right: 24px; z-index: 99999;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 2px solid rgba(255,255,255,.2); color: #fff; cursor: pointer;
  font-size: 20px; display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(76,201,240,.4);
  transition: all .3s; opacity: 0;
}
.scroll-top-btn.visible { display: flex; opacity: 1; }
.scroll-top-btn:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 8px 32px rgba(76,201,240,.5); }
body.in-generator .scroll-top-btn { display: none !important; }

/* ===== TOOLTIPS ===== */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--glass-border);
  color: var(--text); padding: 4px 10px; border-radius: 6px;
  font-size: 11px; white-space: nowrap; z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  animation: fadeInScale .15s ease; pointer-events: none;
}

/* ===== SUPPORT WIDGETS ===== */
@keyframes widget-fade {
  0%,80% { opacity: 1; }
  100% { opacity: 0.15; }
}
.floatingchat-container-wrap,
.floatingchat-container,
[id*="bmc-wbtn"],
iframe[title*="Ko-fi"],
.ko-fi-btn-container {
  animation: widget-fade 8s ease forwards;
  transition: opacity .3s;
}
.floatingchat-container-wrap:hover,
.floatingchat-container:hover,
[id*="bmc-wbtn"]:hover,
.ko-fi-btn-container:hover {
  opacity: 1 !important;
  animation: none;
}
