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

:root {
  --bg-orange: #ff8a4b;
  --bg-pink: #f760ff;
  --bg-teal: #5cd7ff;
  --bg-indigo: #7b2bff;
  --text-primary: #f8f3ea;
  --text-muted: rgba(248, 243, 234, 0.7);
  --panel: rgba(10, 14, 36, 0.68);
  --panel-strong: rgba(7, 11, 31, 0.82);
  --highlight: rgba(255, 255, 255, 0.22);
  --chip-bg: rgba(246, 251, 255, 0.12);
  --chip-border: rgba(255, 255, 255, 0.28);
  --accent: #f9e8d0;
  --accent-strong: #fff4dd;
}

::selection {
  background: rgba(124, 255, 242, 0.35);
  color: var(--text-primary);
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
span,
a,
label,
blockquote,
small,
strong,
em,
button,
input,
select,
textarea {
  color: var(--text-primary);
}

body,
input,
select,
textarea {
  font-family: 'Roboto Mono', 'Roboto', monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, #ff8a4b 0%, #1edbff 50%, #ff4fff 100%);
  position: relative;
  padding: clamp(24px, 6vw, 64px);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(30deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 2%, transparent 0);
  background-size: 90px 156px;
  background-position: 0 0, 0 0, 45px 78px;
  opacity: 0.32;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

body::after {
  pointer-events: none;
}

#wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 5vw, 3rem);
}

#main,
main {
  background: var(--panel);
  border-radius: clamp(28px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 40px 80px -40px rgba(7, 11, 31, 0.8);
  backdrop-filter: blur(20px);
  padding: clamp(1.8rem, 5vw, 3.5rem);
}

main {
  max-width: min(1180px, 94vw);
  margin-inline: auto;
}

#main {
  width: 100%;
  max-width: min(1080px, 94vw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.navbar {
  background: var(--panel-strong);
  border-radius: clamp(24px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 25px 60px -30px rgba(6, 11, 31, 0.85);
  padding: clamp(1rem, 3vw, 1.75rem) clamp(1.2rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 3vw, 1.8rem);
  width: 100%;
  max-width: min(1180px, 94vw);
  margin-inline: auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-primary) !important;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.38);
  outline: none;
}

.nav-toggle-bars {
  width: 20px;
  height: 14px;
  position: relative;
  display: block;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after,
.nav-toggle-bars span {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, top 180ms ease, opacity 180ms ease;
}

.nav-toggle-bars::before {
  top: 0;
}

.nav-toggle-bars span {
  top: 6px;
}

.nav-toggle-bars::after {
  top: 12px;
}

.navbar[data-open='true'] .nav-toggle-bars::before {
  top: 6px;
  transform: rotate(45deg);
}

.navbar[data-open='true'] .nav-toggle-bars span {
  opacity: 0;
}

.navbar[data-open='true'] .nav-toggle-bars::after {
  top: 6px;
  transform: rotate(-45deg);
}

.navbar .logo a {
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar .menu {
  display: flex;
  gap: clamp(0.35rem, 2vw, 0.85rem);
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  justify-content: center;
}

.navbar .menu a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.navbar .menu a[aria-current="page"] {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.75);
}

.navbar .menu a[aria-current="page"] {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.75);
}

.navbar .menu a:hover,
.navbar .menu a:focus-visible {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px -18px rgba(6, 11, 31, 0.85);
}

.navbar .menu a.is-active {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 35px -20px rgba(6, 11, 31, 0.9);
}

.navbar .socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.navbar .socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.navbar .socials a i {
  font-size: 1rem;
}

.navbar .socials a:hover,
.navbar .socials a:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -18px rgba(6, 11, 31, 0.9);
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
}

.social-rail a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.social-rail a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-rail a:hover,
.social-rail a:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -18px rgba(6, 11, 31, 0.9);
}

.social-rail a .social-label {
  display: none;
}

.socials a svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.socials .social-label {
  font-size: 0.74rem;
}

.hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.4rem;
  color: var(--text-primary);
}

.hero .avatar img {
  border-radius: 28px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 25px 60px -35px rgba(0, 0, 0, 0.75);
}

h1, h2, h3 {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-primary);
  margin: 0;
}

.hero p,
p,
li {
  color: var(--text-muted);
  max-width: 70ch;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.14em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.7);
}

#categories,
#featured,
#recent-apps {
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
}

#categories h2,
#featured h2,
#recent-apps h2,
main > header h1,
main > header p {
  text-align: center;
}

#category-chips {
  margin-top: 1rem;
}

.chips {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.6rem 0.8rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border 0.16s ease;
}

