:root {
  --theme: #2563eb;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body:has(.profile-page) {
  background: #020403;
}

body:has(.subpage) {
  background: #020817;
}

body:has(.admin-shell) {
  background: #eef2f7;
}

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

input,
select,
textarea,
button {
  font: inherit;
}

code {
  background: #eef2f7;
  border-radius: 4px;
  padding: 2px 5px;
}

.button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
}

.button.primary {
  background: var(--theme);
  border-color: var(--theme);
  color: #ffffff;
}

.button.small {
  font-size: 13px;
  min-height: 32px;
  padding: 5px 9px;
}

.button.danger {
  border-color: #fecaca;
  color: var(--danger);
}

.home-shell,
.creator-layout,
.admin-shell,
.center-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px;
}

.home-hero {
  align-items: center;
  background: #111827;
  color: #ffffff;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  min-height: 280px;
  padding: 36px;
}

.home-hero h1,
.creator-header h1,
.center-page h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  margin: 0 0 14px;
}

.home-hero p {
  color: #d5dce8;
  max-width: 650px;
}

.eyebrow {
  color: var(--theme);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.creator-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 22px;
}

.creator-card,
.post-card,
.panel,
.ad,
.auth-card,
.stat,
.admin-form,
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.creator-card {
  display: block;
  padding: 20px;
}

.creator-card:hover {
  border-color: var(--card-theme);
}

.creator-card strong,
.creator-card small,
.creator-card p {
  display: block;
}

.creator-card small,
.post-meta,
.hint,
.section-heading span {
  color: var(--muted);
}

.creator-avatar {
  align-items: center;
  background: var(--card-theme, var(--theme));
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  margin-bottom: 12px;
  width: 44px;
}

.creator-avatar.large {
  --card-theme: var(--theme);
  flex: 0 0 auto;
  height: 74px;
  margin: 0;
  width: 74px;
}

.creator-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 24px 28px 34px;
}

.creator-header nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.creator-title {
  align-items: center;
  display: flex;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
}

.creator-title p {
  margin: 0;
  max-width: 740px;
}

