@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  background: 
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.02'/%3E%3C/svg%3E") repeat,
    linear-gradient(to right, rgba(255, 255, 255, 0.012) 1px, transparent 1px) repeat,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 1px, transparent 1px) repeat;
  background-size: auto, 50px 50px, 50px 50px;
  background-color: #090a0c;
  background-attachment: fixed;
}

.hub {
  --hub-accent: #8eb4d4;
  --hub-accent-soft: rgba(124, 156, 191, 0.14);
  --hub-text: #e8edf3;
  --hub-muted: #8b9cb0;
  --hub-glass: rgba(36, 40, 50, 0.72);
  --hub-glass-border: rgba(124, 156, 191, 0.14);
  --hub-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  --hub-radius: 18px;

  position: relative;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 32px 72px;
  font-family: 'Inter', sans-serif;
  animation: hubFadeIn 0.85s ease both;
  background: 
    radial-gradient(circle at 50% -20%, rgba(142, 180, 212, 0.14) 0%, rgba(0, 0, 0, 0) 55%) no-repeat,
    radial-gradient(circle at 50% 40%, rgba(20, 23, 28, 0.25) 0%, rgba(9, 10, 12, 0.75) 100%) no-repeat;
  background-size: 100% 100%, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(124, 156, 191, 0.06);
}

.hub[data-design="bento"] {
  background: 
    radial-gradient(circle at 50% -20%, rgba(170, 130, 220, 0.12) 0%, rgba(0, 0, 0, 0) 55%) no-repeat,
    radial-gradient(circle at 50% 40%, rgba(20, 23, 28, 0.25) 0%, rgba(9, 10, 12, 0.75) 100%) no-repeat;
  background-size: 100% 100%, 100% 100%;
}

.hub[data-design="command"] {
  background: 
    radial-gradient(circle at 50% -20%, rgba(94, 196, 183, 0.12) 0%, rgba(0, 0, 0, 0) 55%) no-repeat,
    radial-gradient(circle at 50% 40%, rgba(20, 23, 28, 0.25) 0%, rgba(9, 10, 12, 0.75) 100%) no-repeat;
  background-size: 100% 100%, 100% 100%;
}

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

@keyframes hubRevealUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes hubRevealPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hubPickerIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

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

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

@keyframes hubEmptyIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes hubSearchPulse {
  0%, 100% { box-shadow: var(--hub-shadow); }
  50% { box-shadow: 0 8px 36px rgba(124, 156, 191, 0.22); }
}

@keyframes hubIconBob {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 2px)); }
}

@keyframes hubGlowBreathe {
  0%, 100% { opacity: 0.14; transform: scale(1); }
  50% { opacity: 0.22; transform: scale(1.06); }
}

.hub-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
}

.hub-top {
  margin-bottom: 22px;
}

.hub-animate-in,
.hub-animate-item {
  animation: hubRevealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--anim-order, 0) * 55ms);
}

.hub-mount-enter .hub-layout-body {
  animation: hubMountIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hub-mount-leave .hub-layout-body {
  animation: hubMountOut 0.12s ease both;
}

.hub-search-wrap {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-search-wrap.is-focused {
  transform: translateY(-2px);
}

.hub-search-wrap.is-focused .hub-search {
  animation: hubSearchPulse 2.4s ease-in-out infinite;
}

.hub-search-wrap.is-focused svg {
  fill: var(--hub-accent);
  animation: hubIconBob 1.8s ease-in-out infinite;
}

.hub-search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--hub-muted);
  pointer-events: none;
  transition: fill 0.3s ease, transform 0.3s ease;
}

