:root {
  --bg: #060912;
  --surface: rgba(12, 17, 32, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --line-bright: rgba(255, 255, 255, 0.16);
  --text: #edf2ff;
  --text-dim: #8c9ab5;
  --accent-cyan: #18c0c1;
  --accent-gold: #e0ab3b;
  --accent-coral: #e16f4a;
  --accent-blue: #76a1ff;
  --accent-green: #52d089;
  --accent-pink: #d77ae7;
  --radius-card: 12px;
  --yellow: #d8cc1e;
  --display: 'Bebas Neue', Impact, sans-serif;
  --mono: 'Courier New', monospace;
  --border: rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.22);
  --yellow-glow: rgba(216, 204, 30, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.13) transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
  background: #060912;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 5% 0%, rgba(216, 204, 30, 0.24) 0%, transparent 58%),
    radial-gradient(ellipse 65% 60% at 98% 0%, rgba(100, 70, 230, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 55% 80% at 50% 105%, rgba(90, 60, 200, 0.07) 0%, transparent 60%),
    linear-gradient(180deg, #060912 0%, #080810 50%, #060912 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  background-repeat: repeat;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.ambient--left {
  width: 48rem;
  height: 48rem;
  top: -24rem;
  left: -18rem;
  background: rgba(216, 204, 30, 0.28);
}

.ambient--right {
  width: 40rem;
  height: 40rem;
  right: -17rem;
  bottom: -19rem;
  background: rgba(100, 70, 230, 0.14);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

/* ─── HEADER ──────────────────────────────────── */

header {
  position: relative;
  z-index: 10;
  padding: 0 52px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 6, 0.93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.avatar-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
  display: block;
}

.avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(216, 204, 30, 0.32);
  pointer-events: none;
}

.header-name {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.h-name {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.h-name em {
  font-style: normal;
  color: var(--yellow);
}

.h-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ldot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 5px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-link {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.18s;
  border-radius: 9px;
}

.icon-link:hover {
  border-color: var(--border-hi);
  color: var(--yellow);
  background: var(--yellow-glow);
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ─── SECTION HEADER ────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.section-header__title {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237, 242, 255, 0.38);
  font-weight: 600;
  white-space: nowrap;
}

.section-header__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.09), transparent);
}

.section-header__count {
  font-size: 0.68rem;
  color: rgba(237, 242, 255, 0.22);
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* ─── APPS GRID ─────────────────────────────── */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* ─── APP CARD ──────────────────────────────── */

.app-card {
  --accent: var(--accent-cyan);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.97) 0%, rgba(9, 13, 26, 0.92) 100%);
  min-height: 345px;
  position: relative;
  transition:
    border-color 0.32s ease,
    box-shadow 0.32s ease;
  will-change: transform;
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--stagger, 0ms);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(
    ellipse 80% 55% at 50% -5%,
    color-mix(in srgb, var(--accent) 11%, transparent),
    transparent 68%
  );
  opacity: 0;
  transition: opacity 0.38s ease;
  pointer-events: none;
  z-index: 1;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, rgba(255, 255, 255, 0.1));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent),
    0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 42px -6px color-mix(in srgb, var(--accent) 38%, transparent);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, -20%),
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.app-card:hover::after {
  opacity: 1;
}

.app-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 78%, white 22%);
  outline-offset: 3px;
}

/* Status badge */
.app-card__status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  border: 1px solid;
}

.app-card__status--live {
  background: rgba(82, 208, 137, 0.11);
  border-color: rgba(82, 208, 137, 0.28);
  color: #52d089;
}

.app-card__status--live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #52d089;
  box-shadow: 0 0 7px #52d089;
  animation: pulse-dot 2s ease-in-out infinite;
}

.app-card__status--wip {
  background: rgba(224, 171, 59, 0.1);
  border-color: rgba(224, 171, 59, 0.26);
  color: var(--accent-gold);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.app-card__banner {
  position: relative;
  height: 222px;
  overflow: hidden;
  background: #090e1c;
  flex-shrink: 0;
}

.app-card__banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-card:hover .app-card__banner-img {
  transform: scale(1.07);
}

.app-card__banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 28%,
    rgba(9, 13, 26, 0.45) 65%,
    rgba(9, 13, 26, 0.88) 100%
  );
  pointer-events: none;
}

.app-card__content {
  padding: 1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

.app-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-card__kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.63rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--accent) 68%, white 22%);
}

.app-card__name {
  margin: 0.5rem 0 0;
  line-height: 1.15;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.app-card__description {
  margin: 0.55rem 0 0;
  line-height: 1.58;
  font-size: 0.875rem;
  color: var(--text-dim);
  flex: 1;
}

.app-card__tags {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.app-card__tags span {
  display: inline-flex;
  padding: 0.22rem 0.56rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.1));
  color: color-mix(in srgb, var(--accent) 52%, rgba(255, 255, 255, 0.48));
  background: color-mix(in srgb, var(--accent) 8%, rgba(0, 0, 0, 0.15));
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, background 0.2s;
}

.app-card:hover .app-card__tags span {
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--accent) 13%, rgba(0, 0, 0, 0.1));
}

.app-card__cta {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.14));
  color: color-mix(in srgb, var(--accent) 68%, white 20%);
  background: color-mix(in srgb, var(--accent) 10%, rgba(0, 0, 0, 0.1));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s, border-color 0.2s;
}

.app-card:hover .app-card__cta {
  transform: translate(2px, -2px);
  background: color-mix(in srgb, var(--accent) 20%, rgba(0, 0, 0, 0.05));
  border-color: color-mix(in srgb, var(--accent) 52%, rgba(255, 255, 255, 0.18));
}

/* ─── FOOTER ─────────────────────────────────── */

.footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(237, 242, 255, 0.25);
  letter-spacing: 0.03em;
}

.footer__links {
  display: flex;
  gap: 1.4rem;
}

.footer__links a {
  font-size: 0.74rem;
  color: rgba(237, 242, 255, 0.32);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.03em;
}

.footer__links a:hover {
  color: rgba(237, 242, 255, 0.72);
}

/* ─── RESPONSIVE ──────────────────────────────── */

@media (max-width: 1060px) {
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page {
    width: min(1180px, calc(100% - 1.2rem));
    padding-top: 1.2rem;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  header {
    padding: 0 1.2rem;
    height: 72px;
  }

  .h-tag {
    display: none;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ─── ANIMATIONS ──────────────────────────────── */

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