:root {
  --bg: #0a0a0a;
  --card: rgba(255,255,255,0.05);
  --accent: #7c6fff;
  --accent2: #a78bfa;
  --text: #f0f0ff;
  --muted: rgba(200,200,240,0.55);
  --border-e: rgba(120,120,255,0.12);
  --surface-e: rgba(10,10,22,0.97);
}

/* ── Editor typography ── */
#editor h2, #leftEditor h2, #editorContentMobile h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f0f0ff;
  margin: 0 0 16px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(120,120,255,0.1);
}

#editor h3, #leftEditor h3, #editorContentMobile h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(167,139,250,0.8);
  margin: 20px 0 8px 0;
}

#editor label, #leftEditor label, #editorContentMobile label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(200,200,240,0.5);
  margin-top: 12px;
  display: block;
}

#resizeHandle:hover {
  background: rgba(124,111,255,0.2);
}

#leftResizeHandle:hover {
  background: rgba(124,111,255,0.2);
}

#statsChart {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 10px;
}

.link {
  display: block;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: white;
  text-decoration: none;
  transition: 0.3s;

  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}

.link:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(99,102,241,0.2);
}

* { box-sizing: border-box; }

.dropdown {
  position: relative;
}

#leftEditor {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 100vh;

  transform: translateX(-100%); 
  transition: transform 0.35s;

  background: rgba(10,10,22,0.97);
  backdrop-filter: blur(28px);
  box-shadow: 1px 0 0 rgba(120,120,255,0.12), 24px 0 80px rgba(0,0,0,0.6);
  border-right: 1px solid rgba(120,120,255,0.1);

  overflow: visible;
}

#leftEditor.active {
  transform: translateX(0);
}

#leftContent {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}


.dropdown-content {
  display: none;
  position: absolute;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: rgba(10,10,22,0.98);
  border: 1px solid rgba(120,120,255,0.18);
  border-radius: 12px;
  padding: 8px;
  z-index: 999;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.dropdown-content.active {
  display: block;
}

.dropdown-item {
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.15s;
  background: transparent;
  font-size: 0.88rem;
}

.dropdown-item:hover {
  background: rgba(124,111,255,0.12);
}

#bottomBar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(10,10,22,0.92);
  backdrop-filter: blur(24px);

  border-radius: 999px;
  padding: 8px 14px;

  border: 1px solid rgba(120,120,255,0.15);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);

  display: flex;
  gap: 8px;

  z-index: 9999;
}

#closeBottomBtn {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;

  padding: 8px 14px;
  border-radius: 999px;

  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;

  transition: 0.2s;
}

#closeBottomBtn:hover {
  background: rgba(239,68,68,0.4);
  transform: scale(1.04);
}


body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #1a1a2e, #0a0a0a);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: -1;
}

#editor {
  font-family: 'Inter', sans-serif;
}

.font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.font-option {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(120,120,255,0.1);
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  font-size: 0.85rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(10,10,22,0.97);
  border: 1px solid rgba(120,120,255,0.15);
  padding: 24px;
  border-radius: 20px;
  width: 300px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  text-align: center;
}

#editBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;

  align-items: center;
  justify-content: center;
  gap: 8px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);

  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;

  font-weight: 600;

  cursor: pointer;
  box-shadow: 0 10px 30px rgba(99,102,241,0.4);

  white-space: nowrap;

  height: 70px;      
  padding: 0 24px;  
  font-size: 1.1rem; 
  display: none;
}

#editBtn i {
  display: flex;
  align-items: center;
}

.widget-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.widget-modal.active {
  display: flex;
}

.icon-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  color: white;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  cursor: pointer;

  transition: 0.2s;
}

.icon-btn:hover {
  background: rgba(99,102,241,0.4);
  transform: scale(1.1);
}

.icon-btn i {
  width: 20px;
  height: 20px;
}

.widget-container {
  width: 90%;
  max-width: 900px;
  height: 80%;
  background: rgba(10,10,22,0.97);
  border: 1px solid rgba(120,120,255,0.15);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
}

#editAge {
  margin-bottom: 40px;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.widget-header h2 {
  margin: 0;
}

.widget-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  font-size: 16px;
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  transition: 0.2s;
}

.widget-close:hover {
  background: rgba(239,68,68,0.25);
  border-color: rgba(239,68,68,0.3);
}

.widget-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  overflow-y: auto;
}