.hub-search {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1px solid var(--hub-glass-border);
  border-radius: 14px;
  background: var(--hub-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--hub-text);
  outline: none;
  box-shadow: var(--hub-shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-search::placeholder { color: #5c6b7d; }

.hub-search:focus {
  border-color: rgba(124, 156, 191, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.hub-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  border: none;
  background: rgba(124, 156, 191, 0.18);
  color: var(--hub-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.hub-search-clear.visible {
  display: flex;
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.hub-search-clear:hover {
  background: rgba(124, 156, 191, 0.32);
  transform: translateY(-50%) scale(1.08);
}

.hub-item.is-filtered-out,
.hub-section.is-filtered-out {
  display: none;
}

.design-picker {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(30, 33, 41, 0.88);
  border: 1px solid rgba(124, 156, 191, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  z-index: 100;
  width: max-content;
  animation: hubPickerIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.design-picker-btn {
  border: none;
  background: transparent;
  color: var(--hub-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.design-picker-btn:hover {
  color: var(--hub-text);
  background: rgba(124, 156, 191, 0.1);
  transform: translateY(-1px);
}

.design-picker-btn.is-active {
  color: #f1f5f9;
  background: rgba(124, 156, 191, 0.22);
  transform: scale(1.04);
}

.hub-layout-header {
  margin-bottom: 22px;
}

.hub-layout-header h2,
.hub-cmd-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hub-text);
  letter-spacing: -0.02em;
}

.hub-layout-header p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--hub-muted);
}

.hub-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.hub-hero-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--hub-radius);
  background: linear-gradient(135deg, rgba(48, 54, 68, 0.85), rgba(36, 40, 50, 0.75));
  backdrop-filter: blur(14px);
  border: 1px solid var(--hub-glass-border);
  box-shadow: var(--hub-shadow);
  text-decoration: none;
  color: var(--hub-text);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.hub-hero-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(124, 156, 191, 0.28);
}

.hub-hero-tile:hover .hub-hero-icon {
  transform: scale(1.08) rotate(-3deg);
}

.hub-hero-tile:active {
  transform: translateY(-2px) scale(0.99);
  transition-duration: 0.1s;
}

.hub-hero-icon,
.hub-tile-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 156, 191, 0.1);
}

.hub-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-hero-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--tool-accent, var(--hub-accent));
  transition: transform 0.35s ease;
}

.hub-hero-tile:hover .hub-hero-icon svg {
  transform: scale(1.1);
}

.hub-hero-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: #f1f5f9;
}

.hub-hero-text span {
  font-size: 0.82rem;
  color: var(--hub-muted);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.hub-panel {
  background: var(--hub-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hub-glass-border);
  border-radius: var(--hub-radius);
  box-shadow: var(--hub-shadow);
  padding: 16px 16px 12px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.hub-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.hub-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.hub-panel-head svg {
  width: 16px;
  height: 16px;
  fill: var(--hub-accent);
  opacity: 0.85;
}

.hub-panel-head h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--hub-muted);
}

.hub-tiles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hub-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--hub-text);
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hub-tile:hover {
  background: rgba(124, 156, 191, 0.12);
  transform: translateX(6px);
}

.hub-tile:hover .hub-tile-icon {
  transform: scale(1.1);
  background: rgba(124, 156, 191, 0.18);
}

.hub-tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.hub-tile-icon svg {
  width: 17px;
  height: 17px;
  fill: var(--tool-accent, var(--hub-accent));
}

.hub-tile-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  color: #dce4ed;
}

.hub-tile-desc {
  display: block;
  font-size: 0.74rem;
  color: var(--hub-muted);
  margin-top: 1px;
}

.hub-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 92px;
  gap: 12px;
}

.hub-bento-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-radius: var(--hub-radius);
  background: rgba(36, 40, 50, 0.78);
  border: 1px solid var(--hub-glass-border);
  box-shadow: var(--hub-shadow);
  text-decoration: none;
  color: var(--hub-text);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.hub-bento-tile:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
  border-color: color-mix(in srgb, var(--tool-accent) 40%, transparent);
}

.hub-bento-tile:active {
  transform: translateY(-2px) scale(0.99);
  transition-duration: 0.1s;
}

.hub-bento-glow {
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: var(--tool-accent, var(--hub-accent));
  opacity: 0.14;
  filter: blur(28px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  animation: hubGlowBreathe 4s ease-in-out infinite;
}

.hub-bento-tile:hover .hub-bento-glow {
  opacity: 0.32;
  transform: scale(1.15);
}

.hub-bento-tile:hover .hub-bento-icon {
  transform: scale(1.12) rotate(-4deg);
}

.hub-bento-icon {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-bento-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--tool-accent, var(--hub-accent));
}

.hub-bento-text {
  position: relative;
  z-index: 1;
}

.hub-bento-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.hub-bento-text span {
  display: block;
  font-size: 0.72rem;
  color: var(--hub-muted);
  line-height: 1.35;
}

.hub-bento-default { grid-column: span 1; grid-row: span 1; }
.hub-bento-wide { grid-column: span 2; grid-row: span 1; }
.hub-bento-tall { grid-column: span 1; grid-row: span 2; }
.hub-bento-xl {
  grid-column: span 2;
  grid-row: span 2;
  padding: 22px;
}

