/* =========================================================
   RondoServ Wizarr Unified Theme - Dark Glassmorphism
   Obsidian (#0b0e14) with Indigo/Violet Accents & Glass Effects
   ========================================================= */

/* Universal Dark Canvas Enforcement */
html,
html.dark,
body,
#content,
div#content,
section,
main,
.bg-gray-50,
.dark\:bg-gray-900,
section.bg-gray-50,
section.py-8 {
  background-color: #0b0e14 !important;
  color: #f1f5f9 !important;
}

body {
  background-image: 
    radial-gradient(at 15% 15%, rgba(99, 102, 241, 0.15) 0px, transparent 45%),
    radial-gradient(at 85% 85%, rgba(168, 85, 247, 0.12) 0px, transparent 45%) !important;
  background-attachment: fixed !important;
}

/* Glassmorphic Dashboard Cards & Containers */
.glass,
.card,
nav.bg-white,
header,
#latestInvitesContainer > div,
#serverHealthContainer > div,
.now-playing-card,
div.bg-white,
.dark div.bg-gray-800,
div[class*="dark:bg-gray-800"] {
  background: rgba(18, 22, 31, 0.85) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  border-radius: 16px !important;
}

/* Navigation Bar */
nav {
  background: rgba(11, 14, 20, 0.92) !important;
  border-bottom: 1px solid rgba(99, 102, 241, 0.25) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

/* Active Nav Button Pill */
.nav-btn.bg-primary,
button.nav-btn.bg-primary,
.mobile-nav-btn.text-primary {
  background: linear-gradient(135deg, #6366f1, #a855f7) !important;
  color: #ffffff !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4) !important;
  border-radius: 9999px !important;
}

.nav-btn:hover:not(.bg-primary) {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
}

/* "New Invite" and Primary Action Buttons */
#newInviteBtn,
button#newInviteBtn,
.bg-primary,
button.bg-primary,
a.bg-primary,
.btn-primary,
button[type=submit]:not(.bg-red-500):not(.bg-red-600) {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
  background-color: #6366f1 !important;
  color: #ffffff !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35) !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#newInviteBtn:hover,
button#newInviteBtn:hover,
.bg-primary:hover,
button.bg-primary:hover,
a.bg-primary:hover,
.btn-primary:hover {
  transform: translateY(-1px) scale(1.02) !important;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55) !important;
  background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%) !important;
}

#newInviteBtn svg,
button#newInviteBtn svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Inputs, Selects & Forms */
input[type=text],
input[type=password],
input[type=email],
input[type=number],
select,
textarea {
  background: rgba(14, 18, 26, 0.95) !important;
  border: 1px solid rgba(99, 102, 241, 0.30) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.20) !important;
  outline: none !important;
}

/* Modal Wrapper & Solid Opaque Card */
#inviteModalWrapper,
div[id="inviteModalWrapper"] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem !important;
}

.modal-backdrop-scrim {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  z-index: 1 !important;
  cursor: pointer !important;
}

#inviteModalCard,
div[id="inviteModalCard"],
.modal-dialog-card {
  position: relative !important;
  z-index: 10 !important;
  background: #12161f !important;
  background-color: #12161f !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 35px rgba(99, 102, 241, 0.3) !important;
  width: 100% !important;
  max-width: 520px !important;
  max-height: 88vh !important;
  overflow-y: auto !important;
  color: #ffffff !important;
}

#inviteModalContent {
  background: transparent !important;
  color: #ffffff !important;
}

/* Server Selection Grid in Modal */
#server-grid > div {
  background: rgba(14, 18, 26, 0.85) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

#server-grid > div:hover {
  border-color: rgba(168, 85, 247, 0.45) !important;
  background: rgba(22, 28, 40, 0.95) !important;
}

/* Server Badges & Server Name Tags */
span[style*="background-color"] {
  background: rgba(99, 102, 241, 0.20) !important;
  color: #ffffff !important;
  border: 1px solid rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  padding: 0.2rem 0.6rem !important;
}

/* Typography & Contrast */
h1, h2, h3, h4,
.text-gray-900,
.dark .text-white,
p.font-medium,
.text-foreground {
  color: #ffffff !important;
}

.text-gray-500,
.text-gray-400,
.text-muted-foreground,
.dark .text-gray-400 {
  color: #94a3b8 !important;
}

/* Borders */
.border-gray-200,
.border-gray-600,
.border-gray-700,
.dark .border-gray-700 {
  border-color: rgba(99, 102, 241, 0.20) !important;
}

/* Sleek Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(11, 14, 20, 0.7);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 10px;
}

/* Server select cards in invite modal */
.server-select-card:hover {
  border-color: rgba(99, 102, 241, 0.5) !important;
  background-color: rgba(99, 102, 241, 0.08) !important;
}
