@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Refined palette — richer blue-tinted darks */
  --bg-main: #17181b;
  --bg-sidebar: #1e2025;
  --bg-card: #1e2025;
  --bg-card-hover: #262830;
  --bg-input: #131416;
  --accent: #5865F2;
  --accent-hover: #4752C4;
  --accent-glow: rgba(88, 101, 242, 0.25);
  --accent-subtle: rgba(88, 101, 242, 0.08);
  --success: #23A559;
  --success-glow: rgba(35, 165, 89, 0.25);
  --danger: #DA373C;
  --danger-hover: #A12828;
  --danger-glow: rgba(218, 55, 60, 0.2);
  --text-main: #d1d5db;
  --text-header: #f3f4f6;
  --text-muted: #8b92a0;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(88, 101, 242, 0.5);
  --radius: 12px;
  --radius-card: 16px;
  --radius-button: 8px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.2);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.35);
  --header-height: 64px;
  --sidebar-width: 260px;

  /* Transition presets */
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s var(--ease-snappy);
  --transition-normal: 0.25s var(--ease-snappy);
  --transition-slow: 0.4s var(--ease-snappy);

  /* Glass */
  --glass-bg: rgba(30, 32, 37, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(20px);
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

::selection {
  background: rgba(88, 101, 242, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  transition: background-color 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-header);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== LAYOUT ===== */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

.container-narrow {
  max-width: 1000px;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: var(--header-height);
  background: rgba(23, 24, 27, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-header);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.85;
}

.brand img {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.brand:hover img {
  transform: scale(1.08);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Nav Links (cleaned up from inline styles) */
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transition: width var(--transition-normal);
}

.nav-link:hover {
  color: var(--text-header);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link-report:hover {
  color: var(--danger);
}

.nav-link-report::after {
  background: var(--danger);
}

.nav-link-appeal:hover {
  color: var(--accent);
}

.nav-link-admin {
  color: var(--danger) !important;
}

.nav-link-admin:hover {
  color: #ff6b6b !important;
}

.nav-link-admin::after {
  background: var(--danger);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.avatar:hover {
  border-color: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-button);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  gap: 0.5rem;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-header);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-hover);
  box-shadow: 0 4px 16px var(--danger-glow);
  transform: translateY(-1px);
}

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  padding: 6rem 1rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.12) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1.5px;
  animation: fadeInUp 0.6s var(--ease-snappy) both;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
  animation: fadeInUp 0.6s var(--ease-snappy) 0.1s both;
}

/* ===== GRID & CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* ===== SERVER SELECTION CARDS ===== */
.server-card {
  text-decoration: none;
  color: inherit;
  background: rgba(30, 32, 37, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  transition: all 0.35s var(--ease-snappy);
  display: flex;
  flex-direction: column;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent, rgba(255,255,255,0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.server-card:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(38, 40, 48, 0.85);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.25);
}

.server-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, var(--accent), transparent, var(--accent));
}

.server-card-bg-wrapper {
  height: 120px;
  overflow: hidden;
  position: relative;
}

.server-card-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s var(--ease-snappy);
  filter: brightness(0.7) contrast(1.1);
}

.server-card:hover .server-card-bg {
  transform: scale(1.08);
  filter: brightness(0.85) contrast(1.1);
}

.server-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, var(--bg-card) 100%);
}

.server-card-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
  position: relative;
  z-index: 2;
  flex-grow: 1;
}

.guild-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-main), #22242a);
  border: 4px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--text-header);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  margin-bottom: 1.25rem;
  transition: transform 0.35s var(--ease-bounce), box-shadow 0.35s var(--ease-snappy);
  position: relative;
  z-index: 3;
}

.server-card:hover .guild-icon {
  transform: scale(1.06) translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4), 0 0 20px var(--accent-glow);
  border-color: rgba(88, 101, 242, 0.15);
}

.guild-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-header);
  text-align: center;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.guild-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.04);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  font-weight: 500;
}

.server-card-action {
  width: 100%;
  margin-top: auto;
}

.server-card-action .btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: all 0.25s var(--ease-snappy);
}

.server-card-action .btn-primary {
  background: linear-gradient(135deg, #5865F2, #4752C4);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.15);
  border: none;
}

.server-card:hover .server-card-action .btn-primary {
  background: linear-gradient(135deg, #6974F3, #5865F2);
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.35);
  transform: translateY(-1px);
}

.server-card-action .btn-secondary {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
}

.server-card:hover .server-card-action .btn-secondary {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-header);
  background: rgba(255, 255, 255, 0.04);
}

.card-action-icon {
  transition: transform 0.25s var(--ease-snappy);
}

.server-card:hover .card-action-icon {
  transform: translateX(3px);
}

