/* ============================================================
   styles.css — alex.creates Profile Page
   ============================================================ */

/* ── RESET & VARIABLES ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0b0b0d;
  --bg-card:     #121215;
  --bg-card-alt: #18181c;
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.14);
  --text:        #f0f0f2;
  --text-muted:  #7a7a8c;
  --text-dim:    #4a4a5a;
  --accent:      #3b82f6;
  --accent-glow: rgba(59,130,246,0.25);
  --accent-dark: #1d4ed8;
  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   24px;
  --font-display:'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── GRAIN OVERLAY ──────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ── FADE-IN ANIMATION ──────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

/* ── MAIN LAYOUT ────────────────────────────────────────────── */
.profile-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 20px 120px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #1a1a2e;
  position: relative;
  z-index: 1;
}
.creator-logo-img {
  height: auto;
  width: auto;
  cursor: pointer;
  border-radius: 8px;
  transition: opacity 0.2s ease;
  margin-left: 4px;
}
.username {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 600;
}

.verified-badge {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.verified-badge svg {
  width: 100%;
  height: 100%;
}

.creator-logo-img:hover {
  opacity: 0.85;
}
.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c3de0, #e91e8c, #f9a825);
  z-index: 0;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* mask: make ring look like a border */
.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
}

.avatar-wrap .avatar { position: relative; z-index: 2; }

.profile-title { display: flex; flex-direction: column; gap: 2px; }

.username {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.handle {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── BIO ─────────────────────────────────────────────────────── */
.bio p {
  font-size: 0.95rem;
  color: #c0c0cc;
  font-weight: 300;
  line-height: 1.7;
  padding-left: 2px;
}

/* ── STATS ───────────────────────────────────────────────────── */
.stats {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 0;
  overflow: hidden;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-num sup {
  font-size: 0.75rem;
  vertical-align: super;
  color: var(--accent);
  font-weight: 600;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── PLATFORM ────────────────────────────────────────────────── */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  transition: border-color var(--transition), transform var(--transition);
  cursor: default;
}

.platform-badge:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.platform-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}

.platform-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.platform-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 600;
}

/* ── ACTIONS ─────────────────────────────────────────────────── */
.actions {
  display: flex;
  gap: 12px;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  flex: 1.3;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.4);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  flex: 1;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-alt);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* ── SECTION LABEL ───────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ── CAROUSEL ────────────────────────────────────────────────── */
.carousel-wrap { overflow: hidden; }

.carousel {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.45, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/2;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.carousel-slide:hover img { transform: scale(1.03); }

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  opacity: 0;
  transition: opacity var(--transition);
}

.carousel-slide:hover .slide-overlay { opacity: 1; }

.slide-overlay span {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* DOTS */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text-dim);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
}

.carousel-dot.active {
  background: var(--accent);
  width: 22px;
}

/* ── STICKY BOTTOM BAR ───────────────────────────────────────── */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px 20px;
  background: linear-gradient(to top, var(--bg) 65%, transparent);
  display: flex;
  justify-content: center;
  z-index: 100;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.sticky-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.btn-sticky {
  max-width: 320px;
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  box-shadow: 0 8px 32px rgba(59,130,246,0.3), 0 0 0 1px rgba(59,130,246,0.2);
}

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 32px 28px 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(40px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}

.modal-close:hover { color: var(--text); border-color: var(--border-hover); }

.modal-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* STEPS */
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 7px;
  padding: 5px 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.step-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.step-body em { color: #c0c0ff; font-style: normal; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a35; border-radius: 999px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (min-width: 520px) {
  .profile-page { padding: 56px 32px 120px; }
  .modal { border-radius: var(--radius-lg); max-width: 420px; margin: auto; }
  .modal-backdrop { align-items: center; padding: 20px; }
}
