header {
  width: 100%;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  box-sizing: border-box; 
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Segoe UI', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark header {
  background: rgba(30, 30, 30, 0.95);
  color: #e0e0e0;
}

body.dark header a {
  color: #ddd;
}
:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --border-color: #dddddd;
  --button-bg: #eeeeee;
  --button-hover: #dddddd;
  --button-text: #333333;
}

body.dark {
  --bg-color: #1e1e1e;
  --text-color: #eeeeee;
  --border-color: #444444;
  --button-bg: #333333;
  --button-hover: #444444;
  --button-text: #eeeeee;
}

body.dark {
  background-color: #121212;
  color: #e0e0e0;
}

/* Header */
body.dark header {
  background-color: #1f1f1f !important;
  color: #e0e0e0;
}

/* Form container */
body.dark form {
  background-color: rgba(40, 40, 40, 0.95);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Inputs + buttons */
body.dark input,
body.dark button:not(.darkmode-toggle),
body.dark label {
  background-color: #1e1e1e;
  color: #eee;
  border: 1px solid #555;
}

label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
}


/* Modal */
body.dark #privacyModal > div {
  background-color: #1f1f1f;
  color: #eee;
}

/* Staff Cards */
body.dark .member {
  background-color: #1e1e1e;
  color: #ddd;
}

/* Links */
body.dark a {
  color: #7abfff;
}

/* Headings */
body.dark h1, body.dark h2, body.dark h3 {
  color: #fff;
}
body, form, header, .member {
  transition: background-color 0.3s ease, color 0.3s ease;
}
header a {
  text-decoration: none;
}


body.dark .darkmode-toggle {
  color: #fff;
}

body.dark .theme-toggle {
  color: #fff;
  border-color: #777;
}
.privacy-container {
  max-width: 600px;
  margin: 40px auto;
  font-family: sans-serif;
}

body.dark .privacy-container {
  background-color: #1f1f1f;
  color: #e0e0e0;
  padding: 20px;
  border-radius: 10px;
}
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.75);
  z-index: 999;
}

.modal-content {
  background: #fff;
  padding: 30px;
  max-width: 700px;
  margin: 5% auto;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  font-family: 'Segoe UI', sans-serif;
  overflow-y: auto;
  max-height: 85vh;
  color: #111;
}
.modal-content button {
  margin-top: 20px;
  padding: 8px 16px;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

body.dark .modal-content {
  background: #1f1f1f;
  color: #eee;
}
header nav a {
  text-decoration: none;
  color: #111; /* Light mode */
  font-weight: 500;
  transition: color 0.2s ease;
}

body.dark header nav a:hover {
  color: #7abfff;
}

/* Optional: hover effect */
header nav a:hover {
  color: #7abfff;
}
header nav {
  font-weight: 500;
}

footer {
  position: relative; /* ✅ Not absolute */
  width: 100%;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  border-top: 1px solid #ccc;
  z-index: 0; /* ✅ Let header/nav stay on top */
}


body.dark footer {
  background: rgba(20, 20, 20, 0.85);
  color: #ccc;
  border-top: 1px solid #333;
}


footer .footer-content {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

footer a {
  color: #0077cc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}


body.dark footer a {
  color: #88c6ff;
}
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0,0,0,0.75);
  z-index: 999;
}

.modal-content {
  background: #fff;
  padding: 30px;
  max-width: 700px;
  margin: 5% auto;
  border-radius: 16px;
  position: relative;
  overflow-y: auto;
  max-height: 90vh;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Segoe UI', sans-serif;
}

body.dark .modal-content {
  background: #1f1f1f;
  color: #eee;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 20px;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
}
.card-overlay {
  background: rgba(0, 0, 0, 0.6);
  padding: 40px;
  border-radius: 16px;
  color: white;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  padding: 20px;
  width: 90%;
  margin: 0 auto;
}

.grid-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 18px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.grid-id {
  font-family: monospace;
  font-size: 16px;
  word-break: break-word;
  color: #111; /* light mode default */
}

body.dark .grid-id {
  color: #eee;
}


.grid-id,
.copy-button,
#searchInput {
  color: #111 !important;
}

body.theme-dark {
  background-color: #121212;
  color: #eee;
}

