/* =============== CSS VARIABLES =============== */
:root {
  --bg-color: #09090b;
  --header-bg: rgba(9, 9, 11, 0.7);
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-hover: rgba(255, 255, 255, 0.04);
  --primary-color: #d4d4d8;
  --primary-hover: #ffffff;
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-speed: 0.3s;
  --accent-color: #d4d4d8;
  --accent-glow: rgba(212, 212, 216, 0.1);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* =============== THEME VARIANTS =============== */
body.theme-midnight {
  --bg-color: #0f172a;
  --header-bg: rgba(15, 23, 42, 0.8);
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.2);
}

body.theme-emerald {
  --bg-color: #064e3b;
  --header-bg: rgba(6, 78, 59, 0.8);
  --accent-color: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.2);
}

body.theme-crimson {
  --bg-color: #450a0a;
  --header-bg: rgba(69, 10, 10, 0.8);
  --accent-color: #ef4444;
  --accent-glow: rgba(239, 68, 68, 0.2);
}

/* =============== BASE RESET =============== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

html, body {
  scrollbar-gutter: stable;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(9, 9, 11, 0.85);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 101, 242, 0.5);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  flex-shrink: 0;
  outline: none;
  margin: 0;
}
input[type="checkbox"]:hover {
  border-color: rgba(88, 101, 242, 0.6);
  background: rgba(88, 101, 242, 0.08);
}
input[type="checkbox"]:checked {
  background: #5865F2;
  border-color: #5865F2;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.35);
}
input[type="checkbox"]:checked::after {
  content: "";
  display: block;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(88, 101, 242, 0.6);
  outline-offset: 2px;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #141416;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' 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 14px center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  padding: 9px 36px 9px 12px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
select:hover {
  border-color: rgba(255, 255, 255, 0.25);
}
select:focus {
  border-color: #5865F2;
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}
select option {
  background-color: #18181b;
  color: #fff;
  padding: 8px 12px;
}

/* =============== HEADER =============== */
#header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  box-sizing: border-box;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-speed);
}

.header-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

#server-logo {
  border-radius: var(--radius-md);
  width: 45px;
  height: 45px;
  object-fit: cover;
}

#server-name {
  text-decoration: none;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#header-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

#header-links a {
  color: var(--text-muted);
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition-speed);
}

#header-links a:hover,
#header-links a.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

/* =============== BUTTONS =============== */
.btn-primary {
  background: var(--text-main);
  color: var(--bg-color);
  border: none;
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed) ease;
  font-family: "Inter", sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
  background: var(--primary-color);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 10px 22px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-family: "Inter", sans-serif;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.w-100 { width: 100%; }

/* =============== HERO / LANDING =============== */
main {
  padding-top: 80px;
}

#landing-page {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 35px 50px 40px 50px;
  background: var(--bg-color);
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease-out;
}

.glow-bg {
  position: absolute;
  top: -20%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

#landing-page-left-section {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.badge-pill {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

#landing-page h1 {
  font-size: 68px;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 10px 0 20px 0;
  color: var(--text-main);
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(to right, #ffffff, #71717a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#landing-page p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 35px;
  font-weight: 400;
}

/* =============== SEARCH =============== */
#landing-page-search {
  display: flex;
  margin-top: 10px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 4px 18px;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.search-input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.5);
  max-width: 520px;
}

.search-icon {
  color: var(--text-muted);
  margin-right: 14px;
  transition: color 0.3s;
  flex-shrink: 0;
}

.search-input-wrapper:focus-within .search-icon {
  color: var(--text-main);
}

#landing-page-search input {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 0;
  color: var(--text-main);
  font-size: 16px;
  font-weight: 500;
  outline: none;
  width: 100%;
  font-family: "Inter", sans-serif;
}

#landing-page-search input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* =============== AVATAR FLOAT =============== */
#landing-page-image-container {
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  z-index: -1;
  border-radius: 50%;
}

#landing-page-image-container img {
  width: 350px;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =============== CONTENT SECTIONS =============== */
.content-section {
  padding: 20px 50px 60px 50px;
}

.section-badge,
.section-badge-alt {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}