.widget-card {
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(120,120,255,0.1);
  transition: 0.25s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.widget-card:hover {
  transform: translateY(-5px);
  background: rgba(124,111,255,0.1);
  border-color: rgba(124,111,255,0.3);
}

.widget-card img {
  width: 40px;
  margin: 0 auto 10px;
}

.widget-card h3 {
  margin: 10px 0;
}

.widget-card button {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  border: none;
  background: rgba(124,111,255,0.7);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: 0.2s;
}

.widget-card button:hover {
  background: rgba(124,111,255,1);
  transform: translateY(-1px);
}

#editBtn:hover {
  transform: translateY(-3px) scale(1.04);

  background: rgba(99,102,241,0.25);

  box-shadow: 
    0 15px 40px rgba(99,102,241,0.4),
    inset 0 0 12px rgba(255,255,255,0.15);
}

#editBtn:active {
  transform: scale(0.96);
}
.font-option:hover {
  transform: translateY(-2px);
  background: rgba(124,111,255,0.08);
  border-color: rgba(124,111,255,0.25);
}

.font-option.active {
  border: 1px solid rgba(124,111,255,0.6);
  background: rgba(124,111,255,0.15);
}

.profile {
  width: 100%;
  max-width: 520px;
  text-align: center;

  transition: 0.3s;

  opacity: 1;

  animation: slideIn 0.6s ease;
}

#resizeHandle {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
}

#resizeHandle:hover {
  background: rgba(99,102,241,0.3);
}

.header {
  background: rgba(255,255,255,0.04);
  border-radius: 30px;
  padding: 2.5rem 2rem;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  position: relative;

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  transform: translateZ(0);
  will-change: transform;
}

.views-badge {
  position: absolute;
  top: 15px;
  right: 15px;

  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;

  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,0.1);
}

#avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

#editorContent {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
}


#name { font-size: 1.8rem; font-weight: 700; margin: 0.5rem 0; }
#bio { font-size: 0.95rem;  white-space: pre-line; color: var(--muted); margin-bottom: 1rem; }

#links {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link {
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 18px;
  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.08),
      rgba(255,255,255,0.03)
    );

  border: 1px solid rgba(255,255,255,0.08);

  color: white;
  text-decoration: none;

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;

  box-shadow:
    0 8px 30px rgba(0,0,0,0.25);

  isolation: isolate;
}

.link::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      135deg,
      rgba(99,102,241,0.18),
      rgba(139,92,246,0.12),
      transparent 70%
    );

  opacity: 0;
  transition: opacity 0.25s ease;

  z-index: -1;
}

.link::after {
  content: "";

  position: absolute;
  top: -50%;
  left: -120%;

  width: 80px;
  height: 200%;

  background: rgba(255,255,255,0.12);

  transform: rotate(25deg);

  transition: 0.7s;
}

.link:hover::after {
  left: 140%;
}


.font-option[data-font="Inter"] {
  font-family: 'Inter', sans-serif;
}

.font-option[data-font="Poppins"] {
  font-family: 'Poppins', sans-serif;
}

#linkModal.active ~ #toastContainer {
  z-index: 2147483647 !important;
}

#toastContainer {
  position: fixed;
  top: 25px;
  right: 25px;

  display: flex;
  flex-direction: column;
  gap: 14px;

  z-index: 1000;
}


@media (max-width: 768px) {

  #toastContainer {
    top: auto !important;
    bottom: 15px;
    left: 15px;
    right: 15px;

    align-items: center;
  }

  .toast {
    width: 100%;
  }
}

.toast {

  position: relative;

  width: 340px;
  overflow: hidden;

  display: flex;
  align-items: flex-start;
  gap: 14px;

  padding: 18px;

  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      rgba(20,20,35,0.96),
      rgba(15,15,25,0.92)
    );

  backdrop-filter: blur(30px);

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);

  animation:
    toastSlide 0.45s cubic-bezier(.19,1,.22,1);

  isolation: isolate;
}

.toast-glow {
  position: absolute;
  inset: 0;

  opacity: 0.15;
  filter: blur(40px);

  z-index: -1;
}

.toast.success .toast-glow {
  background: #22c55e;
}

.toast.error .toast-glow {
  background: #ef4444;
}

.toast.warning .toast-glow {
  background: #f59e0b;
}

.toast.info .toast-glow {
  background: #6366f1;
}

.toast.success {
  border-left: 3px solid #22c55e;
}

.toast.error {
  border-left: 3px solid #ef4444;
}

