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

:root {
  --bg: #0d0d0d;
  --bg-elevated: #161616;
  --surface: #1c1c1c;
  --surface-hover: #242424;
  --border: #333333;
  --text: #ffffff;
  --muted: #a3a3a3;
  --accent: #ff0033;
  --accent-hover: #e6002e;
  --accent-soft: rgba(255, 0, 51, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Montserrat", var(--font);
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  --header-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 0, 51, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 0, 51, 0.08), transparent),
    var(--bg);
}

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

img {
  display: block;
  max-width: 100%;
}

.page {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 120px;
  min-height: 100dvh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 0 16px;
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0.97) 70%, transparent);
  backdrop-filter: blur(8px);
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: opacity 0.15s ease;
}

.logo:hover {
  opacity: 0.88;
}

.logo-img {
  width: auto;
  height: 36px;
}

.tagline {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-wrap {
  position: relative;
  background: #000;
  width: 100%;
  overflow: hidden;
}

.media-wrap--portrait {
  aspect-ratio: 9 / 16;
  max-height: min(72dvh, 680px);
  margin: 0 auto;
}

.media-wrap--landscape {
  aspect-ratio: 16 / 9;
  max-height: min(52dvh, 420px);
}

.media-wrap--custom {
  max-height: min(72dvh, 680px);
  margin: 0 auto;
}

.media-wrap video,
.media-wrap img.thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.media-wrap--portrait video,
.media-wrap--portrait img.thumb {
  object-fit: cover;
}

.video-player {
  vertical-align: top;
}

.video-play-hint {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.media-wrap.is-playing .video-play-hint {
  opacity: 0;
}

.body {
  padding: 18px 18px 20px;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}

.author-handle {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2px;
}

.description {
  font-size: 0.98rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e5e5e5;
}

.stats {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-icon {
  color: var(--accent);
  font-size: 0.9rem;
}

.actions-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(13, 13, 13, 0.98) 65%, transparent);
  backdrop-filter: blur(10px);
}

.actions-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  box-shadow: 0 8px 24px rgba(255, 0, 51, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.products {
  margin-top: 18px;
}

.products h2 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 700;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}

.product-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.product-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}

.product-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.product-cta {
  margin-left: auto;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.profile-hero {
  text-align: center;
  padding: 28px 20px;
}

.profile-hero .avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
  border-color: var(--accent);
}

.profile-hero .author-name {
  font-size: 1.4rem;
}

.profile-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.meta-item {
  text-align: center;
  min-width: 64px;
}

.meta-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.meta-label {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 2px;
}

.state {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}

.state.error {
  color: #ff6b6b;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.footer-note {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.footer-note a {
  color: var(--accent);
  font-weight: 600;
}

@media (min-width: 520px) {
  .page {
    padding-top: 8px;
  }

  .actions-bar {
    padding-bottom: 20px;
  }
}