/* =============== CARDS GRID =============== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease-out both;
}

.card:hover {
  transform: translateY(-6px);
  background-color: var(--card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.member-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.member-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.member-card.is-admin {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(18, 18, 20, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
}

.member-card.is-admin:hover {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.member-card.is-owner {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, rgba(18, 18, 20, 0.95) 100%);
  box-shadow: 0 4px 25px rgba(245, 158, 11, 0.18);
}

.member-card.is-owner:hover {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.35);
}

.member-shield-svg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 5px;
  pointer-events: none;
  cursor: default;
}

.member-card-levels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  width: 100%;
}

.member-lvl-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.member-lvl-pill svg {
  color: var(--text-muted);
}

.member-card-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.date-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.date-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #a1a1aa);
  font-family: monospace;
}

.date-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.member-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.member-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  transition: none;
  transform: none;
  display: block;
}

.member-card:hover .member-avatar-img {
  transform: none;
}


.modal-cover-banner {
  width: 100%;
  height: 120px;
  background: #000000;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: none;
}

.modal-avatar-vip-wrap {
  position: relative;
  display: inline-block;
  z-index: 20;
}

.modal-avatar-vip-wrap .modal-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 4px solid #0c0c0e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  background: #0c0c0e;
  object-fit: cover;
  position: relative;
  z-index: 20;
}

.modal-vip-badge {
  position: absolute;
  top: -6px;
  right: 2px;
  font-size: 24px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.badge-staff {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

.modal-bio-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  font-style: italic;
}

.modal-info-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-info-label {
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
}

.btn-copy-id {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 3px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-copy-id:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-levels-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
}

.modal-lvl-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: none !important;
  transform: none !important;
}

.modal-lvl-card:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  transform: none !important;
}

.modal-lvl-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-lvl-icon.chat-icon {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.modal-lvl-icon.voice-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.modal-lvl-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-lvl-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-lvl-values {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.modal-lvl-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-lvl-xp {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: monospace;
}

.card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-info p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.card-info h3 {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.center-text {
  align-items: center;
  text-align: center;
}

/* =============== SCRIPTS CARD =============== */
.action-card {
  background: var(--card-bg);
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  border: 1px dashed var(--border-color);
}

.action-card:hover {
  border-style: solid;
  border-color: var(--border-hover);
  background: var(--card-hover);
}

.card-icon {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 50%;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.action-card:hover .card-icon {
  transform: scale(1.05) rotate(3deg);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

/* =============== MODALS =============== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overscroll-behavior: contain !important;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  overscroll-behavior: none !important;
}

html:has(body.modal-open) {
  overflow: hidden !important;
  height: 100vh !important;
  overscroll-behavior: none !important;
}

body.modal-open > header,
body.modal-open > main,
body.modal-open > footer {
  pointer-events: none !important;
  user-select: none !important;
  filter: blur(2px);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
  opacity: 1 !important;
}

.modal {
  background: #111113;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  width: 90%;
  max-width: 500px;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.member-profile-modal {
  transform: none !important;
  transition: opacity 0.2s ease !important;
}

.modal-overlay .member-profile-modal {
  transform: none !important;
  opacity: 0;
}

.modal-overlay.active .member-profile-modal {
  transform: none !important;
  opacity: 1;
}

.modal-avatar {
  transition: none !important;
  transform: none !important;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(220, 38, 38, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  border-radius: 6px !important;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
  transform: none !important;
  animation: none !important;
}

.modal-close:hover {
  background: rgba(220, 38, 38, 0.28) !important;
  border-color: rgba(220, 38, 38, 0.55) !important;
  color: #fca5a5 !important;
  transform: none !important;
  animation: none !important;
}

.modal-close:active {
  background: rgba(220, 38, 38, 0.38) !important;
  transform: none !important;
}

.btn-edit-custom-role,
.btn-edit-base-role {
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: #818cf8;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-edit-custom-role:hover,
.btn-edit-base-role:hover {
  background: rgba(88, 101, 242, 0.22);
  border-color: rgba(88, 101, 242, 0.5);
  color: #a5b4fc;
}

.btn-del-custom-role {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-del-custom-role:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* =============== SCRIPTS IFRAME MODAL =============== */
.script-iframe-modal {
  max-width: 1200px;
  width: 95%;
  height: 85vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.script-iframe-modal .modal-close {
  top: 10px;
  right: 15px;
  z-index: 99999;
}

.script-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
}

/* =============== AUTH MODAL =============== */
.auth-modal {
  max-width: 420px;
}

.modal-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 25px;
  color: var(--text-main);
}

.auth-message {
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border 0.3s, box-shadow 0.3s;
  font-family: "Inter", sans-serif;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(212, 212, 216, 0.1);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-link {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: var(--border-color);
  font-weight: 500;
  transition: all 0.2s;
}

.auth-link:hover {
  color: var(--text-muted);
  text-decoration-color: var(--text-muted);
}

.auth-footer {
  text-align: center;
  margin-top: 25px;
  font-size: 13px;
  color: var(--text-muted);
}

/* =============== MEMBER MODAL =============== */
.modal-banner {
  width: 100%;
  height: 120px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: var(--border-color);
}

.modal-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-avatar-container {
  text-align: center;
  margin-top: -50px;
  margin-bottom: 15px;
}

.modal-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-color);
  object-fit: cover;
  background: var(--bg-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-name {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 5px;
  color: var(--text-main);
}

.modal-role {
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 15px;
  border-radius: 99px;
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 500;
}

/* =============== CENTERED MESSAGE (Loading/Empty) =============== */
.centered-message {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-muted);
  animation: fadeInUp 0.5s ease;
}

.centered-message p {
  font-size: 20px;
  font-weight: 700;
  margin-top: 15px;
  color: var(--text-muted);
}

/* =============== LOADING SPINNER =============== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* =============== TOAST NOTIFICATIONS =============== */
#toast-container {
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 14px;
}