/* ===== DASHBOARD SIDEBAR LAYOUT ===== */
.dashboard-layout {
  display: flex;
  flex: 1;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  padding: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow: hidden;
}

.sidebar-header > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.sidebar-header .guild-icon-sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-header h3 {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Sidebar Bot Identity Card */
.sidebar-bot-identity-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0.5rem 0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.25s var(--ease-snappy);
  position: relative;
  overflow: hidden;
}

.sidebar-bot-identity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-bot-identity-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(88, 101, 242, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sidebar-bot-identity-card:hover::before {
  opacity: 1;
}

.sidebar-bot-identity-card.active {
  background: rgba(88, 101, 242, 0.1);
  border-color: rgba(88, 101, 242, 0.25);
}

.sidebar-bot-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.sidebar-bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition-fast);
}

.sidebar-bot-identity-card:hover .sidebar-bot-avatar {
  border-color: rgba(88, 101, 242, 0.4);
}

.sidebar-bot-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  color: white;
}

.sidebar-bot-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2.5px solid var(--bg-sidebar);
  box-shadow: 0 0 6px var(--success-glow);
}

.sidebar-bot-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.sidebar-bot-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sidebar-bot-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.sidebar-bot-edit-icon {
  color: var(--text-muted);
  opacity: 0;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-bot-identity-card:hover .sidebar-bot-edit-icon {
  opacity: 1;
  color: var(--accent);
}

/* Sidebar Divider */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--border-color) 50%, transparent 95%);
  margin: 0.5rem 1rem;
}

/* Sidebar Bottom Section */
.sidebar-bottom-section {
  margin-top: auto;
  padding-top: 0;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.5rem 1rem;
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-button);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  transition: height var(--transition-fast);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-header);
}

.nav-item.active {
  background: rgba(88, 101, 242, 0.1);
  color: var(--accent);
}

.nav-item.active::before {
  height: 60%;
}

.main-content {
  flex: 1;
  background: var(--bg-main);
}

.main-content-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 3rem;
  animation: fadeInUp 0.35s var(--ease-snappy) both;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  color: var(--text-header);
  font-family: inherit;
  font-size: 0.925rem;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
  background: rgba(255,255,255,0.02);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238b92a0' 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 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control option {
  background-color: #131416;
  color: #f3f4f6;
}

/* ===== COMMAND / PLUGIN LIST ===== */
.command-item {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.command-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.command-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.command-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.command-info h3::before {
  content: "/";
  color: var(--accent);
  font-weight: bold;
}

.command-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.5rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-button);
  margin-bottom: 1.5rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(88, 101, 242, 0.2);
  color: var(--text-header);
  animation: fadeInUp 0.3s var(--ease-snappy) both;
}

.alert-danger {
  background: rgba(218, 55, 60, 0.08);
  border-color: rgba(218, 55, 60, 0.2);
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.mobile-toggle:hover {
  color: var(--text-header);
}

/* ===== DISCORD PREVIEW ===== */
.discord-preview-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  position: sticky;
  top: 2rem;
  border: 1px solid var(--border-color);
}

