
:root {
  color-scheme: dark;
  --bg: #070b16;
  --panel: rgba(14, 22, 42, 0.88);
  --panel-light: rgba(20, 32, 58, 0.9);
  --line: rgba(112, 151, 220, 0.2);
  --text: #edf5ff;
  --muted: #91a4c4;
  --blue: #3d82ff;
  --cyan: #36e5f2;
  --danger: #ff7b91;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(30, 91, 190, .16), transparent 36%),
    radial-gradient(ellipse at 95% 25%, rgba(0, 205, 230, .09), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
label:focus-within {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .15;
  pointer-events: none;
}
.ambient-one { top: 180px; left: -180px; background: #276bff; }
.ambient-two { top: 650px; right: -200px; background: #00d8e9; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 13px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 22, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #04101e;
  box-shadow: 0 0 24px rgba(54, 229, 242, .2);
}
.brand-version { color: var(--cyan); }

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 24px);
}
.top-nav a, .nav-profile {
  color: var(--muted);
  font-size: .88rem;
  transition: color .2s ease;
}
.top-nav a:hover, .nav-profile:hover, .nav-profile[aria-current="page"] {
  color: var(--cyan);
}
.nav-profile {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  white-space: nowrap;
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 7px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.055em;
}
h1 span {
  color: var(--cyan);
  text-shadow: 0 0 25px rgba(54, 229, 242, .18);
}
h2 { margin-bottom: 8px; letter-spacing: -.035em; }
.page-subtitle, .section-description { margin-bottom: 0; color: var(--muted); }
.eyebrow {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 29, 52, .92), rgba(10, 16, 31, .92));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .15);
}

.profile-card { margin-bottom: 26px; }

.cover-wrap {
  position: relative;
  height: clamp(150px, 24vw, 250px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 25%, rgba(61, 130, 255, .65), transparent 50%),
    linear-gradient(120deg, #101f42, #082d49 60%, #071525);
}
.cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(5, 9, 19, .5), transparent 65%);
}
.image-action {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(4, 10, 22, .78);
  color: white;
  font-size: .82rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.cover-action { right: 16px; bottom: 15px; }
.image-action input, .avatar-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 0 clamp(16px, 3vw, 30px) 24px;
}
.avatar-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 118px;
  height: 118px;
  margin-top: -48px;
}
.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border: 4px solid #101a30;
  border-radius: 32px;
  background: #162441;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(54, 229, 242, .35);
}
.avatar-action {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #0d1629;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #03101d;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}
.identity-copy { flex: 1; min-width: 0; padding-top: 18px; }
.identity-copy .eyebrow { margin-bottom: 3px; }
.identity-copy h2 { overflow-wrap: anywhere; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.username { margin-bottom: 9px; color: var(--cyan); }
.bio-preview, .country-preview { margin-bottom: 6px; color: #c4d2e8; white-space: pre-wrap; overflow-wrap: anywhere; }
.country-preview { font-size: .85rem; color: var(--muted); }
.identity-actions { padding-top: 22px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  font-size: .88rem;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary {
  color: #04101d;
  background: linear-gradient(115deg, #4d8cff, #36e5f2);
  box-shadow: 0 8px 24px rgba(40, 151, 232, .16);
}
.button-secondary {
  color: #dceaff;
  border-color: var(--line);
  background: rgba(255,255,255,.035);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stat-item {
  display: grid;
  gap: 3px;
  padding: 18px 12px;
  text-align: center;
}
.stat-item + .stat-item { border-left: 1px solid var(--line); }
.stat-item strong { font-size: 1.35rem; }
.stat-item span { color: var(--muted); font-size: .78rem; }

.editor-panel { margin: 0 0 32px; padding: clamp(18px, 3vw, 28px); }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.section-heading h2 { margin-bottom: 4px; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; color: #d9e7fb; font-size: .88rem; }
.field-full { grid-column: 1 / -1; }
.field input, .field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid rgba(127, 159, 208, .25);
  border-radius: 12px;
  background: rgba(4, 10, 22, .65);
  color: var(--text);
  outline: none;
}
.field input:focus, .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(54, 229, 242, .08);
}
.field small { color: var(--muted); font-size: .75rem; }
.field textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.content-section { margin: 40px 0; }
.section-heading-responsive { align-items: flex-end; }
.section-heading-responsive > div { min-width: 0; }
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.content-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(19, 31, 56, .95), rgba(10, 17, 32, .95));
  transition: border-color .2s ease, transform .2s ease;
}
.content-card:hover { transform: translateY(-3px); border-color: rgba(54, 229, 242, .48); }
.card-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #142d53, #0a3b4a);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { color: var(--cyan); font-size: 2rem; }
.product-type {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(4, 10, 22, .8);
  color: #e6faff;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-info { padding: 15px; }
.content-info h3 {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  font-size: 1rem;
}
.content-info p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: .83rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .75rem;
}
.card-price { color: var(--cyan); font-weight: 800; }
.card-link { color: var(--cyan); font-weight: 750; }
.card-link:hover { text-decoration: underline; }
.loading-card, .empty-state {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px dashed rgba(127, 159, 208, .28);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}
.empty-state strong { display: block; margin-bottom: 5px; color: var(--text); }
.empty-state a { display: inline-block; margin-top: 10px; color: var(--cyan); font-weight: 750; }
.section-status { min-height: 1px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; }

.profile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 45px;
  padding: clamp(20px, 4vw, 34px);
}
.profile-footer h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
.profile-footer p:last-child { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.message {
  margin-bottom: 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 31, 55, .9);
  color: #dcecff;
}
.message.error { border-color: rgba(255, 123, 145, .4); color: #ffc0ca; }
.message.success { border-color: rgba(54, 229, 242, .35); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 22px clamp(16px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 850px) {
  .topbar { flex-wrap: wrap; }
  .top-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding: 4px 0; }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-identity { flex-wrap: wrap; }
  .identity-copy { flex-basis: calc(100% - 145px); }
  .identity-actions { margin-left: auto; padding-top: 0; }
  .profile-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 22px, 1160px); padding-top: 26px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .topbar { padding: 12px; gap: 12px; }
  .top-nav { gap: 15px; }
  .top-nav a { white-space: nowrap; font-size: .8rem; }
  .nav-profile { margin-left: auto; font-size: .8rem; }
  .cover-wrap { height: 155px; }
  .profile-identity { gap: 14px; padding: 0 15px 20px; }
  .avatar-wrap { width: 88px; height: 88px; margin-top: -35px; }
  .avatar-image { border-radius: 24px; }
  .identity-copy { flex-basis: calc(100% - 105px); padding-top: 12px; }
  .identity-copy h2 { font-size: 1.25rem; }
  .identity-actions { width: 100%; }
  .identity-actions .button { width: 100%; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--line); }
  .form-grid, .content-grid { grid-template-columns: 1fr; }
  .section-heading-responsive { align-items: flex-start; flex-direction: column; }
  .section-heading-responsive > .button { width: 100%; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .footer-actions { width: 100%; }
  .footer-actions .button { flex: 1 1 100%; }
  .site-footer { flex-direction: column; }
}

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