.toast.active { transform: translateX(0); }
.toast-icon { width: 20px; height: 20px; flex-shrink: 0; }
.toast-success { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.toast-error { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.toast-warn { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }

/* =============== PROFILE DROPDOWN =============== */
.profile-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.header-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  object-fit: cover;
  transition: all var(--transition-speed);
}

.header-avatar:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
  transform: scale(1.05);
}

.avatar-upload-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-color);
  transition: border-color 0.2s ease;
  display: block;
  transform: none !important;
}

.avatar-upload-wrapper:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: none !important;
}

.avatar-upload-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block;
  transform: none !important;
  transition: none !important;
}

.camera-icon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  border-radius: 50%;
  transform: none !important;
}

.avatar-upload-wrapper:hover .camera-icon-overlay {
  opacity: 1;
}

.settings-nav-item.disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  color: #52525b !important;
  background: transparent !important;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 240px;
  background: rgba(20, 20, 25, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 10px 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: rgba(20, 20, 25, 0.95);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.dropdown-header {
  padding: 10px 20px;
  text-align: center;
}

#dropdownUserRole {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-glow);
  color: var(--accent-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px var(--accent-glow);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  border: none;
  margin: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding-left: 25px;
}

.dropdown-logout:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* =============== SETTINGS NAV =============== */
.settings-nav-item {
  display: block;
  padding: 10px 15px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.settings-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-weight: 600;
}

/* =============== DASHBOARD MODAL =============== */
.dashboard-modal {
  max-width: 1200px !important;
  width: 95vw !important;
  height: 85vh !important;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  background: #09090b;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overscroll-behavior: contain !important;
}

.dashboard-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.dashboard-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dashboard-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.dashboard-logo h2 {
  font-size: 20px;
  margin: 0;
  color: var(--text-main);
  font-weight: 700;
}

.dashboard-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.dashboard-sidebar {
  width: 260px;
  background: rgba(255, 255, 255, 0.01);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
  overscroll-behavior: contain !important;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: all var(--transition-speed);
  font-size: 14px;
}

.dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.dash-nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  box-shadow: inset 3px 0 0 var(--primary-color);
}

.dashboard-main {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: var(--bg-color);
  overscroll-behavior: contain !important;
}

/* =============== DASHBOARD STATS =============== */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--transition-speed);
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
  transform: translateY(-2px);
}

.stat-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-info h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-info h2 {
  font-size: 28px;
  color: var(--text-main);
  margin: 0;
  font-weight: 700;
}

