* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: #05090f;
  color: #e2e8f0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.profile-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 9, 15, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(16px);
}
.profile-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #cbd5f5;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.2s ease;
  font-size: 13px;
}
.nav-btn:hover { background: rgba(30, 41, 59, 0.6); color: #f8fafc; }
.nav-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-icon { font-size: 14px; }
.nav-text { display: inline; }
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(34, 211, 238, 0.05));
}

.profile-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.profile-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
.profile-left { display: flex; flex-direction: column; gap: 24px; }
.profile-right { display: flex; flex-direction: column; gap: 24px; }

.card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(5, 10, 20, 0.45);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 8px;
}
.card-body { padding: 0 20px 20px; }
.card-icon {
  height: 32px;
  width: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-size: 16px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
  color: #f8fafc;
}
.card-subtitle {
  font-size: 14px;
  margin: 0;
  color: #e2e8f0;
}

.profile-hero .hero-banner {
  height: 150px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(6, 95, 120, 0.2), rgba(15, 23, 42, 0.8));
  position: relative;
}
.profile-hero .hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.25), transparent 55%);
}
.hero-content {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  padding: 0 20px 20px;
  transform: translateY(-50px);
}
.avatar-wrap { display: flex; justify-content: center; }
.avatar-ring {
  height: 112px;
  width: 112px;
  border-radius: 999px;
  border: 4px solid #0f172a;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 12px 30px rgba(5, 10, 20, 0.5);
}
.avatar-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: none;
}
.avatar-fallback {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #64748b;
}
.avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.avatar-ring:hover .avatar-overlay { opacity: 1; }
.avatar-overlay-text { font-weight: 600; }

.hero-text { text-align: center; }
.hero-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.hero-title {
  font-size: 24px;
  margin: 0;
  color: #f8fafc;
  font-weight: 700;
}
.buyer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.hero-subtitle {
  font-size: 12px;
  color: #94a3b8;
  min-height: 16px;
}
.hero-bio {
  font-size: 14px;
  color: #cbd5f5;
  line-height: 1.6;
  margin: 10px 0 0;
}

.profile-settings .card-body { padding-top: 6px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
label.label {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 600;
}
.label-muted { color: #94a3b8; font-weight: 400; }
input, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: #f8fafc;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.avatar-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file-input { display: none; }
.hint { margin: 4px 0 0; font-size: 12px; color: #64748b; }
.divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.15);
  margin: 18px 0;
}
.privacy-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.privacy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.toggle input[type="checkbox"] {
  width: 42px;
  height: 22px;
  appearance: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  position: relative;
  transition: background 0.2s ease;
}
.toggle input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f172a;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(5, 10, 20, 0.35);
}
.toggle input[type="checkbox"]:checked {
  background: rgba(34, 211, 238, 0.7);
}
.toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}
.toggle-title { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; }
.toggle-desc { display: block; font-size: 12px; color: #94a3b8; }

.btn-primary, .btn-outline {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: #22d3ee;
  color: #0f172a;
}
.btn-primary:hover { background: #67e8f9; }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5f5;
}
.btn-outline:hover { background: rgba(30, 41, 59, 0.6); }
.btn-small { padding: 10px 14px; }
.btn-icon { margin-right: 6px; }
.status {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 10px;
  min-height: 16px;
}

.dm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.panel-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.dm-messages { max-height: 240px; overflow: auto; padding-right: 4px; }
.dm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.prize-body { padding-top: 6px; }

@media (min-width: 900px) {
  .profile-grid { grid-template-columns: 2fr 1fr; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .privacy-grid { grid-template-columns: 1fr 1fr; }
  .dm-grid { grid-template-columns: 1fr 1.2fr; }
  .hero-content {
    grid-template-columns: 150px 1fr;
    align-items: end;
  }
  .avatar-wrap { justify-content: flex-start; }
  .hero-text { text-align: left; }
  .hero-title-row { flex-direction: row; align-items: center; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .nav-text { display: none; }
  .profile-shell { padding: 18px 12px 40px; }
  .hero-title { font-size: 22px; }
  .btn-outline, .btn-primary { width: 100%; }
  .avatar-row { flex-direction: column; }
}
