:root{
  --bg-1: #f8fafc;
  --bg-2: #e0e7ff;
  --bd-1: #e0e7ff;
  --bd-2: #6366f1;
  --txt-1: #232946;
  --txt-2: #6366f1;
  --txt-3: #64748b;
  --brand: #6366f1;
  --brand-light: #a5b4fc;
  --accent: #22d3ee;
  --shadow: 0 8px 32px rgba(99,102,241,.10), 0 2px 8px rgba(0,0,0,.06);
}

/* Đẩy toàn bộ trang xuống dưới fixed nav, không xung đột với margin */
body {
  padding-top: 00px !important;
}
.page {
  max-width: 1020px;
  margin: 0 auto;
  padding: 40px 20px;
  display: block;
}
@media (max-width: 700px) {
  body { padding-top: 2px !important; }
}

/* ===== PROFILE SECTION ===== */
.profile-card{
  display:flex;gap:32px;align-items:center;
  background:linear-gradient(120deg, #232946 80%, #1a1a2e 100%);
  border:1.5px solid #232946;
  border-radius:32px;
  padding:40px 36px;
  margin-bottom:48px;
  box-shadow:0 8px 32px #23294644;
  transition:box-shadow .3s,transform .3s;
  position:relative;
  overflow:hidden;
}

.profile-card:hover{
  transform:translateY(-4px) scale(1.01);
  box-shadow:0 16px 48px rgba(99,102,241,.18),0 2px 8px rgba(0,0,0,.08);
}

@media (max-width:720px){
  .profile-card{
    flex-direction:column;
    align-items:center;
    text-align:center;
    padding:24px;
    gap:20px;
  }
}

.avatar{
  width:150px;height:150px;
  border-radius:50%;
  object-fit:cover;
  border:4px solid #232946;
  box-shadow:0 8px 32px #23294644,0 2px 8px #0002;
  background:linear-gradient(135deg,#232946,#1a1a2e 80%);
  flex-shrink:0;
  transition:box-shadow .3s;
}
.avatar:hover{
  box-shadow:0 16px 48px rgba(99,102,241,.18),0 2px 8px rgba(0,0,0,.10);
}

.profile-info{flex:1}

.p-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.p-name{
  font-size:2.4rem;font-weight:900;
  margin:0;
  color:#fff;
  letter-spacing:-1px;
}

.badge{
  font-size:.9rem;padding:.45rem 1.1rem;border-radius:999px;
  font-weight:800;letter-spacing:.7px;
  background:linear-gradient(90deg,#232946,#393976 90%);
  color:#fff;
  border:1.5px solid #393976;
  box-shadow:0 4px 16px #23294644;
  text-shadow:0 1px 4px #000a;
}

.p-bio{
  margin:16px 0 0;
  color:#c7d2fe;
  font-size:1.13rem;
  line-height:1.7;
  font-weight:500;
}

.quick-stats{
  display:flex;gap:12px;flex-wrap:wrap;margin-top:18px;
}

.q-item{
  font-size:.97rem;padding:.38rem .9rem;border-radius:14px;
  background:linear-gradient(90deg,#232946 60%,#393976 100%);
  color:#fff;
  border:1px solid #393976;
  font-weight:700;
  letter-spacing:.2px;
  box-shadow:0 2px 8px #23294622;
}

/* ===== LINK GRID ===== */
.section-title{
  font-size:1.6rem;
  font-weight:900;
  color:#fff;
  margin:0 0 28px 0;
  position:relative;
  padding-bottom:12px;
}

.section-title::after{
  content:'';
  position:absolute;
  bottom:0;left:0;
  width:60px;height:3px;
  background:linear-gradient(90deg, var(--brand), var(--accent));
  border-radius:999px;
}

.link-grid{
  display:flex;
  flex-direction:column;
  gap:24px;
  margin-bottom:42px;
}

/* ===== REG CARD ===== */
.reg-card{
  display:flex;flex-direction:column;gap:18px;padding:28px;
  background:linear-gradient(120deg,#232946 70%,#1a1a2e 100%);
  border:1.5px solid #393976;
  border-radius:22px;
  box-shadow:0 4px 24px #23294622;
  transition:box-shadow .3s,transform .3s;
  position:relative;
  overflow:hidden;
}

.reg-card::before{
  content:'';position:absolute;top:-50%;left:-50%;width:200%;height:200%;
  background:radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 70%);
  transition:all .3s ease;
  pointer-events:none;
}

.reg-card:hover{
  transform:translateY(-6px) scale(1.01);
  border-color:#6366f1;
  box-shadow:0 16px 48px #6366f133,0 2px 8px #2329460a;
}

.reg-card:hover::before{
  top:-20%;left:-20%;
}

.reg-header{display:flex;gap:16px;align-items:flex-start;position:relative;z-index:1}

.reg-logo{
  width:72px;height:72px;border-radius:18px;object-fit:cover;
  background:linear-gradient(135deg,#393976,#232946);
  border:2px solid #393976;
  flex-shrink:0;
  box-shadow:0 4px 16px #23294633;
  transition:box-shadow .3s;
}
.reg-logo:hover{
  box-shadow:0 8px 32px #6366f133;
}

.reg-body{flex:1}

.reg-title{
  margin:0 0 6px;
  font-weight:800;
  font-size:1.15rem;
  color:#fff;
}

.reg-desc{
  margin:0;
  color:#c7d2fe;
  font-size:.95rem;
  line-height:1.6;
}

.reg-desc b{
  color:#22d3ee;
  font-weight:700;
}

.reg-actions{
  display:flex;gap:10px;align-items:center;flex-wrap:wrap;
  margin-top:14px;position:relative;z-index:1;
}

/* ===== BUTTONS & CHIPS ===== */
.btn, .chip{
  display:inline-flex;align-items:center;gap:8px;
  font-weight:700;cursor:pointer;
  border-radius:10px;padding:.6rem 1.1rem;
  border:none;text-decoration:none;
  transition:all .25s ease;
  font-size:.95rem;
  white-space:nowrap;
}

.btn-primary{
  background:linear-gradient(90deg,#232946,#393976 90%);
  color:#fff;
  box-shadow:0 8px 20px #23294633;
  position:relative;
  overflow:hidden;
  font-weight:800;
  border:1.5px solid #393976;
  transition:box-shadow .3s,transform .3s;
}
.btn-primary:hover{
  transform:translateY(-2px) scale(1.04);
  box-shadow:0 12px 32px #23294666;
  border-color:#22d3ee;
}

.btn-primary::before{
  content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition:left .5s;
}

.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(99,102,241,.4);
}

.btn-primary:hover::before{
  left:100%;
}

.btn-primary:active{
  transform:translateY(0);
}

.chip{
  background:#232946;
  color:#fff;
  border:1.5px solid #393976;
  font-size:.93rem;
  font-weight:700;
  transition:box-shadow .3s,transform .3s;
}
.chip:hover{
  background:#393976;
  color:#22d3ee;
  box-shadow:0 4px 16px #23294633;
  border-color:#22d3ee;
  transform:scale(1.04);
}

.chip:hover{
  background:rgba(99,102,241,.25);
  border-color:rgba(99,102,241,.5);
  box-shadow:0 4px 12px rgba(99,102,241,.15);
}

.chip:active{
  transform:scale(.98);
}

/* ===== CONTACT RAIL ===== */
.contact-rail{
  position:fixed;right:20px;bottom:32px;
  display:flex;flex-direction:column;gap:12px;z-index:50;
}

.contact-rail a{
  width:52px;height:52px;border-radius:999px;
  display:grid;place-items:center;
  color:#fff;text-decoration:none;
  background:linear-gradient(135deg, rgba(99,102,241,.2), rgba(34,211,238,.15));
  border:1.5px solid rgba(99,102,241,.3);
  box-shadow:0 12px 28px rgba(0,0,0,.3);
  transition:all .3s cubic-bezier(.4, 0, .2, 1);
  position:relative;
  overflow:hidden;
}

.contact-rail a::before{
  content:'';position:absolute;inset:0;
  background:linear-gradient(135deg, rgba(255,255,255,.1), transparent);
  pointer-events:none;
  border-radius:999px;
}

.contact-rail a:hover{
  transform:translateY(-4px)scale(1.08);
  border-color:var(--brand);
  box-shadow:0 16px 40px rgba(99,102,241,.35);
}

.contact-rail a.tg{
  background:linear-gradient(135deg, rgba(0,136,204,.2), rgba(0,136,204,.1));
  border-color:rgba(0,136,204,.4);
}

.contact-rail a.tg:hover{
  border-color:#0088cc;
  box-shadow:0 16px 40px rgba(0,136,204,.25);
}

.contact-rail a.za{
  background:linear-gradient(135deg, rgba(0,174,239,.2), rgba(0,174,239,.1));
  border-color:rgba(0,174,239,.4);
}

.contact-rail a.za:hover{
  border-color:#00aeef;
  box-shadow:0 16px 40px rgba(0,174,239,.25);
}

.contact-rail a img{
  width:65%;height:65%;
  object-fit:contain;
  display:block;
  pointer-events:none;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

@media (max-width:640px){
  .contact-rail{
    right:12px;top:auto;bottom:20px;
    flex-direction:row;
    gap:8px;
  }
  .contact-rail a{
    width:48px;height:48px;
  }
}

/* ===== TOAST ===== */
.toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%);
  background:linear-gradient(135deg, #1e293b, #0f172a);
  color:#fff;border:1px solid rgba(34,211,238,.3);
  padding:.75rem 1.5rem;border-radius:12px;
  box-shadow:0 16px 40px rgba(0,0,0,.4);
  opacity:0;pointer-events:none;transition:opacity .3s, transform .3s;
  font-weight:600;
  font-size:.95rem;
}

.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(-4px);
  pointer-events:auto;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-card {
  animation: fadeInUp 0.6s ease-out;
}

.reg-card {
  animation: fadeInUp 0.6s ease-out;
}

.reg-card:nth-child(1) { animation-delay: 0.1s; }
.reg-card:nth-child(2) { animation-delay: 0.2s; }
.reg-card:nth-child(3) { animation-delay: 0.3s; }

/* Profile page alignment with the shared product UI */
:root {
  --profile-bg: #0b1120;
  --profile-surface: #182235;
  --profile-surface-soft: #111827;
  --profile-border: rgba(148, 163, 184, 0.18);
  --profile-text: #f3f7fb;
  --profile-muted: #a9b6c8;
  --profile-accent: #38bdf8;
  --profile-primary: #5b6ee1;
  --profile-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(91, 110, 225, 0.14), transparent 32rem),
    linear-gradient(180deg, #0b1120 0%, #0f172a 60%, #0b1120 100%);
  color: var(--profile-text);
}

.page {
  max-width: 980px;
  margin-top: 92px !important;
  padding: 36px 20px 72px;
}

.profile-card,
.reg-card {
  background: linear-gradient(180deg, rgba(24, 34, 53, 0.96), rgba(17, 24, 39, 0.96));
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.profile-card {
  align-items: center;
  padding: 32px;
  margin-bottom: 38px;
}

.profile-card:hover,
.reg-card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: var(--profile-shadow);
}

.avatar {
  width: 144px;
  height: 144px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.p-head {
  gap: 10px;
}

.p-name {
  color: var(--profile-text);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: none;
  margin: 0;
}

.badge,
.q-item,
.chip {
  background: rgba(91, 110, 225, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.22);
  color: #dbeafe;
  box-shadow: none;
  text-shadow: none;
}

.p-bio,
.reg-desc {
  color: var(--profile-muted);
}

.p-bio b,
.reg-desc b {
  color: #e0f2fe;
}

.section-title {
  color: var(--profile-text);
  font-size: clamp(1.45rem, 3vw, 1.8rem);
  letter-spacing: 0;
}

.section-title::after {
  background: linear-gradient(90deg, var(--profile-primary), var(--profile-accent));
}

.link-grid {
  gap: 16px;
}

.reg-card {
  padding: 22px;
}

.reg-card::before,
.btn-primary::before {
  display: none;
}

.reg-header {
  align-items: center;
}

.reg-logo {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  border-color: var(--profile-border);
  background: rgba(255, 255, 255, 0.06);
}

.reg-title {
  color: var(--profile-text);
  line-height: 1.2;
}

.btn,
.chip {
  min-height: 42px;
  border-radius: 8px;
  letter-spacing: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--profile-primary), var(--profile-accent));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(91, 110, 225, 0.24);
}

.btn-primary:hover,
.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.48);
}

.chip:hover {
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
}

.contact-rail a,
.toast {
  border-radius: 8px;
}

@media (max-width: 720px) {
  .page {
    margin-top: 76px !important;
    padding: 24px 16px 72px;
  }

  .profile-card {
    padding: 24px 18px;
  }

  .p-head,
  .quick-stats,
  .reg-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .reg-header {
    align-items: flex-start;
  }

  .reg-actions .btn,
  .reg-actions .chip {
    width: 100%;
    justify-content: center;
  }
}
