/* ==============================================================================
   👑 CROWN MAIL VAULT — DARK NEOMORPHISM & CLAYMORPHISM DESIGN SYSTEM
============================================================================== */

:root {
  --bg-deep: #080a10;
  --bg-card: #0f131d;
  --bg-surface: #141926;
  --bg-inset: #090c13;
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cyan-glow: #00f0ff;
  --purple-glow: #9333ea;
  --emerald-glow: #10b981;
  --discord-blurple: #5865f2;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(88, 101, 242, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 85% 95%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 15% 85%, rgba(16, 185, 129, 0.04) 0%, transparent 35%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.015em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
}

/* ==============================================================================
   CLAYMORPHIC & NEOMORPHIC SURFACES
   Characteristics:
   - 3D Pillowy inflated geometry
   - Outer soft drop shadow (depth elevation)
   - Inner soft rim highlight (tactile clay bevel)
   - Rounded corners (20px - 28px)
============================================================================== */

/* Clay Plates & Cards */
.clay-plate {
  background: linear-gradient(145deg, #121724 0%, #0c101a 100%);
  border-radius: 22px;
  box-shadow: 
    10px 10px 24px #040508, 
    -6px -6px 18px rgba(255, 255, 255, 0.025),
    inset 1px 1px 2px rgba(255, 255, 255, 0.09),
    inset -1px -1px 3px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.clay-card {
  background: linear-gradient(145deg, #141a29 0%, #0e121e 100%);
  border-radius: 18px;
  box-shadow: 
    8px 8px 18px #040508, 
    -4px -4px 12px rgba(255, 255, 255, 0.02),
    inset 1px 1px 1.5px rgba(255, 255, 255, 0.08),
    inset -1px -1px 2px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.clay-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 
    12px 12px 26px #030406, 
    -6px -6px 16px rgba(255, 255, 255, 0.03),
    inset 1px 1px 2px rgba(0, 240, 255, 0.2),
    inset -1px -1px 3px rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 240, 255, 0.25);
}

/* Clay Inset (Sunken concave 3D field) */
.clay-inset {
  background: #080b12;
  border-radius: 16px;
  box-shadow: 
    inset 4px 4px 8px #030406, 
    inset -3px -3px 7px rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.clay-inset:focus-within {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 
    inset 4px 4px 8px #030406, 
    inset -2px -2px 5px rgba(255, 255, 255, 0.02),
    0 0 16px rgba(0, 240, 255, 0.15);
}

/* Clay Pills & Badges */
.clay-pill {
  background: linear-gradient(145deg, #121826 0%, #0b0e18 100%);
  border-radius: 9999px;
  box-shadow: 
    4px 4px 10px #040508, 
    -2px -2px 6px rgba(255, 255, 255, 0.02),
    inset 1px 1px 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.clay-badge {
  background: #0a0d16;
  border-radius: 9999px;
  box-shadow: inset 2px 2px 5px #030407, inset -1px -1px 3px rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================================================================
   TACTILE CLAY BUTTONS
============================================================================== */

.clay-btn {
  background: linear-gradient(145deg, #161c2d 0%, #0f1320 100%);
  border-radius: 14px;
  box-shadow: 
    5px 5px 12px #040508, 
    -3px -3px 8px rgba(255, 255, 255, 0.03),
    inset 1px 1px 1.5px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.clay-btn:hover {
  background: linear-gradient(145deg, #1b2338 0%, #121727 100%);
  transform: translateY(-1.5px);
  box-shadow: 
    7px 7px 16px #030406, 
    -4px -4px 10px rgba(255, 255, 255, 0.04),
    inset 1px 1px 2px rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.16);
}

.clay-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 
    inset 3px 3px 6px #030406, 
    inset -2px -2px 4px rgba(255, 255, 255, 0.02);
}

/* Emerald Primary Clay Button */
.clay-btn-primary {
  background: linear-gradient(145deg, #10b981 0%, #059669 100%);
  color: #022c22;
  border-radius: 14px;
  box-shadow: 
    0 8px 20px rgba(16, 185, 129, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -1px -1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(52, 211, 153, 0.6);
  font-weight: 700;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.clay-btn-primary:hover {
  background: linear-gradient(145deg, #34d399 0%, #059669 100%);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.clay-btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Discord Blurple Clay Button */
.clay-btn-discord {
  background: linear-gradient(145deg, #5865f2 0%, #4752c4 100%);
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 
    0 8px 20px rgba(88, 101, 242, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.35),
    inset -1px -1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(129, 140, 248, 0.5);
  font-weight: 700;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.clay-btn-discord:hover {
  background: linear-gradient(145deg, #6c78ff 0%, #4752c4 100%);
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.5);
  transform: translateY(-2px);
}

.clay-btn-discord:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Purple Clay Button */
.clay-btn-purple {
  background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 
    0 8px 20px rgba(139, 92, 246, 0.35),
    inset 1px 1px 2px rgba(255, 255, 255, 0.35),
    inset -1px -1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(167, 139, 250, 0.5);
  font-weight: 700;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.clay-btn-purple:hover {
  background: linear-gradient(145deg, #a78bfa 0%, #6d28d9 100%);
  box-shadow: 0 10px 26px rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.clay-btn-purple:active {
  transform: translateY(1px) scale(0.98);
}

/* Danger Red Clay Button */
.clay-btn-danger {
  background: linear-gradient(145deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
  border: 1px solid rgba(248, 113, 113, 0.4);
  transition: all 0.18s ease;
}

.clay-btn-danger:hover {
  background: linear-gradient(145deg, #f87171 0%, #b91c1c 100%);
  transform: translateY(-1.5px);
}

/* ==============================================================================
   SPECIAL PRESERVATION & STATUS STYLING
============================================================================== */

/* Preserved Cold Storage Banner */
.preserved-vault-glow {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.1), inset 0 0 20px rgba(56, 189, 248, 0.05);
}

/* Discord Verification Banner */
.discord-otp-glow {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15) 0%, rgba(147, 51, 234, 0.1) 50%, rgba(15, 19, 32, 0.9) 100%);
  border: 1px solid rgba(129, 140, 248, 0.35);
  box-shadow: 0 0 30px rgba(88, 101, 242, 0.12);
}

/* Modal Backdrop */
.clay-backdrop {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(4, 6, 11, 0.82);
}

/* Tactile Icon Styles */
.svg-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.svg-icon-sm {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.svg-icon-lg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Pulse animation for live connection */
@keyframes emerald-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.pulse-live {
  animation: emerald-pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* New message inbound highlight */
@keyframes flash-inbound {
  0% {
    background-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    transform: translateX(4px);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
    transform: translateX(0);
  }
}

.message-item-flash {
  animation: flash-inbound 1.8s ease-out;
}
