@font-face {
  font-family: "Bloq";
  src: url("./assets/bloq.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #000000;
  --panel: #08080800;
  --panel-soft: #000000;
  --line: #00000000;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --sidebar-width: 244px;
  --sidebar-collapsed: 78px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Bloq", "Instrument Sans", sans-serif;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.221), rgba(0, 0, 0, 0.88)),
    url("./assets/background.jpg") center top / cover no-repeat fixed;
  color: var(--text);
}

button {
  font: inherit;
}

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

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-overlay {
  display: none;
}

.mobile-menu-button {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 1rem 0.75rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--panel);
  transition: width 220ms ease, padding 220ms ease;
}

.sidebar.is-collapsed {
  width: var(--sidebar-collapsed);
  padding-inline: 0.55rem;
  border-right-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
}

.icon-button,
.ghost-button,
.mobile-menu-button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.mobile-menu-button {
  position: fixed;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 25;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  background: rgba(15, 15, 16, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  color: var(--text);
}

.mobile-menu-button span {
  position: absolute;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-menu-button span:first-child {
  transform: translateY(-4px);
}

.mobile-menu-button span:last-child {
  transform: translateY(4px);
}

.theme-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 1.05rem;
  color: var(--text);
}

.theme-back-link:hover,
.theme-back-link:focus-visible {
  color: #ffffff;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  height: 2.5rem;
  flex: 1;
  overflow: hidden;
}

.brand-image,
.nav-label {
  transition: opacity 180ms ease, transform 180ms ease;
}

.brand-image {
  position: absolute;
  left: 0;
  top: 50%;
  display: block;
  height: auto;
  transform: translateY(-50%);
}

.brand-image-full {
  width: 170px;
  opacity: 1;
}

.brand-image-icon {
  width: 34px;
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav {
  display: grid;
  gap: 0.2rem;
}

.sidebar-account-row {
  margin-top: auto;
  padding: 0.35rem 0.85rem 0;
}

.sidebar-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
}

.sidebar-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
}

.sidebar-auth-image {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
}

.sidebar-auth-label {
  white-space: nowrap;
}

.sidebar.is-collapsed .sidebar-account-row {
  padding-inline: 0.15rem;
}

.sidebar.is-collapsed .sidebar-auth-button {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
}

.sidebar.is-collapsed .sidebar-auth-label {
  display: none;
}

.sidebar.is-collapsed .sidebar-nav,
.sidebar.is-collapsed .sidebar-account-row {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
}

.nav-link:hover,
.nav-link.is-active {
  background: transparent;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
}

.nav-icon-image {
  display: block;
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
}

.sidebar.is-collapsed .brand-image-full,
.sidebar.is-collapsed .nav-label {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}

.sidebar.is-collapsed .brand {
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  overflow: visible;
}

.sidebar.is-collapsed .brand-image-icon {
  left: 0;
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.theme-main {
  flex: 1;
  padding: 1.1rem 1.35rem 2rem;
}

.theme-header,
.preview-row,
.post-stack,
.preview-profile-lockup,
.preview-stats,
.preview-action-row {
  display: grid;
  gap: 1rem;
}

.theme-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.page-kicker,
.summary-label {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-header h1,
.banner-copy h2 {
  margin: 0;
}

.preview-copy,
.preview-handle,
.preview-card p,
.preview-video-copy {
  color: var(--muted);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.theme-preview {
  margin-top: 0.9rem;
}

.preview-shell,
.preview-card,
.preview-avatar,
.hero-media,
.video-slot,
.gallery-slot,
.post-shell {
  border: 1px solid var(--line);
  background: var(--panel);
}

.preview-shell {
  padding: 0.85rem;
  border-radius: 22px;
  border: 0;
  background: transparent;
  max-width: 1260px;
  margin: 0 auto;
  box-shadow: none;
}

.preview-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 0.8rem 1.15rem;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.preview-banner-frame {
  width: 100%;
  max-width: 1040px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.28), rgba(5, 6, 10, 0.58)),
    url("./assets/cover.jpg") center 30% / cover no-repeat;
  box-shadow: inset 0 -80px 120px rgba(0, 0, 0, 0.38);
}

.preview-profile-lockup {
  justify-items: center;
  margin-top: -72px;
  position: relative;
  z-index: 1;
  gap: 0.55rem;
  width: 100%;
  max-width: 520px;
  text-align: center;
}

.preview-avatar {
  width: 152px;
  height: 152px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    url("./assets/user.jpg") center / cover no-repeat;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.preview-profile-lockup h2,
.preview-profile-lockup p {
  margin: 0;
}

.preview-profile-lockup h2 {
  margin-top: 0.45rem;
  font-size: 2.35rem;
  line-height: 1.05;
}

.preview-handle {
  color: var(--muted);
  font-size: 0.96rem;
}

.preview-copy {
  max-width: 460px;
  margin: 0;
}

.preview-row,
.preview-feature-card,
.recent-card,
.preview-media-stage {
  margin-top: 0.75rem;
}

.preview-card {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
}

.preview-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}

.social-icon {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon-fill {
  fill: currentColor;
  stroke: none;
}

.preview-icons .social-icon {
  width: 22px;
  height: 22px;
}

.preview-icons svg {
  display: block;
}

.preview-icons > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.preview-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 380px;
  margin-top: 0.1rem;
}

.preview-stats div {
  display: grid;
  gap: 0.24rem;
  justify-items: center;
}

.preview-stats strong {
  font-size: 2rem;
}

.preview-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.preview-action-row {
  grid-auto-flow: column;
  justify-content: center;
  gap: 0.75rem;
}

.preview-apply-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 50px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f1e8;
  color: #0b0b0d;
  font: inherit;
  cursor: pointer;
  transition: opacity 180ms ease;
}

