/* USER PORTAL STYLES (SCOPED) */

.user-portal-page .glass-panel {
  background: rgba(14, 14, 16, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.user-portal-page .glass-panel:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 12px 40px -8px rgba(139, 92, 246, 0.15);
}

.user-portal-page .bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .user-portal-page .bento-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .user-portal-page .bento-span-2 {
    grid-column: span 2;
  }
}

.user-portal-page .user-hero {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 20px;
}

.user-portal-page .user-hero h1 {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.user-portal-page .vault-input-group {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.user-portal-page .vault-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 18px 24px;
  padding-right: 140px;
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-portal-page .vault-input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background: rgba(0, 0, 0, 0.6);
}

.user-portal-page .btn-primary {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
}

.user-portal-page .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.user-portal-page .btn-primary:hover {
  border-color: #a78bfa;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), inset 0 0 10px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px) scale(1.01);
  letter-spacing: 0.02em;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.user-portal-page .btn-primary:hover::before {
  opacity: 1;
}

.user-portal-page .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

.user-portal-page .btn-primary:hover::after {
  animation: cosmic-shine 1.2s ease;
}

.user-portal-page .vault-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: 8px;
  border-radius: 100px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  gap: 6px;
  transition: all 0.3s ease;
}

.user-portal-page .vault-btn:hover {
  background: #8b5cf6;
  border-color: #8b5cf6;
  color: white;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
  padding: 0 30px;
  transform: none;
  letter-spacing: 0.15em;
  text-shadow: none;
}

.user-portal-page .vault-btn svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-portal-page .vault-btn:hover svg {
  transform: rotate(90deg) scale(1.1);
}

.user-portal-page .btn-credits-action {
  width: 100%;
  padding: 16px;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 16px;
}

.user-portal-page .btn-delete-request {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.2);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  transition: all 0.2s ease;
}

.user-portal-page .btn-delete-request:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.user-portal-page .btn-delete-request.deleting {
  opacity: 0.5;
  pointer-events: none;
}

.user-portal-page .btn-delete-request.deleting svg {
  animation: spin 1s linear infinite;
}

@keyframes cosmic-shine {
  0% {
    left: -100%;
  }

  100% {
    left: 200%;
  }
}

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

  to {
    transform: rotate(360deg);
  }
}

.user-portal-page .up-stat-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.user-portal-page .up-stat-value-huge {
  font-size: clamp(2rem, 10vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(180deg, #6ee7b7 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-portal-page .up-stat-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.user-portal-page .up-stat-inactive-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.user-portal-page .history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.user-portal-page .history-row:hover .history-cell {
  background: rgba(255, 255, 255, 0.06);
}

.user-portal-page .history-cell {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 20px;
  vertical-align: middle;
}

.user-portal-page .history-cell:first-child {
  border-radius: 12px 0 0 12px;
}

.user-portal-page .history-cell:last-child {
  border-radius: 0 12px 12px 0;
}

.user-portal-page .token-pill {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-portal-page .charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .user-portal-page .charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}