.chip[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: clamp(1rem, 3vw, 1.6rem) 0;
}

.filters input,
.filters select,
input,
select,
textarea {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filters input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.filters input:focus,
.filters select:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='12' viewBox='0 0 18 12'%3E%3Cpath fill='%23ffffff' d='M0 3l9 9 9-9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1.1rem) center;
  background-size: 18px;
  padding-right: 2.5rem;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(11, 13, 34, 0.92) 40%, rgba(11, 13, 34, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 60px -30px rgba(6, 11, 31, 0.9);
  backdrop-filter: blur(12px);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 70px -28px rgba(11, 13, 34, 0.95);
}

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

.card-media {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), rgba(3, 7, 22, 0.8));
}

.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 22, 0) 55%, rgba(3, 7, 22, 0.65) 100%);
  pointer-events: none;
}

.card-media img {
  width: 100%;
  height: clamp(220px, 28vw, 280px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.06);
}

.card-body,
.card .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem 1.5rem 1.75rem;
}

.card-body h3,
.card .content h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.card-body p,
.card .content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--accent);
}

.card-tagline {
  color: var(--text-primary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.card-tags {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-hero {
  display: grid;
  gap: 1.4rem;
  justify-items: center;
  text-align: center;
  padding-bottom: 1rem;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.section-block {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 11, 31, 0.55);
  box-shadow: 0 20px 60px -40px rgba(6, 11, 31, 0.8);
}

.cooking-section {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.cooking-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(1.25rem, 4vw, 2.25rem);
  border-radius: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(124, 255, 242, 0.12));
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.cooking-toggle:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), rgba(124, 255, 242, 0.18));
  transform: translateY(-2px);
}

.cooking-toggle .toggle-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  flex-shrink: 0;
}

.cooking-toggle .toggle-icon::before,
.cooking-toggle .toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cooking-toggle .toggle-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cooking-toggle.is-active .toggle-icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

.cooking-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  display: grid;
  gap: clamp(1rem, 3vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  transition: max-height 0.6s ease, opacity 0.35s ease;
}

.cooking-body.is-open {
  max-height: 5000px;
  opacity: 1;
  padding-top: 0.75rem;
}

.cooking-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: clamp(18px, 2.5vw, 28px);
  padding: clamp(1.25rem, 3vw, 1.85rem);
  background: rgba(8, 12, 32, 0.85);
  box-shadow: 0 25px 60px -40px rgba(6, 11, 31, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cooking-card header h3 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
}

.project-tagline {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.repo-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.repo-links ul {
  margin: 0;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.35rem 1rem;
  list-style: none;
}

.repo-links ul li {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  position: relative;
  padding-left: 1rem;
  min-width: 0;
}

.repo-links ul li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.55rem;
}

.repo-links a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}

.repo-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.section-header p {
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.card-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-card,
.stat-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 1.5rem;
  background: rgba(8, 12, 32, 0.85);
  box-shadow: 0 20px 50px -30px rgba(6, 11, 31, 0.9);
}

.info-card h3,
.stat-card h3 {
  margin: 0 0 0.5rem;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
}

.info-card p,
.stat-card p {
  margin: 0;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.timeline li {
  position: relative;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  padding-bottom: 1.5rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -1.64rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.12);
}