.toast-icon {

  min-width: 52px;
  min-height: 52px;

  border-radius: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.05);

  border: 1px solid rgba(255,255,255,0.06);

  backdrop-filter: blur(10px);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.toast-icon i {
  width: 24px;
  height: 24px;
}

.toast.success .toast-icon i {
  color: #22c55e;
}

.toast.error .toast-icon i {
  color: #ef4444;
}

.toast.warning .toast-icon i {
  color: #f59e0b;
}

.toast.info .toast-icon i {
  color: #818cf8;
}

.toast-content {
  flex: 1;
}

.toast-title {

  font-size: 15px;
  font-weight: 700;

  color: white;

  margin-bottom: 4px;

  letter-spacing: 0.3px;
}

.toast-message {

  color: rgba(255,255,255,0.7);

  line-height: 1.5;

  font-size: 14px;
}

.toast-close {

  background: transparent;
  border: none;

  color: rgba(255,255,255,0.4);

  cursor: pointer;

  transition: 0.2s;

  font-size: 16px;
}

.toast-close:hover {
  color: white;
  transform: scale(1.15);
}


.toast-progress {

  position: absolute;
  left: 0;
  bottom: 0;

  height: 4px;
  width: 100%;

  transform-origin: left;

  animation: toastProgress 4.5s linear forwards;
}

.toast.success .toast-progress {
  background: linear-gradient(90deg,#22c55e,#4ade80);
}

.toast.error .toast-progress {
  background: linear-gradient(90deg,#ef4444,#f87171);
}

.toast.warning .toast-progress {
  background: linear-gradient(90deg,#f59e0b,#fbbf24);
}

.toast.info .toast-progress {
  background: linear-gradient(90deg,#6366f1,#8b5cf6);
}

.toast-remove {
  animation: toastOut 0.35s ease forwards;
}

@keyframes toastSlide {

  from {
    opacity: 0;
    transform:
      translateX(120px)
      scale(0.9);
  }

  to {
    opacity: 1;
    transform:
      translateX(0)
      scale(1);
  }
}

@keyframes toastOut {

  to {
    opacity: 0;
    transform:
      translateX(120px)
      scale(0.9);
  }
}

@keyframes toastProgress {

  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

.toast:hover {

  transform:
    translateY(-4px)
    scale(1.01);

  border-color:
    rgba(255,255,255,0.12);

  box-shadow:
    0 25px 70px rgba(0,0,0,0.55);
}

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

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(10px); }
}

.font-option[data-font="Roboto"] {
  font-family: 'Roboto', sans-serif;
}

.font-option[data-font="Montserrat"] {
  font-family: 'Montserrat', sans-serif;
}

.font-option[data-font="Fredoka"] {
  font-family: 'Fredoka', sans-serif;
}

.font-option[data-font="Syne"] {
  font-family: 'Syne', sans-serif;
}

.font-option[data-font="Playfair Display"] {
  font-family: 'Playfair Display', serif;
}

.font-option[data-font="Pacifico"] {
  font-family: 'Pacifico', cursive;
}

.font-option[data-font="Space Grotesk"] {
  font-family: 'Space Grotesk', sans-serif;
}

.font-option[data-font="Outfit"] {
  font-family: 'Outfit', sans-serif;
}

#editBtn .icon {
  display: flex;
  align-items: center;
}

.bg-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(120,120,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-wrapper {
  display: flex;
}

.file-btn {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  text-align: center;
  background: rgba(124,111,255,0.1);
  border: 1px solid rgba(124,111,255,0.25);
  color: white;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 600;
  font-size: 0.88rem;
}

.file-btn:hover {
  background: rgba(124,111,255,0.2);
  border-color: rgba(124,111,255,0.4);
  transform: translateY(-1px);
}

.file-btn input {
  display: none;
}

.link:hover {
  transform:
    translateY(-4px)
    scale(1.015);

  border-color: rgba(99,102,241,0.35);

  background:
    linear-gradient(
      135deg,
      rgba(99,102,241,0.18),
      rgba(139,92,246,0.12)
    );

  box-shadow:
    0 15px 40px rgba(99,102,241,0.18),
    0 10px 30px rgba(0,0,0,0.35);
}

.link:hover::before {
  opacity: 1;
}

.link-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.link-content img,
.link-content i {
  width: 22px;
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0.95;
}

.link-arrow {
  opacity: 0.45;
  transition: 0.25s ease;
}

.link:hover .link-arrow {
  transform: translateX(4px);
  opacity: 1;
}


.link span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.footer {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.mobile-close {
  display: none;
}

#leftResizeHandle {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
}

#leftResizeHandle:hover {
  background: rgba(99,102,241,0.3);
}

.footer a:hover {
  color: white;
}

#editBtn:hover { transform: scale(1.05); }

#editor {
  position: fixed;
  top: 0;
  z-index: 99999 !important;
  right: 0; 
  width: 380px;
  height: 100vh;

  transform: translateX(100%);
  transition: transform 0.35s, width 0.1s;

  background: rgba(10,10,22,0.97);
  backdrop-filter: blur(28px);
  box-shadow: -1px 0 0 rgba(120,120,255,0.12), -24px 0 80px rgba(0,0,0,0.6);
  border-left: 1px solid rgba(120,120,255,0.1);
}

#editor.active {
  transform: translateX(0);
}



