:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --bg-color: #020714;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;

  --primary-color: #0077ff;
  --primary-glow: rgba(0, 119, 255, 0.4);
  --discord-color: #5865F2;
  --discord-glow: rgba(88, 101, 242, 0.4);

  --glass-bg: rgba(10, 15, 30, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-focus: rgba(255, 255, 255, 0.16);
  --glass-glow: rgba(0, 240, 255, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  cursor: none;
}

#top-slideshow {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 50vh;
  z-index: 1;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#bottom-slideshow {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50vh;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slideshow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #020714 0%, transparent 12%, transparent 88%, #020714 100%),
    radial-gradient(circle at center, transparent 30%, rgba(2, 7, 20, 0.35) 100%);
  pointer-events: none;
}

#cursor-glow {
  display: none;
}


#cursor-dot {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* App Container — grid layout so all cards stack in the same centered cell */
#app-container {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  position: relative;
  z-index: 10;
}

/* All cards share the same grid cell so they stack on top of each other */
#app-container > .glass-card {
  grid-area: 1 / 1;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  display: flex;
  flex-direction: column;

  /* Hidden by default — transition these so animations fire properly */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Server detail view: expand from centre of screen */
@keyframes expandFromCenter {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#server-view-card {
  transform: scale(0.82);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#server-view-card.active {
  animation: expandFromCenter 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#login-card {
  max-width: 560px;
  padding: 56px;
}

#login-card h1 {
  font-size: 3rem;
}

#login-card .subtitle {
  font-size: 1.1rem;
  margin-bottom: 40px;
}

#login-card .btn-discord {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.glass-card.dashboard-mode {
  max-width: 1024px;
  height: 80vh;
  max-height: 720px;
  padding: 32px;
  text-align: left;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
}

#loading-card {
  align-items: center;
  justify-content: center;
}

#loading-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-top: 20px;
  font-size: 1.5rem;
}

#loading-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #00f0ff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.logo-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
}

.logo-icon {
  font-size: 48px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.4) 0%, transparent 70%);
  filter: blur(12px);
  z-index: -1;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: none;

  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after {
  opacity: 1;
}

.btn-discord {
  background-color: var(--discord-color);
  color: white;
  box-shadow: 0 4px 14px var(--discord-glow);
}

.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--discord-glow), 0 0 12px rgba(88, 101, 242, 0.4);
}

.btn-discord:active {
  transform: translateY(0);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--glass-border-focus);
}


.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.welcome-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.username-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, var(--glass-border) 0%, transparent 100%);
  margin-bottom: 24px;
}


.controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.servers-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.count-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  background: linear-gradient(135deg, #00f0ff 0%, #0077ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.count-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.search-wrapper {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
  cursor: none;
}

.search-wrapper input:focus {
  border-color: rgba(0, 240, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.6;
}


.server-list-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-right: -8px;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}


.server-card {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: scale(0.95);
  animation: enter 0.4s forwards;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.server-card:hover {
  background: #121212;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}


.server-icon-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.server-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.server-icon-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #0077ff 0%, #00f0ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}


.server-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.server-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.server-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.members-count {
  display: flex;
  align-items: center;
  gap: 4px;
}

.owner-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fbbf24;

}


.server-list-container::-webkit-scrollbar {
  width: 6px;
}

.server-list-container::-webkit-scrollbar-track {
  background: transparent;
}

.server-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.server-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}


.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.empty-state.active {
  display: flex;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
}


@media (max-width: 768px) {
  .glass-card.dashboard-mode {
    height: 90vh;
    padding: 20px;
  }

  .controls-section {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrapper {
    max-width: none;
  }

  .server-detail-mode {
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
  }

  .server-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
}

#server-view-card {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  z-index: 100;
}

.server-detail-mode {
  flex-direction: row !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.server-sidebar {
  width: 0;
  padding: 24px 0;
  background: #050505;
  border-right: 0 solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1), padding 1.4s cubic-bezier(0.16, 1, 0.3, 1), border-right-width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  white-space: nowrap;
}