.timeline-year {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.badge {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.contact-list a {
  color: var(--text-primary);
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  background: rgba(8, 12, 32, 0.82);
  box-shadow: 0 20px 50px -30px rgba(6, 11, 31, 0.9);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-form .btn {
  width: fit-content;
  cursor: pointer;
}

.form-status {
  min-height: 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.form-status[data-tone='error'] {
  color: #ffb3c1;
}

.form-status[data-tone='success'] {
  color: #a4ffe8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}

@media (max-width: 600px) {
  .timeline {
    border-left: none;
  }

  .timeline li {
    margin-left: 0;
    padding-left: 0;
  }

  .timeline li::before {
    display: none;
  }
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.tag {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.swiper {
  width: 100%;
  padding: 1.5rem 0 2.5rem;
}

.swiper-button-next,
.swiper-button-prev {
  color: rgba(255, 255, 255, 0.85);
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.7);
}

.simple-carousel {
  position: relative;
  width: 100%;
  z-index: 1;
}

.carousel-container {
  position: relative;
  width: 100%;
  min-height: 400px;
}

.carousel-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.carousel-slide a {
  display: block;
  max-width: 700px;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  pointer-events: auto !important;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.8);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.carousel-dot.active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.app-hero {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.app-hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.app-body {
  margin-top: 2.25rem;
  display: grid;
  gap: 1.25rem;
}

footer {
  background: var(--panel-strong);
  border-radius: clamp(24px, 4vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-muted);
}

footer .socials {
  justify-content: center;
  margin-bottom: 1rem;
}

.social-rail {
  position: fixed;
  right: clamp(12px, 3vw, 32px);
  top: 42%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 10;
}

@media (max-width: 900px) {
  body {
    padding: clamp(20px, 5vw, 32px);
  }

  #main,
  main,
  .navbar,
  footer {
    padding: clamp(1.2rem, 5vw, 2rem);
  }

  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .navbar .logo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .navbar .menu {
    width: 100%;
    justify-content: center;
  }

  .navbar .menu li {
    flex: 1 1 160px;
    display: flex;
  }

  .navbar .menu a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .social-rail {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 520px) {
  .navbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .navbar .logo {
    width: auto;
    justify-content: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .navbar .menu {
    display: none;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
  }

  .navbar[data-open='true'] .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.25rem;
  }

  .navbar .menu li {
    display: block;
  }

  .navbar .menu li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(320px, 100%);
  }

  .navbar .menu a {
    padding-inline: 0.75rem;
    letter-spacing: 0.14em;
  }

  .apps-page section[aria-label='Categories'],
  .apps-page section[aria-label='Filters'] {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

main > header {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
  text-align: center;
}


#apps-grid.grid {
  display: block;
}

.card-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
}

.card-actions .btn {
  min-width: 0;
  flex: 1 1 140px;
  justify-content: center;
}

.video-feed {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 4vw, 2.4rem);
  max-width: min(920px, 100%);
  margin-inline: auto;
}

/* Blog */
.blog-feed {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 4vw, 2.4rem);
}

.blog-post {
  background: rgba(5, 7, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: 0 35px 70px -45px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
}

.blog-post__header {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.blog-post__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-post__meta {
  margin: 0;
  color: rgba(248, 243, 234, 0.65);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blog-post__body p {
  margin: 0.8rem 0 0;
  color: rgba(248, 243, 234, 0.85);
}

.blog-cover {
  width: 100%;
  margin: 0.5rem 0 0.5rem;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.2);
}

.blog-cover img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.blog-video {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.35);
  margin: 0.5rem 0 0.5rem;
}

.blog-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border: 0;
}

.video-card {
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, rgba(7, 10, 28, 0.92) 0%, rgba(4, 5, 16, 0.98) 100%);
  box-shadow: 0 32px 80px -40px rgba(0, 0, 0, 0.85);
  padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.4rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-card-header h3 {
  margin: 0.2rem 0 0.4rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.video-viral {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.video-description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.video-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.video-badges span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.video-actions {
  display: flex;
  justify-content: flex-end;
}

.video-pager {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pager-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 0.55rem 1.4rem;
  border-radius: 16px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pager-btn:hover,
.pager-btn:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.pager-status {
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pager-hint {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.about-video {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.about-video__frame {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 90px -45px rgba(0, 0, 0, 0.9);
}

.about-video__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.about-collapse .collapse-toggle {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.about-collapse .collapse-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.collapse-body {
  margin-top: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.collapse-body.is-open {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-height: 9999px;
  opacity: 1;
}

.embed-grid,
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.25rem, 4vw, 2.2rem);
}

.embed-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(5, 7, 19, 0.9);
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.embed-card h3 {
  margin: 0;
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.embed-card p {
  margin: 0;
  color: var(--text-muted);
}

.embed-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.embed-frame iframe {
  display: block;
  width: 100%;
  min-height: 352px;
}

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(1, 3, 10, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  z-index: 200;
}

.video-modal.is-visible {
  display: flex;
}

.video-modal__inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  border-radius: 28px;
  background: rgba(2, 4, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.video-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.video-modal__frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.4);
}

.video-modal__frame iframe {
  display: block;
  width: 100%;
  min-height: clamp(360px, 60vw, 540px);
  border: 0;
}

.luna-shell {
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(7, 10, 30, 0.95), rgba(4, 6, 16, 0.95));
  box-shadow: 0 45px 120px -50px rgba(0, 0, 0, 0.9);
  padding: clamp(1.8rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  text-align: center;
}

.luna-copy {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.luna-copy h2 {
  margin: 0;
  letter-spacing: 0.22em;
}

.luna-list {
  margin: 0;
  padding-left: 0;
  color: var(--text-muted);
  line-height: 1.6;
  list-style: none;
}

.luna-list li {
  margin: 0.15rem 0;
  letter-spacing: 0.08em;
}

.luna-hint {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0;
}

.luna-widget-card {
  max-width: 420px;
  width: 100%;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  padding: 1rem;
  box-shadow: 0 25px 70px -40px rgba(0, 0, 0, 0.85);
}

.luna-widget-card elevenlabs-convai {
  width: 100%;
  min-height: 520px;
}

.luna-powered {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.2em;
}

.luna-floating {
  position: fixed;
  bottom: clamp(1rem, 4vw, 2rem);
  right: clamp(1rem, 4vw, 2rem);
  width: min(360px, 90vw);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(5, 7, 20, 0.65);
  box-shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.9);
  padding: 0.7rem;
  z-index: 50;
}

.luna-floating elevenlabs-convai {
  width: 100%;
  min-height: 420px;
}

@media (max-width: 700px) {
  .luna-floating {
    position: static;
    margin: 1rem auto 0;
  }
}

.apps-swiper,
.featured-swiper {
  position: relative;
}

.oruga-slider {
  --slide-size: min(70vmin, 640px);
  --slide-margin: clamp(12px, 2.2vmin, 24px);
  --base-duration: 600ms;
  --base-ease: cubic-bezier(0.25, 0.46, 0.45, 0.84);

  width: var(--slide-size);
  margin: 0 auto;
  position: relative;
  outline: none;
}

.oruga-slider__viewport {
  position: relative;
  width: var(--slide-size);
  height: var(--slide-size);
  border-radius: 36px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% -10%, rgba(124, 255, 242, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(247, 96, 255, 0.28), transparent 60%),
    rgba(7, 11, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 35px 80px -40px rgba(4, 6, 18, 0.95);
}

.oruga-slider__wrapper {
  display: flex;
  margin: 0 calc(var(--slide-margin) * -1);
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  transition: transform var(--base-duration) cubic-bezier(0.25, 1, 0.35, 1);
  will-change: transform;
  list-style: none;
  padding: 0;
}

.apps-slider-root {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  place-items: center;
}

.oruga-slider__controls {
  position: absolute;
  top: calc(100% + 1rem);
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0.9rem;
}

@media (max-width: 700px) {
  .oruga-slider {
    padding-bottom: 6.25rem;
  }

  .oruga-slider__controls {
    top: calc(var(--slide-size) + 1.25rem);
  }
}

.oruga-slider__btn {
  --size: 3rem;

  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 10, 28, 0.65);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.oruga-slider__btn:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.oruga-slider__btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.oruga-slider__btn--previous .oruga-slider__icon {
  transform: rotate(180deg);
}

.oruga-slider__icon {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.9);
}

.oruga-slide {
  --x: 0;
  --y: 0;
  --d: 50;

  width: var(--slide-size);
  height: var(--slide-size);
  margin: 0 var(--slide-margin);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  border-radius: 24px;
  overflow: hidden;
  opacity: 0.25;
  transform: translateZ(0);
  transition:
    opacity calc(var(--base-duration) / 2) var(--base-ease),
    transform calc(var(--base-duration) / 2) var(--base-ease);
  box-shadow: 0 40px 90px -55px rgba(0, 0, 0, 0.95);
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.oruga-slide--previous,
.oruga-slide--next {
  cursor: pointer;
  pointer-events: auto;
}

.oruga-slide--previous:hover,
.oruga-slide--next:hover {
  opacity: 0.55;
}

.oruga-slide--previous:hover {
  transform: translateX(2%);
}

.oruga-slide--next:hover {
  transform: translateX(-2%);
}

.oruga-slide--current {
  opacity: 1;
  user-select: auto;
  cursor: default;
  pointer-events: auto;
  z-index: 2;
}

.oruga-slide__image-wrapper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(124, 255, 242, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(247, 96, 255, 0.28), transparent 60%),
    rgba(7, 11, 34, 0.92);
}

.oruga-slide__image {
  --d: 20;

  width: 110%;
  height: 110%;
  object-fit: cover;
  position: absolute;
  left: -5%;
  top: -5%;
  opacity: 0.95;
  transform: translate(calc(var(--x) / var(--d) * 1px), calc(var(--y) / var(--d) * 1px));
  transition: transform var(--base-duration) var(--base-ease), opacity var(--base-duration) var(--base-ease);
  filter: saturate(1.05) contrast(1.05);
}

.oruga-slide--current:hover .oruga-slide__image {
  transform:
    scale(1.03)
    translate(calc(var(--x) / 50 * 1px), calc(var(--y) / 50 * 1px));
}

.oruga-slide__image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.85));
}

.oruga-slide__content {
  position: relative;
  padding: clamp(18px, 4vmin, 34px);
  z-index: 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity calc(var(--base-duration) / 2) var(--base-ease), transform calc(var(--base-duration) / 2) var(--base-ease);
  visibility: hidden;
}

.oruga-slide--current .oruga-slide__content {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.oruga-slide__eyebrow {
  margin: 0 0 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.oruga-slide__headline {
  margin: 0;
  font-size: clamp(1.6rem, 4.2vmin, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.oruga-slide__summary {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.45;
  max-width: 48ch;
}

.oruga-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

@media (max-width: 680px) {
  .oruga-slider {
    --slide-size: min(86vmin, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oruga-slider__wrapper,
  .oruga-slide,
  .oruga-slide__content,
  .oruga-slide__image {
    transition: none !important;
  }
}

.apps-swiper {
  overflow: visible;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 6vw, 4rem) clamp(3.2rem, 6vw, 4rem);
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% -10%, rgba(124, 255, 242, 0.25), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(247, 96, 255, 0.28), transparent 60%),
    rgba(7, 11, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 35px 80px -40px rgba(4, 6, 18, 0.95);
}

.apps-swiper .swiper-slide {
  width: clamp(260px, 48vw, 360px);
  display: flex;
  align-items: stretch;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0.55;
}

.apps-swiper .swiper-wrapper {
  align-items: stretch;
}

.apps-swiper .swiper-slide-active {
  transform: translateY(-8px) scale(1.02);
  opacity: 1;
}

.apps-swiper .swiper-slide-next,
.apps-swiper .swiper-slide-prev {
  opacity: 0.8;
}

.apps-swiper .swiper-button-prev,
.apps-swiper .swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: rgba(6, 10, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
  box-shadow: 0 25px 60px -35px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  z-index: 5;
}

.apps-swiper .swiper-button-prev {
  left: clamp(-1.25rem, -3vw, -2.75rem);
}

.apps-swiper .swiper-button-next {
  right: clamp(-1.25rem, -3vw, -2.75rem);
}

.apps-swiper .swiper-button-prev:hover,
.apps-swiper .swiper-button-next:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
}

.apps-swiper .swiper-button-prev::after,
.apps-swiper .swiper-button-next::after {
  font-size: 1rem;
  font-weight: 700;
}

.apps-swiper .swiper-pagination {
  bottom: clamp(0.2rem, 1vw, 0.8rem);
}

.apps-swiper .swiper-pagination-bullet {
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  opacity: 1;
}

.apps-swiper .swiper-pagination-bullet-active {
  background: var(--accent);
}

@media (max-width: 900px) {
  .apps-swiper .swiper-button-prev {
    left: 4px;
  }

  .apps-swiper .swiper-button-next {
    right: 4px;
  }

  .apps-swiper {
    padding-bottom: 3.6rem;
  }
}

.featured-swiper .swiper-slide {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.featured-swiper .swiper-slide a {
  display: block;
  width: 100%;
  max-width: 700px;
  pointer-events: auto;
}

.featured-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.swiper-button-prev,
.swiper-button-next {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--text-primary);
  box-shadow: 0 18px 32px -22px rgba(6, 11, 31, 0.85);
  cursor: pointer;
  z-index: 100 !important;
  pointer-events: auto !important;
  position: relative;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 1.2rem;
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.75);
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  background: rgba(255, 255, 255, 1);
}

.empty-state {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Matrix entry gate */
body.matrix-entry {
  background: #000;
  color: var(--text-primary);
}

body.shader-bg-enabled {
  background: transparent !important;
}

body.shader-bg-enabled.matrix-chat-surface {
  background-color: transparent !important;
  background-image: none !important;
}

body.shader-bg-enabled.matrix-chat-surface::before {
  opacity: 0 !important;
  background: none !important;
}

#shader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #000;
}

#shader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bg-toggle {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(3, 12, 14, 0.65);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.bg-toggle:hover,
.bg-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.65);
  background: rgba(3, 12, 14, 0.78);
}

.matrix-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  position: relative;
}

.matrix-gate {
  position: relative;
  width: 100%;
  max-width: 960px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(3, 12, 14, 0.65);
  border: 1px solid rgba(10, 170, 140, 0.2);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.7);
}

.matrix-vfx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.matrix-rain,
.matrix-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.matrix-rain {
  background-image: linear-gradient(
      rgba(76, 255, 201, 0.08) 0%,
      rgba(2, 8, 10, 0) 60%
    ),
    linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(8, 255, 189, 0.05) 2px, rgba(0, 0, 0, 0) 4px);
  background-size: 100% 400px, 6px 100%;
  animation: matrixRain 18s linear infinite;
  opacity: 0.65;
}

.matrix-glow {
  background: radial-gradient(circle at 20% 20%, rgba(255, 0, 111, 0.36), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(0, 255, 204, 0.32), transparent 50%);
  opacity: 0.55;
}

.matrix-card {
  position: relative;
  z-index: 2;
  padding: 3.5rem 3rem;
  text-align: center;
  max-width: 640px;
}

.pill-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: #5fffd2;
  margin-bottom: 1rem;
}

.matrix-card h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.pill-copy {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  perspective: 900px;
}

.pill {
  flex: 1 1 240px;
  min-width: 220px;
  border-radius: 999px;
  padding: 1.4rem 1.8rem;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35);
}

.pill > * {
  position: relative;
  z-index: 2;
}

.pill::before {
  content: '';
  position: absolute;
  inset: -60% -80%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.95), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.55), transparent 60%);
  opacity: 0;
  transform: translate3d(-18%, -10%, 0) rotate(20deg);
  filter: blur(1px);
  mix-blend-mode: screen;
  transition: opacity 180ms ease;
  z-index: 1;
  pointer-events: none;
}

.pill::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  background: conic-gradient(
    from 90deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.0) 40deg,
    rgba(255, 255, 255, 0.85) 60deg,
    rgba(255, 255, 255, 0.0) 85deg,
    transparent 140deg,
    rgba(255, 255, 255, 0.7) 220deg,
    transparent 360deg
  );
  opacity: 0;
  filter: blur(0.8px);
  mix-blend-mode: screen;
  z-index: 0;
  pointer-events: none;
}