.hub-bento-xl .hub-bento-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.hub-bento-xl .hub-bento-icon svg {
  width: 26px;
  height: 26px;
}

.hub-bento-xl .hub-bento-text strong {
  font-size: 1.2rem;
}

.hub-bento-xl .hub-bento-text span {
  font-size: 0.82rem;
}

.hub-layout-command {
  max-width: 720px;
  margin: 0 auto;
}

.hub-cmd-intro {
  text-align: center;
  margin-bottom: 18px;
}

.hub-cmd-greeting {
  display: none;
}

.hub-cmd-title {
  text-align: center;
  font-size: 1.6rem;
}

.hub-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.hub-filter-pill {
  border: 1px solid rgba(124, 156, 191, 0.14);
  background: rgba(36, 40, 50, 0.55);
  color: var(--hub-muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-filter-pill:hover {
  color: var(--hub-text);
  border-color: rgba(124, 156, 191, 0.28);
  transform: translateY(-2px);
}

.hub-filter-pill.is-active {
  color: #f1f5f9;
  background: rgba(124, 156, 191, 0.2);
  border-color: rgba(124, 156, 191, 0.35);
  transform: scale(1.06);
}

.hub-cmd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.hub-cmd-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 12px 14px;
  border-radius: 16px;
  background: rgba(36, 40, 50, 0.62);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--hub-text);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.hub-cmd-tile:hover {
  transform: translateY(-5px) scale(1.03);
  background: rgba(48, 54, 68, 0.85);
  border-color: color-mix(in srgb, var(--tool-accent) 35%, transparent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.hub-cmd-tile:hover .hub-cmd-icon {
  transform: scale(1.12) rotate(-5deg);
  background: color-mix(in srgb, var(--tool-accent) 18%, transparent);
}

.hub-cmd-tile:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.1s;
}

.hub-cmd-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(124, 156, 191, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.35s ease;
}

.hub-cmd-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--tool-accent, var(--hub-accent));
}

.hub-cmd-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e8edf3;
  line-height: 1.25;
}

.hub-cmd-desc {
  font-size: 0.68rem;
  color: var(--hub-muted);
  line-height: 1.3;
  max-width: 120px;
}

.hub[data-design="command"] .hub-top {
  margin-bottom: 28px;
}

.hub[data-design="command"] .hub-search {
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 1rem;
  border-radius: 16px;
}

.hub-empty {
  display: none;
  text-align: center;
  padding: 36px 16px;
  color: var(--hub-muted);
  font-size: 0.92rem;
}

.hub-empty.visible {
  display: block;
  animation: hubEmptyIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hub-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(124, 156, 191, 0.12);
}

.hub-footer a {
  font-size: 0.78rem;
  color: var(--hub-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.hub-footer a:hover {
  color: var(--hub-accent);
  background: var(--hub-accent-soft);
  transform: translateY(-2px);
}

.hub-footer-dot {
  color: rgba(139, 156, 176, 0.35);
  font-size: 0.65rem;
  user-select: none;
}

@media (max-width: 820px) {
  .hub-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 88px;
  }

  .hub-bento-xl,
  .hub-bento-wide {
    grid-column: span 2;
  }

  .hub-bento-tall {
    grid-row: span 1;
  }

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

@media (max-width: 720px) {
  .hub {
    padding: 20px 16px 72px;
  }

  .hub-hero,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-layout-header h2,
  .hub-cmd-title {
    font-size: 1.15rem;
  }
}

@media (max-height: 680px) {
  .hub { padding-top: 16px; }
  .hub-hero-tile { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hub,
  .hub-animate-in,
  .hub-animate-item,
  .hub-mount-enter .hub-layout-body,
  .hub-mount-leave .hub-layout-body,
  .hub-empty.visible,
  .design-picker,
  .hub-bento-glow,
  .hub-search-wrap.is-focused .hub-search,
  .hub-search-wrap.is-focused svg {
    animation: none !important;
  }

  .design-picker {
    transform: translateX(-50%);
  }

  .hub-item,
  .hub-section,
  .hub-hero-tile,
  .hub-tile,
  .hub-bento-tile,
  .hub-cmd-tile,
  .hub-panel,
  .hub-filter-pill,
  .design-picker-btn,
  .hub-footer a,
  .hub-search-wrap,
  .hub-search,
  .hub-hero-icon,
  .hub-tile-icon,
  .hub-bento-icon,
  .hub-cmd-icon {
    transition: none !important;
  }
}