.creator-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.creator-layout.no-sidebar {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-tabs a {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 14px;
}

.category-tabs a.active {
  background: var(--theme);
  border-color: var(--theme);
  color: #ffffff;
}

.section-heading,
.admin-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section-heading h2,
.admin-heading h2 {
  margin: 0;
}

.post-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.post-media {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: block;
  object-fit: cover;
  width: 100%;
}

.post-body {
  padding: 18px;
}

.post-body h2 {
  margin: 4px 0 8px;
}

.media-link {
  display: block;
  padding: 16px;
}

.sidebar {
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel,
.ad {
  padding: 16px;
}

.panel h3,
.ad-title {
  margin: 0 0 10px;
}

.ad-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ad-click,
.ad-image {
  display: block;
}

.ad-image {
  border-radius: 6px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.ads-top {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.side-link {
  border-top: 1px solid var(--line);
  display: block;
  padding: 10px 0;
}

.empty-state,
.flash {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  margin: 12px 0;
  padding: 14px;
}

.center-page {
  align-items: center;
  display: grid;
  min-height: 75vh;
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 14px;
  max-width: 420px;
  padding: 24px;
  width: 100%;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.admin-shell {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 250px minmax(0, 1fr);
  max-width: 1320px;
  min-height: 100vh;
  padding: 20px;
}

.admin-menu-toggle {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 16px;
  top: 16px;
  width: 44px;
  z-index: 50;
}

.admin-menu-toggle span {
  background: #f8fafc;
  border-radius: 2px;
  display: block;
  height: 2px;
  margin: 0 auto;
  transition: transform 0.2s, opacity 0.2s;
  width: 22px;
}

.admin-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.admin-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.admin-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.admin-nav {
  background: linear-gradient(180deg, #0f172a 0%, #111c33 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  color: #dbe3ef;
  display: grid;
  gap: 18px;
  padding: 20px 16px;
  position: sticky;
  top: 20px;
}

.admin-brand {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  gap: 12px;
  padding: 4px 4px 16px;
}

.admin-brand > span {
  align-items: center;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
  color: #ffffff;
  display: inline-flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.admin-brand strong,
.admin-brand small {
  display: block;
}

.admin-brand strong {
  color: #ffffff;
  font-size: 17px;
}

.admin-brand small {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

.admin-nav nav {
  display: grid;
  gap: 4px;
}

.admin-nav a {
  align-items: center;
  border-left: 3px solid transparent;
  border-radius: 10px;
  color: #cbd5e1;
  display: flex;
  font-weight: 700;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-nav a .nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: inline-flex;
  font-size: 16px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.admin-nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.admin-nav a.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25) 0%, rgba(124, 58, 237, 0.18) 100%);
  border-left-color: #60a5fa;
  color: #ffffff;
}

.admin-nav a.active .nav-icon {
  background: rgba(96, 165, 250, 0.35);
}

.admin-nav-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

.admin-nav-footer a {
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
}

.admin-nav-footer a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 18px 22px;
  position: sticky;
  top: 12px;
  z-index: 5;
}

.admin-topbar h1 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  margin: 0;
}

.admin-topbar .eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 20px;
}

.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 6px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.stat::before {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 14px 0 0 14px;
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.stat:nth-child(2)::before {
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
}

.stat:nth-child(3)::before {
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
}

.stat:nth-child(4)::before {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.stat strong {
  color: #0f172a;
  font-size: 32px;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 22px;
}

.admin-form label {
  color: #334155;
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  background: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
  outline: none;
}

.profile-editor {
  background: #ffffff;
  border-color: var(--line);
}

.media-admin-block {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.media-admin-block strong {
  color: #0f172a;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.upload-row {
  align-items: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px 1fr auto;
  padding: 12px;
}

.upload-row.compact {
  grid-template-columns: 1fr auto;
}

.admin-avatar-preview {
  border-radius: 50%;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.admin-avatar-preview.blank {
  align-items: center;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  font-size: 24px;
  justify-content: center;
}

.live-preview {
  align-items: center;
  background: #0f172a;
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  justify-content: center;
  min-height: 160px;
  overflow: hidden;
}

.live-preview video {
  max-height: 200px;
  max-width: 100%;
}

.admin-gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.admin-gallery-grid img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.admin-ad-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  max-height: 180px;
  object-fit: contain;
  width: 100%;
}

.profile-table td {
  height: 72px;
}

.profile-table small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.profile-actions-cell {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 22px;
}

.user-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.user-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.user-card-body {
  align-items: center;
  color: inherit;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
  text-decoration: none;
}

.user-card-id {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.user-card-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.user-card-avatar.fallback {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  font-size: 22px;
  font-weight: 800;
  justify-content: center;
}

.user-card-id strong {
  color: #0f172a;
  display: block;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-id small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.user-card-stats {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  text-align: right;
}

.user-card-stats small {
  color: var(--muted);
  font-size: 12px;
}

.user-card-stats small strong {
  color: #0f172a;
  font-weight: 700;
}

.user-card-actions {
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
}

.user-card-actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

.user-card-actions form {
  margin: 0;
}

.profile-tabs {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 14px;
  padding: 6px;
}

.profile-tab {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 40px;
  padding: 8px 14px;
  transition: background 0.15s, color 0.15s;
}

.profile-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.profile-tab.active {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
  color: #ffffff;
}

.profile-panel {
  display: none;
  grid-column: 1 / -1;
}

.profile-panel.active {
  display: contents;
}

.profile-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.online-pill {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.admin-form .wide,
.admin-form .checkbox {
  grid-column: 1 / -1;
}

.checkbox {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  font-weight: 600;
  gap: 10px;
  padding: 10px 12px;
}

.checkbox input {
  margin: 0;
  min-height: auto;
  width: auto;
}

.table-wrap {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
  margin-bottom: 22px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:hover td {
  background: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

.admin-info-panel {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 22px;
}

.admin-info-panel h3 {
  color: #1e3a8a;
  margin-top: 0;
}

.admin-info-panel code {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dbeafe;
  border-radius: 4px;
  font-size: 13px;
  padding: 2px 6px;
}

.admin-heading {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-heading h2 {
  font-size: 20px;
  margin: 0 0 4px;
}

.admin-heading h2 .online-pill {
  margin-left: 8px;
  vertical-align: middle;
}

.admin-heading .hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.dashboard-users {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 22px;
}

.dashboard-user-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  color: inherit;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 16px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.dashboard-user-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.dashboard-user-id {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.dashboard-user-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.dashboard-user-avatar.fallback {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.dashboard-user-id strong {
  color: #0f172a;
  display: block;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user-id small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.dashboard-user-stats {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  text-align: right;
}

.dashboard-user-stats small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-user-stats small strong {
  color: #0f172a;
  font-weight: 700;
}

.stat-line {
  display: block;
  line-height: 1.4;
}

.stat-tag {
  background: #dbeafe;
  border-radius: 999px;
  color: #1e40af;
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 4px;
  padding: 2px 7px;
  text-transform: uppercase;
}

.stat-tag.click {
  background: #fef3c7;
  color: #92400e;
}

body:has(.admin-shell) .site-footer {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.actions form {
  margin: 0;
}

.actions .button.small {
  font-size: 12px;
  min-height: 30px;
  padding: 4px 10px;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .admin-menu-toggle {
    display: flex;
  }

  .admin-nav {
    left: 0;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 70px;
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    z-index: 40;
  }

  .admin-nav.open {
    transform: translateY(0);
  }

  .admin-topbar {
    padding-right: 70px;
    position: static;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding: 18px 28px;
}

.profile-page {
  background:
    radial-gradient(circle at top, rgba(52, 211, 153, 0.14), transparent 32%),
    linear-gradient(180deg, #111827 0%, #030504 100%);
  color: #f8fafc;
  min-height: 100vh;
  padding: 8px 12px 28px;
}

.profile-page.template-light {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #172033;
}

.profile-page.template-light .profile-phone {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
}

.profile-page.template-light .profile-card,
.profile-page.template-light .profile-link,
.profile-page.template-light .appointment-card {
  background: #ffffff;
  border-color: #dbe3ef;
  color: #172033;
}

.profile-page.template-light .profile-card p,
.profile-page.template-light .appointment-card p,
.profile-page.template-light .profile-location {
  color: #475569;
}

.profile-page.template-light .profile-location {
  background: #eef2ff;
}

.profile-page.template-light .profile-link strong {
  color: #334155;
}

.profile-page.template-neon {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(236, 72, 153, 0.2), transparent 30%),
    linear-gradient(180deg, #0a0620 0%, #030712 100%);
  color: #f8fafc;
}

.profile-page.template-neon .profile-phone {
  background: rgba(17, 24, 39, 0.72);
  border-color: rgba(103, 232, 249, 0.3);
  box-shadow: 0 22px 80px rgba(34, 211, 238, 0.16);
}

.profile-page.template-neon .profile-card,
.profile-page.template-neon .profile-link,
.profile-page.template-neon .appointment-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(236, 72, 153, 0.12));
  border-color: rgba(255, 255, 255, 0.18);
}

.profile-page.template-neon .profile-link:hover {
  border-color: rgba(103, 232, 249, 0.7);
}

.profile-phone {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 28px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 450px;
  padding: 14px;
}

.profile-card {
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  display: grid;
  justify-items: center;
  min-height: 230px;
  padding: 24px 18px;
  text-align: center;
}

.profile-photo {
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  height: 84px;
  object-fit: cover;
  width: 84px;
}

.profile-photo.fallback {
  align-items: center;
  background: linear-gradient(145deg, var(--theme), #111827);
  display: inline-flex;
  font-size: 38px;
  font-weight: 800;
  justify-content: center;
}

.profile-card h1 {
  font-size: 28px;
  line-height: 1;
  margin: 10px 0 4px;
}

.profile-card p {
  color: #d1d5db;
  font-weight: 700;
  margin: 0;
}

.profile-location {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d1d5db;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  margin-top: 8px;
  padding: 4px 12px;
}

.profile-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.contact-btn {
  border-radius: 10px;
  color: #ffffff;
  display: grid;
  font-weight: 800;
  min-height: 44px;
  place-items: center;
}

.contact-btn.whatsapp {
  background: #25d366;
}

.contact-btn.telegram {
  background: #2a9fd6;
}

.profile-links {
  display: grid;
  gap: 11px;
}

.profile-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #f8fafc;
  display: flex;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 16px;
}

.profile-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-link strong {
  color: #cbd5e1;
  flex: 0 0 auto;
}

.profile-page .ads {
  display: grid;
  gap: 10px;
  margin: 0;
}

.profile-page .ad {
  background: linear-gradient(135deg, #ffffff, #fefce8);
  border: 0;
  border-radius: 10px;
  color: #111827;
  min-height: 52px;
  overflow: hidden;
  padding: 12px;
  text-align: center;
}

.profile-page .ad-title {
  color: #111827;
  margin: 0 0 2px;
}

.appointment-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.appointment-card h2 {
  font-size: 16px;
  margin: 0 0 4px;
}

.appointment-card h2 span {
  background: rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  color: #34d399;
  font-size: 10px;
  margin-left: 6px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.appointment-card p {
  color: #d1d5db;
  margin: 0;
}

.appointment-card a {
  align-self: start;
  border: 1px solid rgba(125, 211, 252, 0.46);
  border-radius: 999px;
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.profile-page + .site-footer {
  background: #020403;
  border-top-color: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  margin-top: 0;
}

.subpage {
  color: #f8fafc;
  margin: 0 auto;
  max-width: 1024px;
  min-height: 100vh;
  padding: 16px;
  width: 100%;
}

.subpage-header {
  align-items: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.subpage-header p {
  color: #93c5fd;
  font-weight: 800;
  margin: 0 0 2px;
}

.subpage-header h1 {
  font-size: 22px;
  margin: 0;
}

.subpage-header a {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-weight: 800;
  padding: 7px 13px;
}

.live-stage,
.connect-card,
.video-tile,
.photo-gallery figure,
.subpage-list {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
}

.live-stage {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.live-top {
  display: flex;
  justify-content: space-between;
}

.live-badge,
.watching {
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.live-badge {
  background: #ef233c;
}

.watching {
  background: rgba(255, 255, 255, 0.14);
  text-transform: none;
}

.subpage .ads {
  display: grid;
  gap: 10px;
}

.subpage .ad {
  background: #ffffff;
  border: 0;
  border-radius: 6px;
  color: #111827;
  padding: 14px;
  text-align: center;
}

.live-player {
  border-radius: 14px;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.live-player img,
.live-player video,
.video-tile img,
.video-tile video,
.photo-gallery img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.live-player img,
.live-player video {
  display: block;
  min-height: 360px;
}

.buffering {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  font-weight: 900;
  left: 50%;
  padding: 16px 22px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.live-caption {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  bottom: 12px;
  left: 12px;
  padding: 12px;
  position: absolute;
  right: 12px;
}

.live-caption strong,
.live-caption span {
  display: inline-block;
  margin-right: 8px;
}

.live-caption span,
.live-caption small,
.connect-card p,
.video-tile p,
.photo-gallery figcaption span {
  color: #cbd5e1;
}

.live-caption p,
.live-caption small,
.connect-card h2,
.connect-card p {
  margin: 0;
}

.connect-card {
  margin-top: 12px;
  padding: 14px;
}

.connect-card .profile-actions {
  margin-top: 12px;
}

.video-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 12px;
}

.video-tile {
  overflow: hidden;
  position: relative;
}

.video-tile img,
.video-tile video {
  aspect-ratio: 16 / 10;
  display: block;
}

.video-tile div {
  padding: 14px;
}

.video-tile h2 {
  font-size: 17px;
  margin: 0 0 4px;
}

.video-tile p {
  margin: 0;
}

.play-chip {
  background: rgba(239, 35, 60, 0.92);
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  left: 12px;
  padding: 5px 10px;
  position: absolute;
  top: 12px;
}

.photo-viewer {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.photo-slides {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  min-height: 310px;
  overflow: hidden;
  position: relative;
}

.photo-slide {
  display: none;
  height: min(58vw, 430px);
  margin: 0;
  min-height: 310px;
}

.photo-slide.active {
  align-items: center;
  display: flex;
  justify-content: center;
}

.photo-slide img {
  display: block;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.photo-meta {
  align-items: center;
  color: #d1d5db;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
}

.photo-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.photo-controls button {
  background: #0ea5b7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #020817;
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
}

.photo-controls button:first-child {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.subpage-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.subpage + .site-footer,
.creator-layout:has(.subpage) + .site-footer {
  background: #020817;
  border-top-color: rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  margin-top: 0;
}

.profile-page + .site-footer,
.creator-layout:has(.subpage) + .site-footer {
  display: none;
}

@media (max-width: 800px) {
  .home-hero,
  .creator-layout,
  .admin-shell,
  .admin-form {
    grid-template-columns: 1fr;
  }

  .home-shell,
  .creator-layout,
  .admin-shell,
  .center-page {
    padding: 16px;
  }

  .admin-shell {
    gap: 14px;
  }

  .home-hero {
    padding: 24px;
  }

  .creator-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-nav {
    gap: 12px;
    position: static;
  }

  .admin-brand {
    padding-bottom: 12px;
  }

  .admin-nav nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .admin-nav nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-nav-footer {
    display: flex;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .subpage {
    padding: 10px;
  }

  .subpage-header {
    border-radius: 14px;
  }

  .live-player,
  .live-player img,
  .live-player video {
    min-height: 300px;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  html,
  body {
    background: #020817;
    overflow-x: hidden;
    width: 100%;
  }

  body:has(.admin-shell) {
    background: #eef2f7;
  }

  .admin-shell {
    padding: 10px;
  }

  .admin-nav,
  .admin-topbar,
  .admin-form,
  .table-wrap {
    border-radius: 8px;
  }

  .admin-nav {
    padding: 12px;
  }

  .admin-brand > span {
    height: 36px;
    width: 36px;
  }

  .admin-nav a {
    min-height: 40px;
    padding: 8px 10px;
  }

  .admin-topbar {
    padding: 14px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 28px;
  }

  .admin-form {
    padding: 12px;
  }

  .upload-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .upload-row .button,
  .upload-row input[type="file"] {
    grid-column: 1 / -1;
  }

  th,
  td {
    padding: 10px;
  }

  .profile-page {
    padding: 0;
  }

  .profile-page.template-light {
    background: #f8fafc;
  }

  .profile-phone {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    gap: 10px;
    max-width: none;
    min-height: 100vh;
    padding: 8px;
    width: 100%;
  }

  .profile-card {
    border-radius: 18px;
    min-height: 178px;
    padding: 16px 14px;
  }

  .profile-photo {
    height: 68px;
    width: 68px;
  }

  .profile-card h1 {
    font-size: 25px;
    margin: 9px 0 3px;
  }

  .profile-card p,
  .appointment-card p {
    font-size: 15px;
    line-height: 1.34;
  }

  .profile-location {
    font-size: 12px;
    margin-top: 7px;
    padding: 3px 10px;
  }

  .contact-btn,
  .profile-link {
    border-radius: 9px;
    min-height: 42px;
  }

  .contact-btn {
    font-size: 15px;
  }

  .profile-links {
    gap: 8px;
  }

  .profile-link {
    font-size: 16px;
    padding: 9px 14px;
  }

  .profile-page .ads {
    margin: 2px 0;
  }

  .profile-page .ad {
    border-radius: 10px;
    min-height: auto;
    padding: 6px;
  }

  .profile-page .ad-image {
    border-radius: 8px;
    max-height: 72px;
    object-fit: contain;
  }

  .appointment-card {
    border-radius: 14px;
    gap: 8px;
    padding: 12px;
  }

  .appointment-card h2 {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 16px;
    gap: 7px;
    line-height: 1.25;
    margin-bottom: 0;
  }

  .appointment-card h2 span {
    font-size: 9px;
    padding: 3px 7px;
  }

  .appointment-card h2 span {
    margin-left: 0;
  }

  .appointment-card a {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 32px;
    padding: 5px 10px;
    width: 100%;
  }

  .subpage {
    padding: 8px;
  }

  .subpage-header,
  .live-stage,
  .connect-card,
  .photo-viewer {
    border-radius: 12px;
  }

  .subpage .ad {
    padding: 0;
  }

  .subpage .ad-image {
    border-radius: 6px;
    max-height: 100px;
    object-fit: contain;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .photo-slides,
  .photo-slide {
    min-height: 260px;
  }

  .photo-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .profile-phone {
    padding: 6px;
  }

  .profile-card {
    min-height: 160px;
    padding: 13px 12px;
  }

  .profile-photo {
    height: 60px;
    width: 60px;
  }

  .profile-card h1 {
    font-size: 23px;
  }

  .profile-card p,
  .appointment-card p {
    font-size: 14px;
  }

  .contact-btn,
  .profile-link {
    min-height: 39px;
  }

  .profile-link {
    font-size: 15px;
  }

  .profile-page .ad-image {
    max-height: 64px;
  }
}