.pill:hover,
.pill:focus-visible {
  transform: translateY(-6px) scale(1.02) rotateX(8deg);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.5);
  filter: saturate(1.15) contrast(1.05);
}

.pill:hover::before,
.pill:focus-visible::before {
  opacity: 0.75;
  animation: pillSheen 1200ms linear infinite;
}

.pill:hover::after,
.pill:focus-visible::after {
  opacity: 0.65;
  animation: pillSpin 1400ms linear infinite;
}

.pill:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

.pill-blue {
  background: radial-gradient(circle at top, rgba(124, 196, 255, 0.9), rgba(28, 61, 127, 0.55));
  border-color: rgba(124, 196, 255, 0.4);
}

.pill-red {
  background: radial-gradient(circle at top, rgba(255, 95, 158, 0.9), rgba(108, 4, 32, 0.55));
  border-color: rgba(255, 95, 158, 0.45);
}

.pill-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.pill-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.pill-status {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.75);
}

.pill-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 150ms ease;
}

.pill-reset:hover,
.pill-reset:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

@keyframes matrixRain {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 400px, 0 100%;
  }
}

@keyframes pillSheen {
  0% {
    transform: translate3d(-18%, -10%, 0) rotate(20deg);
  }
  100% {
    transform: translate3d(18%, 10%, 0) rotate(20deg);
  }
}

