
.profile-page {
  position: relative;
  background: var(--profile-bg-color, #000000) !important;
  color: var(--profile-text-main, #ffffff);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.profile-page-wrapper {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  background: transparent !important;
  margin: 0 !important;
  margin-top: -13px !important;
  padding: 0 !important;
  padding-top: 0 !important;
  transform: translateY(-13px);
}

.profile-main-card {
  width: 100%;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.05));
  backdrop-filter: var(--profile-card-backdrop, none);
  -webkit-backdrop-filter: var(--profile-card-backdrop, none);
  border: 1px solid var(--profile-card-border, transparent);
  border-radius: 24px;
  box-shadow: var(--profile-card-shadow, 0 20px 60px rgba(0, 0, 0, 0.3));
  overflow: visible;
  overflow-x: hidden;
  overflow-y: visible;
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.profile-main-card::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.profile-main-card::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.profile-main-card::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}


.profile--vertical .profile-main-card {
  max-width: calc(520px * 0.995);
  padding: 32px 24px;
  gap: 16px;
  min-height: calc(100vh - 20px);
}

.profile--vertical .profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  position: relative;
}

.profile--vertical .profile-card-header-actions {
  display: flex;
  gap: 8px;
  position: absolute;
  top: 0;
  right: 0;
}

[dir="ltr"] .profile--vertical .profile-card-header-actions {
  right: auto;
  left: 0;
}

.profile--vertical .profile-share-btn,
.profile--vertical .profile-layout-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--profile-text-main, #ffffff);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.profile--vertical .profile-share-btn:hover,
.profile--vertical .profile-layout-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.profile--vertical .profile-avatar-wrapper {
  margin: 0 auto 16px;
  display: flex;
  justify-content: center;
}

.profile--vertical .profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-accent, #A18CD1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.profile--vertical .profile-avatar-default {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.1));
  border: 3px solid var(--profile-accent, #A18CD1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--profile-text-main, #ffffff);
}

.profile--vertical .profile-name {
  text-align: center;
  margin-bottom: 8px;
  font-size: var(--profile-font-size-title, 24px);
  font-weight: var(--profile-font-weight-title, 700);
  line-height: 1.3;
  color: var(--profile-text-main, #ffffff);
}

.profile--vertical .profile-bio {
  text-align: center;
  margin-bottom: 20px;
  font-size: var(--profile-font-size-bio, 15px);
  line-height: 1.6;
  color: var(--profile-text-muted, rgba(255, 255, 255, 0.8));
}

.profile--vertical .profile-social {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 24px 0 20px 0;
  width: 100%;
  max-width: 100%;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 44px;
}

.profile--vertical #profile-social-top,
.profile--vertical .profile-name + .profile-social,
.profile--vertical .profile-bio + .profile-social,
.profile--vertical .profile-avatar-wrapper ~ .profile-social:first-of-type {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.profile--vertical .profile-social .social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--profile-text-main, #ffffff);
}

.profile--vertical .profile-social .social-icon:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile--vertical .profile-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
  background: transparent !important;
  padding: 0 !important;
}

