.hub {
  display: none;

  position: absolute;
  inset: 0;

  padding-top: 45px;
  box-sizing: border-box;
  overflow: hidden;

  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);

  transition:
    opacity 0.45s ease,
    transform 0.45s cubic-bezier(.2,.8,.2,1);
}

.hub.is-active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================
   HERO / NEWS AREA
========================= */

.hub-hero {
  position: relative;
  height: 100%;
  overflow: hidden;
  z-index: 1;

  background:
    linear-gradient(180deg, rgba(10,16,22,.35), rgba(5,10,14,.75)),
    rgba(0, 20, 30, 0.35);
}

.hub-hero-content {
  position: absolute;
  inset: 14px 10px 324px;

  padding: 18px;
  border: 1px solid rgba(170, 220, 230, 0.16);
  background: rgba(5, 10, 14, 0.34);
  backdrop-filter: blur(4px);

  box-shadow:
    inset 0 0 24px rgba(0,255,255,0.035),
    0 18px 42px rgba(0,0,0,0.28);

  color: rgba(235,245,245,0.9);
 /* ... existing styles ... */
  transition: 
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
    opacity 0.3s ease,
    filter 0.3s ease;
}

.hub-hero-content h2 {
  margin: 0 0 10px;
  font-family: 'PRESSSTART', monospace;
  font-size: 14px;
  letter-spacing: 1px;
}

.hub-hero-content p {
  margin: 0;
  line-height: 1.6;
  color: rgba(225,240,240,0.68);
}

.hub-hero-content.is-leaving-left {
  transform: translateX(-30px);
  backdrop-filter: blur(20px); /* Increase blur during transition */
  background: rgba(255, 255, 255, 0.1); /* Flash of light */
  opacity: 0;
}

.hub-hero-content.is-enter-right {
  transform: translateX(30px);
  backdrop-filter: blur(20px);
  opacity: 0;
}


.hub-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 309px;

  z-index: 18;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;

  padding: 0 11px;
}

.hub-page-btn {
  height: 8px;
  padding: 0;

  border: 1px solid rgba(170, 220, 230, 0.18);
  background: rgba(5, 10, 14, 0.52);

  cursor: pointer;
}

.hub-page-btn.active {
  border-color: rgba(0,255,255,0.75);
  background: linear-gradient(
    90deg,
    rgba(0,255,255,0.95),
    rgba(0,180,220,0.65)
  );

  box-shadow:
    0 0 10px rgba(0,255,255,0.55),
    inset 0 0 8px rgba(255,255,255,0.18);
}

.hub-arrow {
  position: absolute;
  top: 23%;
  transform: translateY(-50%);
  z-index: 3;

  width: 24px;
  height: 52px;

  border: 1px solid rgba(170, 220, 230, 0.18);
  background: rgba(5, 10, 14, 0.32);
  color: rgba(225,240,240,0.72);

  cursor: pointer;
  font-family: monospace;
  font-size: 20px;
}

.hub-arrow-left {
  left: 3px;
}

.hub-arrow-right {
  right: 3px;
}

.hub-arrow:active {
  background: rgba(0,255,255,0.16);
  transform: translateY(-50%) scale(0.94);
}

/* =========================
   DRAWER
========================= */

.hub-drawer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;

  height: 300px;
  z-index: 20;

  transition:
    height 0.38s cubic-bezier(.2,.8,.2,1);
}

.hub-drawer.is-open {
  height: calc(100% - 70px);
}

.hub-drawer-handle {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 18px;
  border: 0;
  overflow: visible;

  background:
    linear-gradient(
      90deg,
      rgba(0,255,255,0.35),
      rgba(28,140,205,0.88),
      rgba(0,255,255,0.28)
    );

  cursor: pointer;
  box-shadow:
    0 0 14px rgba(0,255,255,0.12),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.hub-drawer-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
 
  width: 46px;
  height: 15px;

  background: rgba(235,245,245,0.85);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);

  animation: drawerHint 2.1s ease-in-out infinite;
  
  transform: translateX(-50%) rotate(0deg);

  transition:
    transform 0.45s cubic-bezier(.2,.8,.2,1),
    background 0.3s ease,
    filter 0.3s ease;
}

.hub-drawer.is-open .hub-drawer-handle::after {
  transform: translateX(-50%) rotate(180deg);
  background: rgb(4, 255, 255);

  animation: none;
  
  filter: drop-shadow(0 0 8px rgba(44, 255, 255, 0.85));
}