.discord-preview-header {
  background: rgba(0,0,0,0.15);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.discord-preview {
    background-color: #2b2d31;
    padding: 1.5rem;
    font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #dbdee1;
}

.discord-message {
    display: flex;
    gap: 1rem;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.discord-message-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.discord-header {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}

.discord-author {
    color: #f2f3f5;
    font-size: 1rem;
    font-weight: 500;
}

.discord-bot-tag {
    background-color: #5865F2;
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 0.2rem;
    display: inline-flex;
    align-items: center;
}

.discord-timestamp {
    color: #949ba4;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.discord-text {
    font-size: 1rem;
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.discord-embed {
    background-color: #2b2d31;
    border-left: 4px solid #202225;
    border-radius: 4px;
    padding: 0.8rem 1rem;
    margin-top: 0.3rem;
    max-width: 432px;
}

.discord-embed-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.discord-embed-description {
    font-size: 0.875rem;
    line-height: 1.125rem;
    color: #dbdee1;
    white-space: pre-wrap;
}

.discord-embed-image {
    margin-top: 1rem;
    max-width: 100%;
    border-radius: 4px;
    display: none;
}
.discord-embed-footer {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #dbdee1;
    display: flex;
    align-items: center;
}
.discord-components {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.discord-button {
    background-color: #4e5058;
    color: #dbdee1;
    padding: 2px 16px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    line-height: 28px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s;
}
.discord-button:hover {
    background-color: #6d6f78;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: all 0.3s var(--ease-bounce);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: all 0.3s var(--ease-bounce);
  border-radius: 50%;
}
input:checked + .toggle-slider {
  background-color: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 12px var(--success-glow);
}
input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background-color: white;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(88, 101, 242, 0); }
  100% { box-shadow: 0 0 0 0 rgba(88, 101, 242, 0); }
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes saveGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(35, 165, 89, 0.2); }
  50% { box-shadow: 0 4px 25px rgba(35, 165, 89, 0.5); }
}

.float { animation: float 3s ease-in-out infinite; }
.pulse { animation: pulse 2s infinite; }

/* ===== FEATURE CARDS (HOME) ===== */
.feature-card {
  text-align: center;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  transition: all 0.3s var(--ease-snappy);
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-6px);
  border-color: rgba(88, 101, 242, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(88, 101, 242, 0.08);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  margin-top: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE & MOBILE ===== */
@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    z-index: 1000;
    background: rgba(30, 32, 37, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    transition: left 0.35s var(--ease-snappy);
    padding: 0;
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-docs, .switch-server-btn {
    display: none !important;
  }
  
  .sidebar.active {
    left: 0;
  }
  
  /* Backdrop */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  
  body:has(.sidebar.active)::after {
    opacity: 1;
    pointer-events: auto;
  }
  
  body:has(.sidebar.active) {
    overflow: hidden;
  }
  
  body.no-scroll {
    overflow: hidden;
  }

  .sidebar-header {
    margin-bottom: 0;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    justify-content: space-between;
  }
  
  .close-sidebar-btn {
    display: flex !important;
  }
  
  .mobile-toggle {
    display: block;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
  .main-content-inner {
    padding: 1.5rem;
  }
  
  .sidebar-scroll-area {
    display: block !important;
    flex: none !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 3rem !important;
  }
}

/* Close Sidebar Button (Hidden on Desktop) */
.close-sidebar-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-snappy);
  margin-left: auto;
}

.close-sidebar-btn:hover {
  background: rgba(218, 55, 60, 0.12);
  color: var(--danger);
  transform: rotate(90deg);
}

/* Sidebar Scroll Area */
.sidebar-scroll-area {
  flex: 1;
  min-height: 0;
  height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  scroll-behavior: smooth;
}

.sidebar-scroll-area > * {
  flex-shrink: 0;
}

/* ===== COLLAPSIBLE NAV GROUPS ===== */
.nav-group {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  overflow: hidden;
}

.nav-group.open {
  background: transparent;
}

.nav-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.nav-group-header:hover {
  color: var(--text-header);
}

.nav-group-header .chevron {
  transition: transform 0.3s var(--ease-snappy);
  color: var(--text-muted);
}

.nav-group.open .nav-group-header .chevron {
  transform: rotate(180deg);
  color: var(--text-header);
}

.nav-group.open .nav-group-header {
  color: var(--text-main);
}

.nav-group-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-snappy);
}

.nav-group.open .nav-group-content {
  grid-template-rows: 1fr;
}

.nav-group-content-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 0 0.5rem 0;
  gap: 0.1rem;
}

.nav-group .nav-item {
  padding-left: 2.5rem;
  margin: 0 0.5rem;
  border-radius: var(--radius-button);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
  .grid { grid-template-columns: 1fr; }
  
  .feature-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-right: -2rem;
    padding-right: 2rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .feature-grid::-webkit-scrollbar {
    display: none;
  }
  
  .feature-grid {
    scrollbar-width: none;
  }

  .feature-grid .feature-card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    margin-bottom: 0;
  }
}

/* ===== FILE UPLOAD ===== */
.custom-file-upload {
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  background: var(--bg-input);
  transition: all 0.25s var(--ease-snappy);
  overflow: hidden;
}

.custom-file-upload:hover {
  border-color: var(--accent);
  background: rgba(88, 101, 242, 0.03);
}

.custom-file-upload.dragover {
  border-color: var(--success);
  background: rgba(35, 165, 89, 0.05);
  box-shadow: 0 0 20px var(--success-glow);
}

.upload-btn-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.upload-btn-wrapper:hover {
  color: var(--text-header);
}

.upload-icon {
  color: var(--accent);
  transition: transform 0.25s var(--ease-bounce);
}

.upload-btn-wrapper:hover .upload-icon {
  transform: translateY(-3px);
}

.file-preview-container {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  animation: slideDown 0.25s var(--ease-snappy);
}

.file-preview-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-button);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
}

.file-info-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.btn-clear-file {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-clear-file:hover {
  background: rgba(218, 55, 60, 0.1);
  color: var(--danger);
}

/* ===== CARD EDIT MODE ===== */
.card.editing {
  border: 1px solid rgba(88, 101, 242, 0.4);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.15);
  transform: translateY(-2px);
  position: relative;
}

.card.editing::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #7289da 100%);
  animation: shimmer 2s infinite linear;
  background-size: 200% 100%;
}

/* ===== INPUT GROUPS ===== */
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.7rem 1.25rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-button) 0 0 var(--radius-button);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.15rem;
  user-select: none;
  flex-shrink: 0;
}

