* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }

:root {
  --bg1: #667eea;
  --bg2: #764ba2;
  --btn-bg: rgba(255,255,255,0.95);
  --btn-text: #1a1a1a;
  --btn-hover: #ffffff;
  --text: #ffffff;
  --overlay: rgba(0,0,0,0);
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  padding: 40px 20px 100px;
  color: var(--text);
  transition: background 0.5s ease, color 0.3s ease;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--overlay);
  pointer-events: none;
  z-index: 0;
}

body.mode-dark {
  --text: #ffffff;
  --overlay: rgba(0,0,0,0.55);
}

body.mode-dark .search-wrap input,
body.mode-dark .link-btn {
  backdrop-filter: blur(20px);
}

.container {
  width: 100%;
  max-width: 680px;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

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

/* LOADER */
#loader {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999; transition: opacity 0.5s, visibility 0.5s;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-spinner {
  width: 50px; height: 50px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PROFILE */
.profile { margin-bottom: 20px; }
.avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.avatar {
  width: 100px; height: 100px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.6);
  object-fit: cover; transition: transform 0.3s; background: #ddd;
}
.avatar:hover { transform: scale(1.05) rotate(3deg); }
.verified {
  position: absolute; bottom: 4px; right: 4px;
  background: #1DA1F2; color: #fff;
  width: 26px; height: 26px; border-radius: 50%;
  display: none; justify-content: center; align-items: center;
  font-size: 14px; font-weight: bold; border: 2px solid #fff;
}
.verified.show { display: flex; }
#username { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
#bio { font-size: 14px; opacity: 0.9; margin-bottom: 16px; padding: 0 20px; line-height: 1.6; }

/* SOCIALS */
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.socials a {
  color: var(--text); font-size: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  transition: all 0.3s;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
}
.socials a:hover { transform: translateY(-5px) scale(1.1); background: rgba(255,255,255,0.3); }

/* SEARCH */
.search-wrap { position: relative; margin-bottom: 20px; }
.search-wrap i {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: rgba(0,0,0,0.4); font-size: 14px;
}
#searchInput {
  width: 100%; padding: 14px 18px 14px 44px;
  border-radius: 12px; border: none;
  background: var(--btn-bg); color: var(--btn-text);
  font-size: 14px; outline: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transition: all 0.3s;
}
#searchInput:focus { box-shadow: 0 6px 24px rgba(0,0,0,0.2); transform: translateY(-2px); }

/* LINKS */
.links { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.link-btn {
  display: flex; align-items: center; justify-content: center;
  position: relative; padding: 18px 55px;
  background: var(--btn-bg); color: var(--btn-text);
  text-decoration: none; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  overflow: hidden;
  animation: fadeInUp 0.5s ease backwards;
}
.link-btn:hover { transform: scale(1.03); background: var(--btn-hover); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.link-btn:active { transform: scale(0.98); }
.link-btn i.left-icon { position: absolute; left: 20px; font-size: 18px; }
.link-btn i.right-icon { position: absolute; right: 20px; font-size: 13px; opacity: 0.5; }
.link-btn.highlight { animation: pulse 2s infinite, fadeInUp 0.5s ease backwards; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
  50% { box-shadow: 0 4px 24px rgba(255,255,255,0.5); }
}
.link-btn.hidden { display: none; }

/* EMBEDS */
.embeds { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.embed-card {
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 10px;
}
.embed-card iframe { width: 100%; border: none; border-radius: 8px; display: block; }

/* QR */
.qr-section { margin-bottom: 30px; }
.qr-toggle {
  background: rgba(255,255,255,0.15); color: var(--text);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 12px 20px; border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.qr-toggle:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
.qr-box { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.5s; margin-top: 0; }
.qr-box.show { max-height: 400px; padding: 20px; margin-top: 15px; }
#qrcode { background: #fff; padding: 15px; border-radius: 12px; display: inline-block; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.qr-box p { margin-top: 10px; font-size: 13px; opacity: 0.8; }

/* FOOTER */
.footer { margin-top: 20px; padding-top: 20px; }
.logo { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 700; font-size: 15px; }
.copyright { font-size: 11px; opacity: 0.6; margin-top: 8px; }

/* FLOATING */
.floating {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; z-index: 100;
}
.float-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: none; background: #fff; color: #764ba2;
  font-size: 17px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  transition: all 0.3s;
  display: flex; justify-content: center; align-items: center;
  text-decoration: none;
}
.float-btn:hover { transform: scale(1.15) rotate(8deg); background: #f0f0f0; }
#topBtn { opacity: 0; visibility: hidden; }
#topBtn.show { opacity: 1; visibility: visible; }
.admin-btn { background: #1a1a1a; color: #fff; }
.admin-btn:hover { background: #333; }

/* VIDEO PAGE */
.video-page {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 500;
  display: none;
  justify-content: center; align-items: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
.video-page.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.video-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff;
  border: none; font-size: 20px; cursor: pointer;
  transition: all 0.3s;
}
.video-close:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }
.video-content { width: 100%; max-width: 900px; }
.video-content iframe, .video-content video {
  width: 100%; aspect-ratio: 16/9;
  border: none; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1a1a1a; color: #fff;
  padding: 14px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: transform 0.4s ease;
  z-index: 1000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) {
  body { padding: 20px 14px 90px; }
  .avatar { width: 85px; height: 85px; }
  #username { font-size: 17px; }
  .link-btn { padding: 16px 50px; font-size: 14px; }
  .float-btn { width: 44px; height: 44px; font-size: 15px; }
  .floating { bottom: 16px; right: 16px; gap: 8px; }
}