#editor h2 { margin-top: 0; }

input {
  width: 100%;
  padding: 10px 14px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(120,120,255,0.15);
  background: rgba(255,255,255,0.04);
  color: white;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

input:focus {
  border-color: rgba(124,111,255,0.5);
  background: rgba(124,111,255,0.06);
}

.linkEdit {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(120,120,255,0.1);
  border-radius: 14px;
  margin-bottom: 10px;

  overflow: visible;

  transition: 0.2s ease;
}

.linkEdit:hover {
  border-color: rgba(124,111,255,0.25);
  transform: translateY(-1px);
}

.linkEdit.active {
  z-index: 20000;
  overflow: visible;
}

.linkPreview {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;

  cursor: grab;
}

.linkPreviewLeft {
  display: flex;
  align-items: center;
  gap: 12px;
}

.linkPreviewLeft img,
.linkPreviewLeft i {
  width: 20px;
  height: 20px;
}

.linkTitle {
  font-weight: 600;
  font-size: 14px;
}

.linkType {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 2px;
}

.linkActions {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-right: 16px;
}

.socialDropdown {
  position: relative;
  margin-top: 10px;
  z-index: 99999;
}

.socialSelected {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 14px;
  border-radius: 12px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,120,255,0.15);

  cursor: pointer;
  transition: 0.2s ease;
}

.socialSelected:hover {
  border-color: rgba(124,111,255,0.4);
  background: rgba(124,111,255,0.08);
  transform: translateY(-1px);
}

.socialSelectedLeft {
  display: flex;
  align-items: center;
  gap: 12px;

  font-weight: 600;
}

.socialSelectedLeft span:first-child {
  font-size: 20px;
}

.socialArrow {
  opacity: 0.5;
  transition: 0.2s;
}

.socialMenu {

  position: absolute;
  z-index: 100000;

  left: 0;
  width: 100%;
  padding: 6px;

  backdrop-filter: blur(24px);
  border: 1px solid rgba(120,120,255,0.18);
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;

  top: calc(100% + 6px);
  background: rgba(10,10,22,0.98);
  border-radius: 12px;
  overflow: hidden;
}



.socialMenu.active {
  opacity: 1;
  visibility: visible;

  transform: translateY(0);
}

.socialItem {
  padding: 12px 14px;

  border-radius: 14px;

  cursor: pointer;

  transition: 0.2s ease;
}

.socialItem:hover {
  background: rgba(124,111,255,0.12);
  border-radius: 8px;
  transform: translateX(3px);
}

.socialItemLeft {
  display: flex;
  align-items: center;
  gap: 12px;

  font-weight: 500;
}

.socialItemLeft span:first-child {
  font-size: 18px;
}

.linkEditContent select {
  width: 100%;
  margin-top: 10px;
  padding: 12px;

  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.04);

  color: white;

  outline: none;
}

.linkMiniBtn {
  border: none;

  background: rgba(255,255,255,0.06);

  color: white;

  width: 34px;
  height: 34px;

  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  transition: 0.2s ease;
}

.linkMiniBtn:hover {
  background: rgba(99,102,241,0.18);

  transform: scale(1.05);
}

.linkMiniBtn.delete:hover {
  background: rgba(255,0,0,0.18);
}

.linkEditContent {
  max-height: 0;
  overflow: visible;
  opacity: 0;

  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    padding 0.25s ease;

  padding: 0 16px;
}

.linkEdit.active .linkEditContent {
  max-height: 500px;

  opacity: 1;

  padding: 0 16px 16px 16px;
}

.linkEditContent input {
  width: 100%;

  margin-top: 10px;

  padding: 12px;

  border-radius: 12px;

  border: 1px solid rgba(255,255,255,0.08);

  background: rgba(255,255,255,0.04);

  color: white;
}