.input-group .form-control {
  border-radius: 0 var(--radius-button) var(--radius-button) 0;
  flex: 1;
  min-width: 0;
}

.button-config-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  border-radius: var(--radius-button);
  border: 1px solid rgba(255, 255, 255, 0.02);
  align-items: center;
  animation: rowFadeIn 0.25s var(--ease-snappy);
  flex-wrap: nowrap;
}

.button-config-row .form-control {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

#embed-fields {
  border-left: 4px solid var(--accent);
  transition: border-color 0.2s ease;
}

/* ===== DISCORD ATTACHMENT LINK ===== */
.discord-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  color: #00a8fc;
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
  margin: 2px 0;
  word-break: break-all;
}

.discord-attachment-link:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #14b1ff;
  text-decoration: underline;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: rgba(30, 32, 37, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-header);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s var(--ease-snappy);
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

/* Toast progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 12px 12px;
  animation: toastProgress 3s linear forwards;
}

.toast-progress.toast-error {
  background: var(--danger);
}

.toast-progress.toast-success {
  background: var(--success);
}

@media (max-width: 600px) {
  .toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    align-items: center;
  }
  .toast {
    min-width: 100%;
    transform: translateY(120%);
  }
  .toast.show {
    transform: translateY(0);
  }
}

/* ===== MODALS (Shared) ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.25s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  border-radius: var(--radius-card);
  padding: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  animation: modalSlideIn 0.3s var(--ease-snappy) both;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== DISCORD CUSTOM SELECT ===== */
.discord-select-container {
    position: relative;
    width: 100%;
}

.discord-select-value {
    display: flex;
    align-items: center;
    cursor: pointer;
    min-height: 40px;
    padding: 0.375rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.discord-select-value:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.discord-select-badge {
    display: inline-flex;
    align-items: center;
    background: #5865F2;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.discord-select-badge .hash {
    opacity: 0.7;
    margin-right: 4px;
    font-style: italic;
    font-size: 1.1em;
}

.discord-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    margin-top: 4px;
    background: #1e2025;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    animation: scaleIn 0.2s var(--ease-snappy) both;
}

.discord-select-search {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: white;
    outline: none;
    font-size: 0.9rem;
}

.discord-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 6px;
}

.discord-select-options::-webkit-scrollbar {
    width: 6px;
}
.discord-select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.discord-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.discord-select-option {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 6px;
    color: #dbdee1;
    font-size: 0.925rem;
    margin-bottom: 2px;
    transition: background var(--transition-fast);
}

.discord-select-option:hover,
.discord-select-option.selected {
    background: var(--accent);
    color: white;
}

.discord-select-option .hash {
    opacity: 0.7;
    margin-right: 6px;
    font-style: italic;
    font-size: 1.2em;
}

.discord-select-category {
    padding: 12px 8px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.6px;
    user-select: none;
}

/* ===== FLOATING SAVE BAR ===== */
.floating-save-bar {
    position: fixed;
    bottom: 24px;
    left: calc(50% + 125px);
    transform: translateX(-50%);
    background: rgba(17, 18, 20, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
    z-index: 9999;
    transition: all 0.35s var(--ease-snappy);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 24px);
}
.floating-save-bar.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}
@media (max-width: 900px) {
    .floating-save-bar {
        left: 50%;
        width: calc(100% - 40px);
        justify-content: space-between;
    }
}
.floating-save-bar-text {
    color: var(--text-header);
    font-weight: 500;
    font-size: 0.9rem;
}
.floating-save-bar-actions {
    display: flex;
    gap: 10px;
}

.floating-save-bar-actions .btn-success,
.floating-save-bar-actions [id="floating-save-btn"] {
    animation: saveGlow 2s ease-in-out infinite;
}

/* ===== CARD ENTRANCE STAGGER ===== */
.grid > .card,
.grid > .server-card,
.grid > .feature-card {
  animation: fadeInUp 0.4s var(--ease-snappy) both;
}

.grid > :nth-child(1) { animation-delay: 0s; }
.grid > :nth-child(2) { animation-delay: 0.05s; }
.grid > :nth-child(3) { animation-delay: 0.1s; }
.grid > :nth-child(4) { animation-delay: 0.15s; }
.grid > :nth-child(5) { animation-delay: 0.2s; }
.grid > :nth-child(6) { animation-delay: 0.25s; }
.grid > :nth-child(7) { animation-delay: 0.3s; }
.grid > :nth-child(8) { animation-delay: 0.35s; }
.grid > :nth-child(9) { animation-delay: 0.4s; }
.grid > :nth-child(10) { animation-delay: 0.45s; }
.grid > :nth-child(n+11) { animation-delay: 0.5s; }
