﻿:root {
  --bg-1: #030811;
  --bg-2: #0a1630;
  --text: #f4faff;
  --muted: #94b9ff;
  --card: #0d1528;
  --card-soft: #101c33;
  --accent: #0088ff;
  --accent-2: #bb00ff;
  --danger: #ff2a5f;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 136, 255, 0.22) 0%, transparent 36%),
    radial-gradient(circle at 90% 90%, rgba(187, 0, 255, 0.28) 0%, transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

.page,
.admin-page {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.page {
  perspective: 960px;
}

.profile-card,
.admin-card {
  background: linear-gradient(145deg, rgba(13, 21, 40, 0.98), rgba(10, 22, 48, 0.95));
  border: 1px solid rgba(148, 185, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
  padding: 24px;
}

.profile-card {
  width: min(100%, 640px);
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: cardIn2d 0.58s ease-out forwards;
  will-change: transform, opacity;
}

@supports (transform-style: preserve-3d) {
  .profile-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: rotateX(8deg) rotateY(-6deg) translateY(20px) scale(0.97);
    animation: cardIn3d 0.62s ease-out forwards;
  }
}

.avatar {
  width: 104px;
  height: 104px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00e1ff;
  box-shadow: 0 0 0 6px rgba(0, 136, 255, 0.2), 0 0 34px rgba(0, 136, 255, 0.35);
  margin: 0 auto 10px;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.avatar-preview {
  margin: 0 auto 10px;
}

h1 { margin: 0 0 4px; font-size: 28px; }
h2 { margin: 0 0 14px; color: var(--muted); font-size: 17px; font-weight: 600; }
h3 { margin-top: 28px; }

.bio {
  margin: 0 auto 20px;
  max-width: 520px;
  color: #d8e9ff;
  line-height: 1.5;
}

.links {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  text-align: left;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 22px rgba(0, 136, 255, 0.28);
}

.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(187, 0, 255, 0.35);
}

.link-title { font-weight: 700; }
.link-description { font-size: 13px; opacity: 0.94; color: #e6f2ff; }
.link-content { display: flex; flex-direction: column; gap: 2px; }

.link-thumb {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.32);
}

.icon-orb {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.68) 18%, rgba(255, 255, 255, 0.12) 40%, rgba(0, 0, 0, 0) 42%),
    radial-gradient(circle at 65% 75%, #071123, #0a2f59 72%, #040912);
  box-shadow:
    inset 0 -10px 18px rgba(0, 0, 0, 0.48),
    inset 0 8px 10px rgba(255, 255, 255, 0.15),
    0 9px 20px rgba(0, 0, 0, 0.35),
    0 0 16px rgba(0, 225, 255, 0.32);
  transition: transform .2s ease, box-shadow .2s ease;
}

.brand-icon {
  width: 20px;
  height: 20px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.icon-whatsapp { box-shadow: inset 0 -10px 18px rgba(0,0,0,.48), inset 0 8px 10px rgba(255,255,255,.15), 0 9px 20px rgba(0,0,0,.35), 0 0 16px rgba(0,245,141,.42); }
.icon-instagram { box-shadow: inset 0 -10px 18px rgba(0,0,0,.48), inset 0 8px 10px rgba(255,255,255,.15), 0 9px 20px rgba(0,0,0,.35), 0 0 16px rgba(187,0,255,.45); }
.icon-youtube { box-shadow: inset 0 -10px 18px rgba(0,0,0,.48), inset 0 8px 10px rgba(255,255,255,.15), 0 9px 20px rgba(0,0,0,.35), 0 0 16px rgba(255,51,102,.45); }
.icon-shop { box-shadow: inset 0 -10px 18px rgba(0,0,0,.48), inset 0 8px 10px rgba(255,255,255,.15), 0 9px 20px rgba(0,0,0,.35), 0 0 16px rgba(255,183,3,.4); }

.link-btn:hover .icon-orb {
  transform: translateY(-1px) scale(1.03);
}

.footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.footer a,
a {
  color: #8cc7ff;
  text-decoration: none;
}

.stack {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  color: #cde2ff;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="color"],
input[type="file"],
select,
textarea {
  width: 100%;
  border: 1px solid rgba(148, 185, 255, 0.35);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  color: var(--text);
  background: rgba(16, 28, 51, 0.88);
}

button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--accent), #0055ff);
  color: #fff;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 700;
}

button.ghost { background: #162542; color: #b8d7ff; }
button.danger { background: linear-gradient(120deg, #ff3366, var(--danger)); }

.inline-form { margin: 8px 0 18px; }

.avatar-upload-block {
  border: 1px dashed rgba(148, 185, 255, 0.4);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  background: rgba(3, 8, 17, 0.35);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 185, 255, 0.22);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  border-bottom: 1px solid rgba(148, 185, 255, 0.15);
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

.actions {
  display: flex;
  gap: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric {
  background: rgba(10, 22, 48, 0.85);
  border: 1px solid rgba(148, 185, 255, 0.22);
  border-radius: 12px;
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

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

.list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}

.list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(148, 185, 255, 0.3);
  padding: 8px 0;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0 16px;
  font-weight: 700;
}

.alert.ok {
  background: rgba(0, 245, 141, 0.12);
  color: #72ffc2;
  border: 1px solid rgba(0, 245, 141, 0.35);
}

.alert.error {
  background: rgba(255, 42, 95, 0.12);
  color: #ff89ab;
  border: 1px solid rgba(255, 42, 95, 0.35);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

@keyframes cardIn3d {
  to {
    opacity: 1;
    transform: rotateX(0deg) rotateY(0deg) translateY(0) scale(1);
  }
}

@keyframes cardIn2d {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 700px) {
  .profile-card,
  .admin-card { padding: 18px; }

  h1 { font-size: 24px; }
}
