/* ==========================================================================
   COMPONENTS - High-Craft Cards, Hairline Bevels, Spotlight & Badges
   ========================================================================== */

/* Liquid Glass Base Surface */
.liquid-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%) contrast(102%);
  -webkit-backdrop-filter: blur(28px) saturate(180%) contrast(102%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: background 0.35s var(--ease-out-expo),
              border-color 0.35s var(--ease-out-expo),
              box-shadow 0.35s var(--ease-out-expo),
              transform 0.15s ease-out;
  will-change: transform;
}

.liquid-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* Interactive 3D Card with Specular Refraction */
.interactive-card {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-xl) !important;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  transform-style: preserve-3d;
  outline: none;
}

@media (min-width: 640px) {
  .interactive-card {
    padding: var(--space-5) var(--space-6);
  }
}

/* Tactile Active feedback */
.interactive-card:active {
  transform: scale(0.98) !important;
}

/* Dynamic Cursor-Following Spotlight Reflection */
.interactive-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--glass-glare),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}

.interactive-card:hover::before {
  opacity: 1;
}

/* Precision Top-Bevel Light Edge */
.interactive-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-bevel);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Avatar Visual Aura */
.avatar-container {
  position: relative;
  margin-bottom: var(--space-5);
}

.avatar-halo {
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-amber));
  filter: blur(10px);
  opacity: 0.6;
  transition: opacity 0.4s var(--ease-out-expo);
}

.avatar-container:hover .avatar-halo {
  opacity: 0.9;
}

.avatar-frame {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: var(--radius-full);
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-gold), rgba(244, 241, 234, 0.4));
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

@media (min-width: 640px) {
  .avatar-frame {
    width: 8.5rem;
    height: 8.5rem;
  }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  background-color: #121316;
  transition: transform 0.5s var(--ease-out-expo);
}

.avatar-container:hover .avatar-img {
  transform: scale(1.04);
}

/* Status Indicator Dot */
.status-badge {
  position: absolute;
  bottom: 4px;
  right: 8px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-emerald-bright);
  border: 2px solid var(--surface-base);
  box-shadow: 0 0 12px var(--accent-emerald-bright);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-ping {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background-color: #FFFFFF;
  opacity: 0.85;
}

/* Icon Shells */
.icon-shell {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .icon-shell {
    width: 3rem;
    height: 3rem;
  }
}

.interactive-card:hover .icon-shell {
  transform: scale(1.08);
}

/* Copy Action Button */
.copy-btn {
  z-index: 10;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--accent-gold);
  border: 1px solid var(--border-hairline-hover);
  background: var(--accent-gold-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease-out-expo);
}

.copy-btn:hover {
  background: var(--accent-gold);
  color: #0B0C0E;
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Toast Floating Feedback */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 2rem);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s var(--ease-out-expo);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--surface-card);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid var(--border-hairline-hover);
  box-shadow: var(--toast-shadow);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 600;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
