/* ============================================================
   WINNING SOLUTION — Master Tools Hub CSS
   Luxury Dark Red & Black Theme
   ============================================================ */

:root {
  --bg-main: #08090c;
  --bg-card: #0f1217;
  --bg-card-hover: #151922;
  --border: #222733;
  --border-focus: #f04452;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-red: #f04452;
  --accent-crimson: #d32739;
  --accent-gold: #d6a75d;
  --accent-green: #22c55e;
  --font-display: 'Manrope', -apple-system, sans-serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(240, 68, 82, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(214, 167, 93, 0.05) 0%, transparent 45%),
    linear-gradient(180deg, #090a0e 0%, #06070a 100%);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Topbar Navigation ── */
.hub-header {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hub-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(240, 68, 82, 0.25);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .08em;
  color: #fff;
  line-height: 1.1;
}

.brand-tag {
  font-size: 9.5px;
  letter-spacing: .18em;
  color: var(--accent-red);
  font-weight: 700;
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.btn-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  background: #141720;
  border: 1px solid #283040;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  transition: all .2s;
}

.btn-external:hover {
  background: #1c2230;
  border-color: var(--accent-gold);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Hero Banner ── */
.hub-hero {
  padding: 56px 0 36px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--accent-red);
  text-transform: uppercase;
  background: rgba(240, 68, 82, 0.08);
  border: 1px solid rgba(240, 68, 82, 0.2);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #fff 30%, #ff8791 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* ── Search & Filter Controls ── */
.hub-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1a202c;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: #11141b;
  border: 1px solid #232936;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.filter-btn:hover {
  border-color: #3f4759;
  color: #fff;
}

.filter-btn.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240, 68, 82, 0.35);
}

.search-wrap {
  position: relative;
  min-width: 240px;
}

.search-input {
  width: 100%;
  background: #0f1218;
  border: 1px solid #232936;
  border-radius: 10px;
  padding: 9px 14px 9px 36px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.search-input:focus {
  border-color: var(--accent-red);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
}

/* ── Tools Grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
  margin-bottom: 70px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all .25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.tool-card:hover {
  background: var(--bg-card-hover);
  border-color: #3b4559;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.tool-card.featured {
  border-color: rgba(240, 68, 82, 0.45);
  background: linear-gradient(155deg, #141720 0%, #0e1015 100%);
  box-shadow: 0 10px 30px rgba(240, 68, 82, 0.08);
}

.tool-card.featured:hover {
  border-color: var(--accent-red);
  box-shadow: 0 16px 40px rgba(240, 68, 82, 0.18);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-badge-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--accent-red);
  background: rgba(240, 68, 82, 0.1);
  border: 1px solid rgba(240, 68, 82, 0.25);
  padding: 3px 9px;
  border-radius: 6px;
}

.card-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.card-status.ready {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.card-status.dev {
  background: rgba(214, 167, 93, 0.1);
  border: 1px solid rgba(214, 167, 93, 0.25);
  color: #d6a75d;
}

.card-header-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.card-icon {
  font-size: 32px;
  line-height: 1;
  background: #171b24;
  border: 1px solid #262d3d;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.card-title-group h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin-bottom: 4px;
}

.card-tagline {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 20px;
}

.feature-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  background: #141720;
  border: 1px solid #222938;
  padding: 4px 9px;
  border-radius: 6px;
}

.card-action {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #1a202c;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-launch {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  border: 1px solid transparent;
}

.btn-launch.primary {
  background: linear-gradient(135deg, #f04452, #cf2234);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240, 68, 82, 0.35);
}

.btn-launch.primary:hover {
  background: linear-gradient(135deg, #ff5765, #e0283c);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(240, 68, 82, 0.5);
}

.btn-launch.secondary {
  background: #151a24;
  border-color: #2c3546;
  color: #cbd5e1;
}

.btn-launch.secondary:hover {
  background: #1d2433;
  border-color: #4a566f;
  color: #fff;
}

.btn-launch.disabled {
  background: #101217;
  border-color: #1a1e27;
  color: #64748b;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Footer ── */
.hub-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 30px 0;
  background: #06070a;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-inner strong {
  color: #cbd5e1;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .hub-nav {
    height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
  }
  .pill-status {
    display: none;
  }
}
