/* Accounts Manager Styling */
.accounts-header-card {
  padding: 24px 24px;
  background: linear-gradient(145deg, var(--p-cosmic-103-a65) 0%, var(--p-cosmic-137-a80) 100%);
  border: 1px solid var(--p-white-a8);
  border-radius: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px var(--p-black-a45), inset 0 1px 0 var(--p-white-a12);
  position: relative;
  overflow: hidden;
}

@media (max-width: 540px) {
  .accounts-header-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px 18px;
  }
}

/* 3D User Card in Hero */
.accounts-hero-art {
  position: relative;
  width: 150px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accounts-art-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.acc-3d-user-card {
  width: 76px;
  height: 94px;
  background: linear-gradient(135deg, var(--p-purple-strong-a45) 0%, var(--p-indigo-600-a30) 100%);
  border: 1.5px solid var(--p-purple-200-a40);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px var(--p-black-a45), 0 0 24px var(--p-purple-300-a30), inset 0 1px 0 var(--p-white-a30);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: perspective(600px) rotateY(-16deg) rotateX(10deg) rotateZ(-6deg);
  position: relative;
  z-index: 2;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.acc-user-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p-white-a25) 0%, var(--p-white-a8) 100%);
  border: 1px solid var(--p-white-a35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p-white-a95);
  box-shadow: 0 4px 12px var(--p-black-a25);
}

.acc-floating-heart-bubble {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--p-purple-300-a85) 0%, var(--p-pink-500-a90) 100%);
  border: 1px solid var(--p-white-a40);
  border-radius: 12px 12px 12px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px var(--p-pink-500-a45);
  z-index: 3;
  animation: accFloat 4s ease-in-out infinite alternate;
}

.acc-floating-chain-badge {
  position: absolute;
  bottom: 16px;
  left: 10px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--p-cosmic-138-a90) 0%, var(--p-cosmic-139-a95) 100%);
  border: 1px solid var(--p-purple-300-a45);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px var(--p-black-a40), 0 0 14px var(--p-purple-300-a30);
  z-index: 3;
  transform: rotate(-12deg);
  animation: accFloatRev 4s ease-in-out infinite alternate;
}

@keyframes accFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(4deg); }
}

@keyframes accFloatRev {
  0% { transform: translateY(0px) rotate(-12deg); }
  100% { transform: translateY(-5px) rotate(-8deg); }
}

.acc-sparkle {
  position: absolute;
  color: var(--p-purple-100);
  font-size: 11px;
  opacity: 0.85;
  pointer-events: none;
  animation: accSparkleGlow 2.5s ease-in-out infinite alternate;
}
.acc-sparkle.sp1 { top: 22px; left: 16px; font-size: var(--text-13); color: var(--p-purple-200); }
.acc-sparkle.sp2 { bottom: 26px; right: 20px; font-size: var(--text-2xs); color: var(--p-pink-400); animation-delay: 1.2s; }

@keyframes accSparkleGlow {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.2); }
}

.accounts-header-info {
  flex: 1;
  min-width: 0;
}

.accounts-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--p-white);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.accounts-header-desc {
  font-size: 13.5px;
  color: var(--p-white-a55);
  line-height: 1.45;
  max-width: 480px;
  margin-bottom: 16px;
}

.accounts-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .accounts-header-actions {
    justify-content: center;
  }
}

.btn-connect-account {
  background: linear-gradient(135deg, var(--p-purple-600) 0%, var(--p-fuchsia-500) 50%, var(--p-rose-500) 100%);
  color: var(--p-white);
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--p-fuchsia-500-a40), 0 2px 6px var(--p-black-a25);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}

@media (hover: hover) {
.btn-connect-account:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px var(--p-fuchsia-500-a55);
}
}

.btn-connect-account:active {
  transform: scale(0.98);
}

.btn-refresh-accounts {
  background: var(--p-white-a6);
  color: var(--p-white-a90);
  border: 1px solid var(--p-white-a12);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}

@media (hover: hover) {
.btn-refresh-accounts:hover {
  background: var(--p-white-a10);
  border-color: var(--p-white-a20);
}
}

.accounts-how-it-works-row {
  margin-top: 14px;
}

@media (max-width: 540px) {
  .accounts-how-it-works-row {
    text-align: center;
  }
}

.link-how-it-works {
  color: var(--p-white-a70);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 1px dotted var(--p-white-a40);
  padding-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, border-color 0.2s;
}

@media (hover: hover) {
.link-how-it-works:hover {
  color: var(--p-purple-200);
  border-color: var(--p-purple-200);
}
}

.how-arrow {
  font-size: 14px;
  line-height: 1;
}