.preview-apply-button.is-applied {
  opacity: 0.72;
}

.preview-theme-status {
  min-height: 1.3rem;
  margin: 0;
}

.video-card {
  width: min(100%, 780px);
  margin-inline: auto;
}

.video-slot {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-top: 0.6rem;
  border-radius: 18px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    #16181d;
}

.preview-media-stage {
  padding: 0 0.35rem;
}

.media-carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.media-carousel-bar .summary-label {
  margin-bottom: 0;
}

.media-carousel-controls {
  display: inline-flex;
  gap: 0.75rem;
}

.media-carousel-button {
  min-width: 74px;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.media-carousel-button:disabled {
  opacity: 0.45;
}

.preview-media-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 430px;
  overflow: hidden;
}

.gallery-slot {
  width: min(360px, 32vw);
  min-height: 420px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    #1a1c22;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.34);
}

.gallery-slot.is-active {
  position: relative;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(10, 11, 15, 0.08), rgba(10, 11, 15, 0.18)),
    linear-gradient(135deg, #214456 0%, #2f6074 32%, #10243a 70%, #0a111a 100%);
}

.gallery-slot.is-side {
  position: absolute;
  top: 28px;
  width: min(320px, 28vw);
  min-height: 370px;
  opacity: 0.58;
  filter: saturate(0.72) brightness(0.74);
  z-index: 1;
}

.gallery-slot.is-left {
  left: calc(50% - min(360px, 32vw) * 0.78);
  transform: translateX(-100%);
  background:
    linear-gradient(180deg, rgba(10, 11, 15, 0.08), rgba(10, 11, 15, 0.18)),
    linear-gradient(160deg, #111317 0%, #2b2f38 34%, #16181d 60%, #08090d 100%);
}

.gallery-slot.is-right {
  right: calc(50% - min(360px, 32vw) * 0.78);
  transform: translateX(100%);
  background:
    linear-gradient(180deg, rgba(10, 11, 15, 0.08), rgba(10, 11, 15, 0.18)),
    linear-gradient(145deg, #052427 0%, #114347 38%, #1a302d 66%, #091112 100%);
}

.post-stack {
  margin-top: 0.6rem;
}

.post-shell {
  min-height: 74px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    #15171c;
}

.post-shell.short {
  min-height: 54px;
}

@media (max-width: 980px) {
  .preview-banner-frame {
    min-height: 180px;
  }

  .preview-profile-lockup {
    margin-top: -60px;
  }

  .preview-avatar {
    width: 136px;
    height: 136px;
  }

  .preview-profile-lockup h2 {
    font-size: 1.95rem;
  }

  .gallery-slot.is-left {
    left: calc(50% - min(360px, 36vw) * 0.72);
  }

  .gallery-slot.is-right {
    right: calc(50% - min(360px, 36vw) * 0.72);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: min(272px, 78vw);
    height: 100vh;
    padding: 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 24px 0 64px rgba(0, 0, 0, 0.55);
    transition: width 220ms ease, padding 220ms ease;
  }

  .sidebar.is-collapsed {
    width: var(--sidebar-collapsed);
    padding-inline: 0.55rem;
    box-shadow: none;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-account-row {
    padding-inline: 0;
  }

  .theme-main {
    padding: 0.9rem 0.85rem 1.25rem;
  }

  .theme-header {
    grid-template-columns: 1fr;
  }

  .preview-banner-frame {
    min-height: 128px;
    border-radius: 14px;
  }

  .preview-profile-lockup {
    margin-top: -40px;
  }

  .preview-avatar {
    width: min(112px, 38vw);
    height: min(112px, 38vw);
    border-radius: 18px;
  }

  .preview-profile-lockup h2 {
    font-size: 1.2rem;
  }

  .preview-handle {
    font-size: 0.8rem;
  }

  .preview-stats {
    max-width: 320px;
  }

  .video-card {
    width: 100%;
  }

  .preview-media-stage {
    padding: 0;
  }

  .media-carousel-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-media-carousel {
    min-height: 320px;
  }

  .gallery-slot.is-active {
    width: min(250px, 62vw);
    min-height: 300px;
  }

  .gallery-slot.is-side {
    top: 20px;
    width: min(190px, 48vw);
    min-height: 260px;
  }

  .gallery-slot.is-left {
    left: calc(50% - min(250px, 62vw) * 0.7);
  }

  .gallery-slot.is-right {
    right: calc(50% - min(250px, 62vw) * 0.7);
  }
}