@keyframes drawerHint {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(0deg);
    filter: drop-shadow(0 0 2px rgb(0, 149, 255));
  }

  50% {
    transform: translateX(-50%) translateY(-5px) rotate(0deg);
    filter: drop-shadow(0 0 10px rgb(0, 251, 4));
  }
}

/* =========================
   DRAWER BODY
========================= */


.hub-detail-header {
  padding-left: 7px;
  color: rgb(255, 255, 255);
  font-family: 'Aldrich', sans-serif;
  font-size: 17px;
  letter-spacing: 0.2px;
  line-height: 0.5;
}

.hub-detail-sub {
  padding-left: 12px;
  color: rgb(104, 104, 104);
  font-family: 'Aldrich', sans-serif;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.hub-detail-content {
  padding: 0 2px;
  color: rgba(225,240,240,0.68);
  line-height: 1.5;
  font-family: 'Aldrich', sans-serif;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hub-detail-image img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;

  border: 1px solid rgba(0, 255, 255, 0.18);

  box-shadow:
    inset 0 0 12px rgba(0,255,255,0.04),
    0 0 6px rgba(0,255,255,0.12);
}


.hub-shell {
  display: grid;
  grid-template-columns: 118px 1fr;

  height: calc(100% - 24px);
  overflow-y: auto;

  background:
    linear-gradient(
      180deg,
      rgba(20, 26, 32, 0.72),
      rgba(8, 13, 18, 0.78)
    );

  border: 1px solid rgba(170, 220, 230, 0.16);
  border-top: 0;

  box-shadow:
    0 18px 48px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.05);

  backdrop-filter: blur(8px);
}

.hub-sidebar {
  padding: 8px 10px;
  border-right: 1px solid rgba(170, 220, 230, 0.12);
  background: rgba(10, 18, 26, 0.45);
}

.hub-tab {
  width: 100%;
  padding: 10px 8px;
  margin-bottom: 8px;

  text-align: left;
  border: 0;
  background: transparent;

  color: rgba(220, 235, 235, 0.62);
  font-family: 'Aldrich', sans-serif;
  font-size: 11px;
  letter-spacing: 0.8px;

  cursor: pointer;
}

.hub-tab.active {
  color: #dff;
  background: rgba(0, 255, 255, 0.08);
  box-shadow: inset 2px 0 0 rgba(0,255,255,0.8);
}

.hub-main {
  position: relative;
  padding: 11px;
  transition:
    opacity 0.18s ease,
    transform 0.22s cubic-bezier(.2,.8,.2,1);
}

.hub-main.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.hub-main.is-enter {
  opacity: 0;
  transform: translateY(8px);
}

.hub-main.is-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(.2,.8,.2,1);
}

.hub-title {
  margin-bottom: 8px;
  color: #e8f4f2;
  font-size: 15px;
  font-family: 'Aldrich', sans-serif;
}

.hub-title span {
  display: block;
  font-size: 15px;
  letter-spacing: 1px;
}

.hub-card {
  font-family: 'Aldrich', sans-serif;
  position: relative;
  padding: 7px;
  margin-bottom: 12px;

  background: rgba(5, 10, 14, 0.42);
  border: 1px solid rgba(0,255,255,0.14);

  box-shadow:
    inset 0 0 18px rgba(0,255,255,0.035),
    0 10px 28px rgba(0,0,0,0.32);
}

.hub-card h2 {
  margin: 0 0 1px;
  color: rgba(235,245,245,0.9);
  font-size: 15px;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.hub-card p {
  margin: 2px 0;
  color: rgba(225,240,240,0.68);
  line-height: 1.4;
  font-size: 13px;


  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-card-image {
  width: 100%;
  height: 120px;

  overflow: hidden;
}

.hub-card-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.hub-placeholder {
  min-height: 100px;
}

.hub-card-expand {
  position: absolute;
  top: 0px;
  right: 0px;

  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hub-card-expand img {
  width: 16px;
  height: 16px;
  display: block;
  transition: transform 0.12s ease, filter 0.15s ease;
}


/* =========================
   HALF-CLOSED FADE
========================= */

.hub-drawer-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 145px;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(8, 15, 18, 0.92)
  );
}

.hub-drawer.is-open .hub-drawer-fade {
  display: none;
}