.dash-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
}

/* =============== ACTIVITY LOG =============== */
.activity-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px dashed var(--border-color);
  align-items: flex-start;
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.act-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.act-content { flex: 1; }
.act-content p { color: var(--text-main); margin: 0 0 4px 0; }
.act-content small { color: var(--text-muted); }

.act-time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.mt-20 { margin-top: 20px; }

/* =============== FOOTER =============== */
#footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: 60px 40px 20px 40px;
  color: var(--text-main);
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.footer-brand { max-width: 300px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.footer-logo span {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 25px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition-speed);
  text-decoration: none;
}

.social-icon:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.footer-links-group { min-width: 140px; }

.footer-links-group h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer-links-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-group a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
  font-weight: 500;
}

.footer-links-group a:hover { color: var(--text-main); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-green-text {
  color: var(--accent-color);
  font-weight: 600;
}

/* =============== RESPONSIVENESS =============== */
@media (max-width: 900px) {
  #landing-page {
    flex-direction: column;
    text-align: center;
    padding: 60px 30px;
  }

  #landing-page-search { justify-content: center; }
  #landing-page-image-container { margin-top: 50px; }
  
  .dashboard-layout { flex-direction: column; }
  .dashboard-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 10px; }
  .dash-nav-item { white-space: nowrap; }
}

.settings-modal {
  max-width: 760px !important;
  width: 92% !important;
  height: 630px !important;
  max-height: 88vh !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

.settings-modal .settings-tab {
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .footer-container { flex-direction: column; text-align: center; align-items: center; }
  .footer-brand { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .footer-links-group { text-align: center; margin-top: 20px; }
  .footer-socials { justify-content: center; }
  
  .dashboard-modal {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
  }
  
  .settings-modal > div { flex-direction: column; height: 100vh !important; overflow: hidden; }
  .settings-modal > div > div:first-child { 
      width: 100% !important; 
      border-right: none !important; 
      border-bottom: 1px solid var(--border-color);
      display: flex;
      overflow-x: auto;
      padding: 10px !important;
  }
  .settings-modal > div > div:first-child h3 { display: none; }
  .settings-nav-item { white-space: nowrap; margin-right: 10px; }
  .settings-modal > div > div:last-child { flex: 1; padding: 20px !important; overflow-y: auto; }
}

@media (max-width: 600px) {
  #header { padding: 15px 20px; flex-wrap: wrap; gap: 10px; }
  #server-name { display: none; }
  .content-section { padding: 20px 20px 40px 20px; }
  #landing-page h1 { font-size: 38px; }
  
  #header-links { width: 100%; justify-content: center; margin-top: 5px; }
  #header-links a {
    padding: 8px 12px;
    font-size: 14px;
    flex: 1;
    text-align: center;
  }
  
  .cards-grid { grid-template-columns: 1fr; }
  .dash-stats-grid { grid-template-columns: 1fr; }
  
  .modal-content { padding: 25px 20px; }
  .auth-title { font-size: 20px; }
  
  .toast { min-width: auto; width: 90vw; }
}

.terms-checkbox-container { transition: all 0.3s; }
.terms-checkbox-container.highlightError {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.script-card-blue {
  border-color: rgba(88, 101, 242, 0.3) !important;
  background: rgba(88, 101, 242, 0.04) !important;
  opacity: 1 !important;
  filter: none !important;
  cursor: pointer !important;
  border-style: solid !important;
}

.script-card-blue:hover {
  border-color: rgba(88, 101, 242, 0.5) !important;
  background: rgba(88, 101, 242, 0.08) !important;
  box-shadow: 0 15px 30px rgba(88, 101, 242, 0.15);
}

.perm-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
}

.perm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.perm-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(239, 68, 68, 0.3);
  border-radius: 22px;
  transition: all 0.3s;
}

.perm-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #ef4444;
  border-radius: 50%;
  transition: all 0.3s;
}

.perm-toggle input:checked + .perm-slider {
  background: rgba(16, 185, 129, 0.3);
}

.perm-toggle input:checked + .perm-slider::before {
  transform: translateX(18px);
  background: #10b981;
}