#server-view-card.active .server-sidebar {
  width: 240px;
  padding: 24px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.btn-back {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 16px;
  font-size: 0.9rem;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: none;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.menu-item.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* Server Profile Box - Bottom Left of Page */
.server-profile-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 16px;
}

.server-pfp-wrapper {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.server-pfp {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.server-profile-box .server-icon-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: none;
}

.server-profile-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}


.server-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#server-view-card.active .server-main-content {
  opacity: 1;
  transform: translateX(0);
}

.server-banner {
  position: relative;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #0077ff 0%, #00f0ff 100%);
  background-size: cover;
  background-position: center;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.banner-text-content {
  position: relative;
  z-index: 2;
}

.banner-text-content h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-text-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  font-weight: 500;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-header h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.tab-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.session-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.session-card {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
}

.session-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.status-badge.offline {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.session-card .desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.actions-list {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-disabled {
  opacity: 0.5;
}

/* Inner Server Dashboard Preloader */
.server-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.server-loader.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preloader-logo-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  animation: logoPulse 1.8s ease-in-out infinite;
}

.preloader-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.3);
  object-fit: cover;
}

.preloader-logo-wrapper .server-icon-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: 800;
}

@keyframes logoPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 32px rgba(0, 240, 255, 0.6), 0 0 12px rgba(255, 255, 255, 0.2);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
  }
}

.preloader-bar-container {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.preloader-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #0077ff, #00f0ff);
  border-radius: 10px;
  position: absolute;
  left: -100%;
  animation: fillProgress 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fillProgress {
  to {
    left: 0;
  }
}

.preloader-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Settings Form Styles */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 640px;
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
}

.settings-field input[type="text"],
.settings-field select {
  width: 100%;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  cursor: none;
}

.settings-field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.settings-field select option {
  background: #080808;
  color: white;
}

.settings-field input[type="text"]:focus,
.settings-field select:focus {
  border-color: rgba(0, 240, 255, 0.4);
  background: #0e0e0e;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.field-help {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Custom Switch Toggle */
.check-field {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.check-label-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-label-wrapper label {
  cursor: none;
}

.switch-container {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: none;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #1a1a1a;
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #666;
  transition: .3s;
  border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
  background-color: var(--primary-color);
  border-color: var(--primary-glow);
}

.switch-container input:checked + .switch-slider:before {
  transform: translateX(24px);
  background-color: white;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.form-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow), 0 0 12px rgba(0, 240, 255, 0.3);
}

/* Custom Select Dropdown Container */
.custom-select {
  position: relative;
  width: 100%;
}

/* Dropdown Trigger */
.custom-select-trigger {
  width: 100%;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  color: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: rgba(0, 240, 255, 0.2);
  background: #0c0c0c;
}

.custom-select.open .custom-select-trigger {
  border-color: rgba(0, 240, 255, 0.4);
  background: #0e0e0e;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}

.custom-select-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  margin-right: 4px;
}

.custom-select-trigger:hover .custom-select-arrow,
.custom-select.open .custom-select-arrow {
  border-color: white;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(-135deg);
}

/* Options Dropdown Menu Panel */
.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.03);
  
  /* Initial Closed State for Animation */
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select.open .custom-select-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
}

/* Custom Scrollbar for Options Panel */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 8px;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.3);
}

/* Option List Items */
.custom-select-option {
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  cursor: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 2px solid transparent;
  user-select: none;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border-left-color: rgba(0, 240, 255, 0.3);
  padding-left: 22px; /* Smooth sliding hover animation */
}

.custom-select-option.selected {
  background: rgba(0, 240, 255, 0.05);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 600;
  padding-left: 22px;
  animation: selectRipple 0.5s ease-out; /* Selection visual ripple */
}

@keyframes selectRipple {
  0% {
    background: rgba(0, 240, 255, 0.2);
  }
  100% {
    background: rgba(0, 240, 255, 0.05);
  }
}