@keyframes pillSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .matrix-card {
    padding: 2.5rem 1.5rem;
  }

  .pill-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-rain {
    animation: none;
  }

  .pill,
  .pill:hover {
    transform: none;
  }

  .pill::before,
  .pill::after {
    animation: none !important;
  }
}

/* Matrix chat layout */
body.matrix-chat-surface {
  min-height: 100vh;
  margin: 0;
  color: var(--text-primary);
  background-color: #ffffff;
  background-image: url("../../images/newbg.svg"), linear-gradient(60deg, rgba(255, 165, 150, 0.5) 5%, rgba(0, 228, 255, 0.35));
  background-size: 90px 104px, cover;
  background-repeat: repeat, no-repeat;
  background-position: top left, center;
  background-attachment: fixed, fixed;
  position: relative;
  overflow-x: hidden;
}

body.matrix-chat-surface::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background: linear-gradient(120deg, rgba(12, 18, 36, 0.7), rgba(5, 10, 22, 0.75));
}

body.matrix-chat-topnav .navbar {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.matrix-layout {
  min-height: 100vh;
  display: flex;
}

.matrix-nav {
  width: 220px;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.matrix-logo a {
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.matrix-nav-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.matrix-nav-links a {
  text-decoration: none;
  color: inherit;
  opacity: 0.7;
  transition: opacity 120ms ease;
}

.matrix-nav-links a:hover {
  opacity: 1;
}

.matrix-nav-footer {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.matrix-main {
  flex: 1;
  padding: 3rem 4vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.chat-hero {
  text-align: center;
  max-width: 640px;
}

.chat-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.5rem 0;
}

.chat-hero p {
  color: var(--text-muted);
}

.panel-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.panel-copy {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.panel-refresh {
  margin-top: 1rem;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  border: 1px dashed rgba(47, 79, 47, 0.35);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border 120ms ease, color 120ms ease;
}

.panel-refresh:hover {
  border-color: rgba(47, 79, 47, 0.55);
  color: var(--text-primary);
}

.chat-shell {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 32px;
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.matrix-main-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.knowledge-panel {
  background: #fff;
  border-radius: 32px;
  padding: 1.8rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
}

.capsule-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.capsule-card {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 1rem 1.1rem;
}

.capsule-card h2 {
  margin: 0.4rem 0 0.5rem;
  font-size: 1rem;
}

.capsule-card p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.capsule-tag {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.capsule-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.capsule-links a,
.capsule-links button {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text-primary);
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
}

.capsule-links button {
  background: transparent;
}

.capsule-links button:hover,
.capsule-links a:hover {
  border-color: rgba(15, 23, 42, 0.4);
}

.panel-header {
  margin-bottom: 1rem;
}

.chat-window {
  flex: 1;
  background: #f8fafc;
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-height: 240px;
}

.chat-placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.chat-bubble {
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 90%;
}

.chat-bubble--system {
  background: rgba(148, 163, 184, 0.2);
  border-left: 3px solid rgba(148, 163, 184, 0.8);
}

.chat-bubble--user {
  margin-left: auto;
  background: rgba(59, 130, 246, 0.12);
  border-right: 3px solid rgba(59, 130, 246, 0.6);
}

.chat-bubble--assistant {
  background: rgba(34, 197, 94, 0.12);
}

.chat-input {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.chat-input input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: var(--text-primary);
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.chat-input button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, rgba(255, 138, 75, 0.85), rgba(123, 43, 255, 0.85));
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease;
}

.chat-input button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.chat-input button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.chat-input button:not(:disabled):hover {
  background: linear-gradient(135deg, rgba(255, 138, 75, 1), rgba(123, 43, 255, 1));
}

.chat-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.chat-status[data-variant='loading'] {
  color: var(--text-primary);
}

.chat-status[data-variant='error'] {
  color: rgba(255, 186, 183, 0.85);
}

.chat-status[data-variant='ok'] {
  color: rgba(255, 241, 205, 0.9);
}

.chat-bubble-meta {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.quick-prompts {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-prompts button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 120ms ease, border 120ms ease;
}

.quick-prompts button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1100px) {
  .matrix-layout {
    flex-direction: column;
  }

  .matrix-nav {
    width: 100%;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .matrix-nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 0;
  }

  .matrix-nav-footer {
    align-items: flex-end;
  }
}

@media (max-width: 640px) {
  .matrix-main-grid {
    grid-template-columns: 1fr;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .chat-input {
    flex-direction: column;
  }

  .chat-input button {
    width: 100%;
    padding: 0.9rem;
  }
}

/* Matrix chat v2 overrides */
.matrix-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.matrix-chat-header {
  width: min(900px, 100%);
  margin: 0 auto;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2rem;
  padding: 1.75rem clamp(1.5rem, 4vw, 3rem);
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(7, 17, 36, 0.92), rgba(17, 28, 56, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 60px rgba(6, 10, 22, 0.45);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.matrix-logo a {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  text-decoration: none;
}

.matrix-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.matrix-nav-links a {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: color 140ms ease, border 140ms ease, transform 140ms ease;
}

.matrix-nav-links a:hover,
.matrix-nav-links a:focus-visible {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.matrix-nav-switch {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(248, 243, 234, 0.35);
  padding-bottom: 0.3rem;
}

.matrix-chat-main {
  flex: 1;
  padding: clamp(2rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.chat-shell--full {
  width: min(840px, 100%);
  background: linear-gradient(135deg, rgba(6, 18, 36, 0.92), rgba(16, 38, 70, 0.94));
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 55px 120px rgba(6, 10, 20, 0.55);
  backdrop-filter: blur(6px);
}

.chat-window {
  background: rgba(0, 5, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-input input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e6f6e6;
}

.chat-input button {
  background: linear-gradient(135deg, #ff8a4b, #7b2bff);
}

.chat-status {
  color: rgba(230, 246, 230, 0.7);
}

.matrix-chat-footer {
  width: min(840px, 100%);
  margin-top: 2rem;
  border-radius: 32px;
  padding: 1.8rem;
  background: linear-gradient(135deg, rgba(2, 9, 24, 0.9), rgba(14, 32, 62, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  color: var(--text-primary);
  box-shadow: 0 35px 70px rgba(6, 10, 20, 0.45);
}

.matrix-chat-socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.matrix-chat-socials a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@media (max-width: 960px) {
  .matrix-wrapper {
    flex-direction: column;
  }

  .matrix-rail {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .matrix-rail-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .matrix-rail-switch {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }
}

/* Neo chat layout (light card, keep background intact) */
.neo-chat {
  width: min(980px, 100%);
  position: relative;
  z-index: 2;
}

.neo-chat-card {
  border-radius: 28px;
  border: 1px solid rgba(160, 205, 255, 0.22);
  background: linear-gradient(135deg, rgba(4, 12, 28, 0.78), rgba(10, 28, 56, 0.72));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.neo-chat-legend {
  margin: 0.2rem 0 0.25rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(185, 220, 255, 0.18);
  color: rgba(240, 250, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.35;
}

.neo-chat-legend a {
  color: rgba(240, 250, 255, 0.95);
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 250, 255, 0.4);
  padding-bottom: 1px;
}

.neo-chat-legend a:hover,
.neo-chat-legend a:focus-visible {
  border-bottom-color: rgba(240, 250, 255, 0.8);
}

.neo-chat-hero {
  padding: 0.25rem 0.25rem 0;
}

.neo-chat-hero :where(h1, h2, p) {
  color: rgba(255, 255, 255, 0.92);
}

.neo-chat-title {
  display: inline-block;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(2.25rem, 4.5vw, 3.4rem);
  margin: 0;
  background: linear-gradient(90deg, #0b0b0b 0%, #ec4899 45%, #5b21b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.neo-chat-title--sub {
  margin-top: 0.15rem;
}

.neo-chat-subtitle {
  margin: 0.6rem 0 0.2rem;
  font-size: 1.05rem;
  color: rgba(230, 246, 255, 0.75);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.neo-chat-prompts {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.neo-chat .neo-chat-prompt {
  flex: 1 1 220px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(185, 220, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 250, 255, 0.9) !important;
  padding: 1rem 1.05rem 1.2rem;
  cursor: pointer;
  position: relative;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.32);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  height: auto;
  line-height: 1.25;
  white-space: normal;
}

.neo-chat .neo-chat-prompt:hover,
.neo-chat .neo-chat-prompt:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.neo-chat-prompt-text {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-right: 1.25rem;
  color: inherit;
}

.neo-chat-prompt-arrow {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  width: 16px;
  height: 16px;
  color: rgba(230, 246, 255, 0.7);
  opacity: 0;
  transform: translateX(-14px);
  transition: transform 220ms ease, opacity 220ms ease;
}

.neo-chat-prompt:hover .neo-chat-prompt-arrow,
.neo-chat-prompt:focus-visible .neo-chat-prompt-arrow {
  opacity: 1;
  transform: translateX(0);
}

.neo-chat-window {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.neo-chat-chat-window {
  min-height: 260px;
  max-height: min(46vh, 520px);
  background: rgba(4, 10, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
}

.neo-chat-status {
  margin-top: 0;
  padding: 0 0.25rem;
  color: rgba(230, 246, 255, 0.68);
}

.neo-chat .neo-chat-composer {
  border-radius: 22px;
  background: rgba(4, 10, 20, 0.65);
  border: 1px solid rgba(185, 220, 255, 0.18);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.4);
  padding: 0.85rem 0.9rem 0.75rem;
  position: relative;
}

.neo-chat-composer :where(textarea, button, div) {
  color: rgba(240, 250, 255, 0.92);
}

.neo-chat-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0.15rem 0.1rem 0;
}

.neo-chat-textarea::placeholder {
  color: rgba(230, 246, 255, 0.55);
}

.neo-chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.neo-chat-counter {
  font-size: 0.78rem;
  color: rgba(230, 246, 255, 0.62);
  letter-spacing: 0.02em;
}

.neo-chat .neo-chat-send {
  width: 38px;
  height: 38px;
  border: none !important;
  border-radius: 999px;
  background: rgba(22, 120, 255, 0.22);
  color: rgba(240, 250, 255, 0.98) !important;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
  padding: 0 !important;
  line-height: 1 !important;
}

.neo-chat-send:hover,
.neo-chat-send:focus-visible {
  transform: translateY(-1px);
  background: rgba(22, 120, 255, 0.32);
  outline: none;
}

.neo-chat-send:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.neo-chat-send svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 860px) {
  .neo-chat-prompts {
    flex-direction: column;
  }

  .neo-chat-prompt {
    flex-basis: auto;
  }
}