/* Empty State Card */
.accounts-empty-card {
  background: linear-gradient(145deg, var(--p-cosmic-base-a50) 0%, var(--p-cosmic-deep-a65) 100%);
  border: 1px solid var(--p-white-a8);
  border-radius: 24px;
  padding: 44px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px var(--p-black-a40), inset 0 1px 0 var(--p-white-a10);
}

.accounts-empty-art {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accounts-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--p-white);
  margin: 0 0 8px 0;
}

.accounts-empty-desc {
  font-size: 13.5px;
  color: var(--p-white-a55);
  max-width: 360px;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.btn-connect-account-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--p-purple-300-a8);
  border: 1px dashed var(--p-purple-300-a45);
  border-radius: 12px;
  color: var(--p-purple-200);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

@media (hover: hover) {
.btn-connect-account-outline:hover {
  background: var(--p-purple-300-a16);
  border-color: var(--p-purple-200-a70);
  transform: translateY(-1px);
}
}

/* Accounts List */
.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.account-item {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: none;
  border-radius: 16px;
  padding: 12px;
  position: relative;
}
.account-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  color: var(--p-white-a15);
  cursor: grab;
}
.account-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: 12px;
  flex-shrink: 0;
}
.account-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent-glow) 0%, var(--color-accent-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-weight: 700;
  font-size: 16px;
  border: 2px solid var(--p-white-a8);
}
/* Реальный аватар соцсети (avatarUrl) поверх буквы — паритет с connect */
.account-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--p-white-a8);
  background: var(--p-bg-1);
}
.account-status-pill--test {
  background: rgba(255, 159, 10, 0.12);
  color: #ffb340;
}
.account-dropdown-divider {
  height: 1px;
  background: var(--p-white-a8);
  margin: 4px 8px;
}
.account-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--p-bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-surface);
  font-size: 10px;
}
.account-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0; /* truncate long text */
}
.account-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-meta {
  font-size: 11px;
  line-height: 1.35;
  color: var(--p-gray-500);
}
.account-original-name {
  font-size: 11px;
  color: var(--p-gray-500);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.account-token-status {
  font-size: 11px;
  color: var(--color-warning);
  width: fit-content;
}
.account-token-status.danger {
  color: var(--color-danger);
}
.account-status-pill {
  background: var(--p-green-500-a8);
  color: var(--color-success);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.account-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-success);
}
.account-more-btn {
  background: transparent;
  border: none;
  color: var(--p-white-a40);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
@media (hover: hover) {
.account-more-btn:hover {
  background: var(--p-white-a5);
  color: var(--color-text);
}
}

/* Dropdown Menu */
.account-dropdown-menu {
  position: absolute;
  top: 42px;
  right: 12px;
  background: var(--p-bg-1);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--p-black-a60);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 4px;
  min-width: 130px;
}
.account-dropdown-menu.visible {
  display: flex;
}
.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
}
@media (hover: hover) {
.account-dropdown-item:hover {
  background: var(--p-white-a5);
}
}
.account-dropdown-item.danger {
  color: var(--color-danger);
}
@media (hover: hover) {
.account-dropdown-item.danger:hover {
  background: var(--p-red-500-a10);
}
}

/* Modal Connection Styles */
.connect-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--p-black-a85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 16px;
}
.connect-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.connect-modal {
  width: 100%;
  max-width: 440px;
  background: var(--color-surface);
  border: none;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px var(--p-black-a60);
  transform: translateY(15px);
  transition: transform 0.3s;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.connect-modal-overlay.visible .connect-modal {
  transform: translateY(0);
}
.connect-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.connect-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}
.connect-modal-close {
  background: var(--p-white-a6);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--p-gray-500);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
@media (hover: hover) {
.connect-modal-close:hover {
  background: var(--p-white-a12);
  color: var(--color-text);
}
}
.connect-modal-body {
  overflow-y: auto;
  flex: 1;
}

.connect-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--p-white-a6);
  font-size: 11px;
  color: var(--p-white-a40);
  text-align: center;
}

.connect-modal-footer a {
  color: var(--p-purple-300-a90);
  text-decoration: underline;
  cursor: pointer;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.network-card {
  background: var(--p-white-a2);
  border: none;
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s;
}
.network-card.disabled {
  opacity: 0.35;
}
.network-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--color-text);
}
.network-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.network-desc {
  font-size: 9px;
  color: var(--p-gray-500);
  margin-bottom: 10px;
  min-height: 22px;
  line-height: 1.2;
}
.network-btn {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.network-btn.connect {
  background: var(--p-blue-700);
  color: var(--color-text);
}
.network-btn.disabled {
  background: var(--p-white-a5);
  color: var(--p-gray-500);
  cursor: default;
}
.network-btn.add-more {
  background: var(--p-blue-700);
  color: var(--color-text);
}