.profile--vertical .profile-links:empty {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.profile--vertical .profile-links:not(:has(.link-card:not([style*="display: none"]))) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.profile--vertical .link-card {
  width: 100%;
  min-height: 64px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  border-radius: var(--profile-radius-lg, 16px);
  transition: all 0.3s ease;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(10px);
  color: var(--profile-text-main, #ffffff);
  text-decoration: none;
  box-sizing: border-box;
}

.profile--vertical .link-card:empty,
.profile--vertical .link-card .link-card-inner:empty {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.profile--vertical .link-card .link-card-inner:not(:has(.link-icon)):not(:has(.link-title)) {
  display: none !important;
}

.profile--vertical .link-card:not(:has(.link-icon)):not(:has(.link-title)) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.profile--vertical .link-card[data-empty="true"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.profile--vertical .link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--profile-accent, #A18CD1);
}

.profile--vertical .link-card-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.profile--vertical .link-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
}

.profile--vertical .link-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile--vertical .link-content {
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow: hidden;
}

[dir="ltr"] .profile--vertical .link-content {
  text-align: left;
}

.profile--vertical .link-title {
  font-weight: var(--profile-font-weight-links, 500);
  font-size: var(--profile-font-size-links, 16px);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  color: var(--profile-text-main, #ffffff);
}

.profile--vertical .link-description {
  font-size: calc(var(--profile-font-size-links, 16px) - 2px);
  opacity: 0.75;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  color: var(--profile-text-muted, rgba(255, 255, 255, 0.7));
}


.profile--vertical .profile-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  width: 100%;
}

.profile--vertical .profile-block {
  width: 100%;
  border-radius: var(--profile-radius-lg, 16px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile--vertical .profile-block iframe,
.profile--vertical .profile-block video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--profile-radius-lg, 16px);
}

.profile--vertical .profile-qr-section {
  text-align: center;
  padding: 20px 0;
  margin-bottom: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile--vertical .btn-qr-code {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid var(--profile-accent, #A18CD1);
  border-radius: 50px;
  padding: 12px 24px;
  color: var(--profile-text-main, #ffffff);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-family: var(--profile-font-family);
}

.profile--vertical .btn-qr-code:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px var(--profile-accent, #A18CD1);
  background: rgba(255, 255, 255, 0.15);
}

.profile--vertical .profile-footer {
  padding: 16px 0 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin-top: auto;
}

.profile--vertical .profile-footer .footer-powered {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--profile-text-muted, rgba(255, 255, 255, 0.6));
  font-size: 13px;
}


   Remove Empty Elements

.profile-links:empty,
.profile-blocks:empty {
  display: none !important;
}

.profile--vertical .linked-accounts-icons {
  display: none !important;
}

.profile--vertical .profile-links ~ .profile-social:not(:first-of-type),
.profile--vertical .profile-blocks ~ .profile-social:not(:first-of-type),
.profile--vertical .profile-linked-accounts ~ .profile-social:not(:first-of-type),
.profile--vertical .profile-google-card ~ .profile-social:not(:first-of-type),
.profile--vertical .profile-qr-section ~ .profile-social:not(:first-of-type) {
  display: none !important;
}

   Google Account & Linked Accounts

.profile-google-card,
.profile-linked-accounts {
  width: 100%;
  margin-bottom: 16px;
}

.profile-google-card-link {
  display: block;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 20px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--profile-card-shadow, 0 18px 45px rgba(0, 0, 0, 0.50));
  backdrop-filter: blur(10px);
}

.profile-google-card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--profile-card-shadow, 0 24px 60px rgba(0, 0, 0, 0.60));
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.08));
}

.linked-account-primary-card {
  display: block;
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--profile-card-border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--profile-card-shadow, 0 8px 24px rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.linked-account-primary-card.discord-special-card {
  padding: 18px 20px;
}

.linked-account-primary-card.discord-special-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--profile-card-shadow, 0 12px 32px rgba(0, 0, 0, 0.4));
}

.linked-account-primary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--profile-card-shadow, 0 24px 60px rgba(0, 0, 0, 0.60));
  background: var(--profile-card-bg, rgba(255, 255, 255, 0.08));
}

.linked-accounts-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.linked-account-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.linked-account-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .profile-page {
    padding: 16px 12px;
  }
  
  .profile-main-card {
    border-radius: 20px;
  }
  
  .profile-header {
    padding: 20px 16px;
  }
  
  .profile-avatar {
    width: 80px;
    height: 80px;
  }
  
  .profile-avatar-default {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  
  .profile-name {
    font-size: 20px;
  }
  
  .profile-bio {
    font-size: 14px;
  }
  
  .profile-links {
    padding: 16px;
    gap: 12px;
  }
  
  .link-card {
    padding: 14px 16px;
    border-radius: 16px;
  }
  
  .link-title {
    font-size: 15px;
  }
  
  .link-description {
    font-size: 13px;
  }
  
  .social-links {
    padding: 16px;
    gap: 12px;
  }
  
  .social-link {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  
  .linked-account-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .profile-page {
    padding: 12px 8px;
  }
  
  .profile-main-card {
    border-radius: 16px;
  }
  
  .profile-header {
    padding: 16px 12px;
  }
  
  .profile-avatar {
    width: 70px;
    height: 70px;
  }
  
  .profile-avatar-default {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
  
  .profile-name {
    font-size: 18px;
  }
  
  .profile-bio {
    font-size: 13px;
  }
  
  .profile-links {
    padding: 12px;
    gap: 10px;
  }
  
  .link-card {
    padding: 12px 14px;
    border-radius: 14px;
  }
  
  .link-title {
    font-size: 14px;
  }
  
  .link-description {
    font-size: 12px;
  }
  
  .social-links {
    padding: 12px;
    gap: 10px;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .linked-account-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