.dragHandle {
  opacity: 0.35;
  margin-right: 4px;
}


@media (max-width: 768px) {

  body {
    padding: 1.2rem;
  }

  #userBox {
    display: none !important;
  }

  #editor,
  #leftEditor {
    position: fixed;
    z-index: 99998 !important;
    top: 0;
    left: 0;
    right: 0;

    width: 100% !important;
    height: 100vh;

    transform: translateY(100%);
    transition: transform 0.35s ease;

    border-radius: 0;
    box-shadow: none;

    overflow-y: auto;
  }

  #editor.active,
  #leftEditor.active {
    transform: translateY(0);
  }

  #resizeHandle,
  #leftResizeHandle {
    display: none;
  }

    #editorContent,
  #leftContent,
  #editorContentMobile {
    padding: 26px 20px 120px;
  }

  #leftEditor {
    top: auto;
    bottom: 0;
    
    background: rgba(10,10,22,0.98);
    border-top: 1px solid rgba(120,120,255,0.12);
  }

    .header {
    padding: 2rem 1.4rem;
    margin-inline: 6px;
  }

  .mobile-close {
    position: sticky;
    top: 0;
    width: 100%;

    justify-content: flex-end;

    padding: 14px 20px;
    display: flex;

    font-size: 18px;
    cursor: pointer;

    background: rgba(10,10,22,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(120,120,255,0.1);

    z-index: 10;
  }

#editorContent,
#leftContent {
  padding: 24px 28px;
}

  #editBtn {
    bottom: 15px;
    right: 15px;

    height: 60px;
    padding: 0 18px;
    font-size: 1rem;
  }

  .profile {
    max-width: 100%;
  }

  .header {
    padding: 2rem 1.2rem;
    border-radius: 24px;
  }

  #avatar {
    width: 90px;
    height: 90px;
  }

  #name {
    font-size: 1.5rem;
  }

  #bio {
    font-size: 0.9rem;
  }

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

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;

  border-radius: 12px;
  border: none;

  font-weight: 600;
  font-size: 0.9rem;

  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.link-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,120,255,0.12);
}

.link-btn:hover {
  transform: translateY(-2px);
  background: rgba(124,111,255,0.1);
  border-color: rgba(124,111,255,0.25);
}

.widget-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(120,120,255,0.12);
}

.widget-btn:hover {
  transform: translateY(-2px);
  background: rgba(124,111,255,0.1);
  border-color: rgba(124,111,255,0.25);
}

.btn i {
  width: 18px;
  height: 18px;
}

.add { background: rgba(124,111,255,0.5); border: 1px solid rgba(124,111,255,0.3); }
.add:hover { background: rgba(124,111,255,0.7) !important; }
.save { background: #7c6fff; }
.close { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08); }
.remove { background: rgba(255,0,0,0.12); border: 1px solid rgba(255,0,0,0.15); color: #ff8080; margin-top: 5px; }

@keyframes slideIn {
  from {
    transform: translateY(20px);
  }
  to {
    transform: translateY(0);
  }
}

.user-box {
  position: fixed;
  bottom: 25px;
  left: 25px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 14px;
  border-radius: 16px;

  background: rgba(10,10,22,0.9);
  backdrop-filter: blur(24px);

  border: 1px solid rgba(120,120,255,0.15);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);

  z-index: 9999;
  animation: slideUp 0.4s ease;
}