body.theme-dark .grid-id,
body.theme-dark .copy-button,
body.theme-dark #searchInput,
body.theme-dark header,
body.theme-dark nav a,
body.theme-dark footer {
  color: #eee !important;
}
.theme-toggle {
  z-index: 10001;
  pointer-events: auto;
}
header nav {
  z-index: 10001;
  position: relative;
}
.profile-container,
header,
footer {
  transition: background-color 0.4s ease, color 0.4s ease;
}
.role-badge,
.nav-button,
.modal-content,
.member {
  transition: background-color 0.4s ease, color 0.4s ease;
}
.home-container {
  position: relative;
  z-index: 0;
}

.home-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0); /* default: transparent */
  z-index: 1;
  transition: background-color 0.4s ease;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

body.dark .home-container::before {
  background-color: rgba(0, 0, 0, 0.5); /* dim overlay in dark mode */
}

.home-container > * {
  position: relative;
  z-index: 2;
}
.darkmode-toggle {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 6px 12px;
  cursor: pointer;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 10;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1000;
}

.darkmode-wrapper {
  z-index: 10;
  position: relative;
}

.role-badge {
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  transition: transform 0.2s ease;
  display: inline-block;
}

.role-badge:hover {
  transform: scale(1.05);
}

.role-owner {
  background-color: #FFD700;
  box-shadow: 0 0 8px #FFD700;
}
.role-coowner {
  background-color: #FFA726;
  box-shadow: 0 0 8px #FFA726;
}
.role-headadmin {
  background-color: #29B6F6;
  box-shadow: 0 0 8px #29B6F6;
}
.role-moderator {
  background-color: #4CAF50;
  box-shadow: 0 0 8px #4CAF50;
}
.role-trialmoderator {
  background-color: #AB47BC;
  box-shadow: 0 0 8px #AB47BC;
}
.role-verifier {
  background-color: #64B5F6;
  box-shadow: 0 0 8px #64B5F6;
}
.role-giveaway {
  background-color: #EF5350;
  box-shadow: 0 0 8px #EF5350;
}
#discord-winglet {
  position: fixed;
  left: -400px;
  top: 50%;
  transform: translateY(-50%);
  background: #2f3136; /* Discord dark grey */
  color: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 0 10px 10px 0;
  box-shadow: 4px 0 12px rgba(0,0,0,0.2);
  font-size: 15px;
  line-height: 1.4;
  transition: left 0.6s ease;
  z-index: 9999;
  max-width: 360px;
}

#discord-winglet.show {
  left: 0;
}

#discord-winglet .discord-icon {
  width: 40px;
  height: 40px;
}

#discord-winglet .discord-text a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 500;
}

#friend-list {
  position: fixed;
  bottom: 0;
  right: 20px;
  background: #fff;
  padding: 8px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  width: 200px;
  font-size: 14px;
  z-index: 999;
}

#friend-list .friend {
  cursor: pointer;
  padding: 6px;
  border-bottom: 1px solid #eee;
}

#friend-list .friend:hover {
  background: #f0f0f0;
}

#chat-dock {
  position: fixed;
  bottom: 0;
  right: 240px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.chat-window {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px 8px 0 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  height: 320px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.chat-header {
  background: #4caf50;
  color: white;
  padding: 6px 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 13px;
}

.chat-input {
  display: flex;
  border-top: 1px solid #ddd;
}

.chat-input input {
  flex: 1;
  border: none;
  padding: 8px;
}

.chat-input button {
  border: none;
  background: #4caf50;
  color: white;
  padding: 8px;
}

body.dark #friend-list,
body.dark .chat-window {
  background: #1e1e1e;
  color: #eee;
}

body.dark .chat-header {
  background: #388e3c;
}

.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.friend img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.dashboard-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  margin-top: 60px;
}

.sidebar {
  width: 240px;
  background-color: #222;
  color: white;
  padding: 20px;
  font-family: sans-serif;
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.sidebar a {
  display: block;
  color: white;
  text-decoration: none;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.sidebar a:hover {
  background-color: #333;
}

.dashboard-content {
  flex-grow: 1;
  padding: 40px;
  background-color: #f4f4f4;
}

body.dark .dashboard-content {
  background-color: #1e1e1e;
}
@media (max-width: 768px) {
  .dashboard-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 15px;
    text-align: center;
  }

  .sidebar a {
    display: inline-block;
    margin: 6px;
    font-size: 15px;
  }

  .dashboard-content {
    padding: 20px;
  }

  .toggle-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}