.user-box img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.user-box-info {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.user-box-info strong {
  font-size: 14px;
  color: white;
}

.user-box button {
  margin-left: 8px;
  padding: 7px 12px;

  border-radius: 999px;
  border: none;

  background: rgba(124,111,255,0.7);
  color: white;

  font-size: 12px;
  font-weight: 600;

  cursor: pointer;
  transition: 0.2s;
}

.user-box button:hover {
  background: rgba(124,111,255,1);
  transform: scale(1.04);
}

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

textarea {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 10px;

  border: 1px solid rgba(120,120,255,0.15);
  background: rgba(255,255,255,0.04);
  color: white;

  outline: none;
  resize: none;

  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;

  transition: border-color 0.2s, background 0.2s;
}

textarea:focus {
  border-color: rgba(124,111,255,0.5);
  background: rgba(124,111,255,0.06);
}

.tags-container{
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tags-search {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  outline: none;
  margin: 15px 0;
  background: rgba(255,255,255,0.06);
  color: white;
}


.tags-section{
  margin-bottom: 20px;
}

.tags-category-title {
  font-size: 1.1rem;
  font-weight: 700;

  margin-bottom: 15px;

  display: flex;
  align-items: center;
  gap: 10px;

  opacity: 0.9;
}

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-chip {
  padding: 12px 18px;

  border-radius: 999px;

  background: rgba(255,255,255,0.04);

  border: 1px solid rgba(255,255,255,0.08);

  cursor: pointer;

  transition: all 0.25s ease;

  font-size: 14px;
  font-weight: 600;

  backdrop-filter: blur(12px);

  user-select: none;
}

.tag-chip:hover {
  transform: translateY(-3px) scale(1.04);

  background: rgba(99,102,241,0.18);

  border-color: rgba(99,102,241,0.4);
}

.tag-chip.active {

  background:
    linear-gradient(
      135deg,
      rgba(99,102,241,0.8),
      rgba(139,92,246,0.8)
    );

  border-color: transparent;

  box-shadow:
    0 10px 25px rgba(99,102,241,0.35);

  transform: scale(1.03);
}

.tag-chip.active:hover {
  transform: scale(1.08);
}

#tagsCategories{
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;

  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
}

#tagsCategories::-webkit-scrollbar{
  width: 6px;
}

#tagsCategories::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}

.draggable-link {
  position: relative;
  cursor: grab;
  transition: 0.2s;
}

.draggable-link:active {
  cursor: grabbing;
}

.draggable-link.dragging {
  opacity: 0.4;
  transform: scale(0.98);
}

.draggable-link.drag-over {
  border: 2px dashed #6366f1;
  background: rgba(99,102,241,0.08);
}

.dragHandle {
  position: absolute;
  top: 10px;
  right: 10px;

  font-size: 18px;
  opacity: 0.5;

  user-select: none;
  pointer-events: none;
}

.btn.remove {
  margin-top: 4px;

  background: rgba(255,0,0,0.12);

  border: 1px solid rgba(255,0,0,0.18);

  color: #ff8080;
}

.btn.remove:hover {
  background: rgba(255,0,0,0.2);

  transform: translateY(-2px);
}


/* ── Widget Config Modal redesign ── */
.wc-container {
  max-width: 480px;
  width: 90%;
  height: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.wc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(120,120,255,0.1);
}

.wc-service-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wc-service-badge img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.wc-service-badge span {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f0ff;
  letter-spacing: -0.01em;
}

.wc-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 22px 0;
}

.wc-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid rgba(120,120,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(200,200,240,0.55);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.wc-tab:hover {
  background: rgba(124,111,255,0.1);
  color: rgba(200,200,240,0.85);
  border-color: rgba(124,111,255,0.25);
}

.wc-tab.active {
  background: rgba(124,111,255,0.18);
  border-color: rgba(124,111,255,0.45);
  color: #f0f0ff;
}

.wc-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 22px 22px;
}

.wc-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(120,120,255,0.15);
  border-radius: 12px;
  color: #f0f0ff;
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  transition: 0.2s;
}

.wc-input:focus {
  border-color: rgba(124,111,255,0.5);
  background: rgba(124,111,255,0.07);
}

.wc-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wc-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(120,120,255,0.15);
  border-radius: 12px;
  transition: 0.2s;
}

.wc-search-box:focus-within {
  border-color: rgba(124,111,255,0.5);
  background: rgba(124,111,255,0.07);
}

.wc-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f0f0ff;
  font-size: 0.9rem;
}

.wc-search-input::placeholder {
  color: rgba(200,200,240,0.35);
}

.wc-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.wc-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 13px;
  border: none;
  background: linear-gradient(135deg, rgba(124,111,255,0.85), rgba(99,102,241,0.9));
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 20px rgba(124,111,255,0.3);
}

.wc-confirm-btn:hover {
  background: linear-gradient(135deg, rgba(124,111,255,1), rgba(99,102,241,1));
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124,111,255,0.45);
}


.spotify-result {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px;
  margin-top: 10px;

  border-radius: 14px;

  background: rgba(255,255,255,0.04);

  cursor: pointer;

  transition: 0.2s;
}

.spotify-result:hover {

  background: rgba(99,102,241,0.2);

  transform: translateY(-2px);
}

.spotify-result img {

  width: 55px;
  height: 55px;

  border-radius: 10px;
  object-fit: cover;
}

.spotify-result-info {

  display: flex;
  flex-direction: column;
}

.spotify-result-info span {

  opacity: 0.65;
  font-size: 13px;
}