:root {
  --background-primary: #0D0C12;
  --background-secondary: #16151A;
  --background-tertiary: #1F1E24;
  --border-color: #2A2930;
  --text-primary: #e4e4e7;
  --text-secondary: #a0a0ab;
  --text-muted: #70707b;
  --accent-primary: #9b59b6;
  --accent-hover: #b370d1;
  --accent-glow: rgba(155, 89, 182, 0.3);
  --danger-primary: #e5484d;
  --danger-hover: #f16267;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--background-primary);
  color: var(--text-primary);
  font: 14px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Utility Classes */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap { gap: 16px; }
.end { justify-content: flex-end; }
.grow { flex-grow: 1; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* Header */
.site-header {
  background-color: var(--background-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}
.site-header .container { padding: 16px 24px; }
.brand { font-size: 18px; font-weight: 600; }
.brand-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); }

/* Navigation button consistency */
.nav .btn {
  height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
  min-width: auto;
  font-family: inherit;
}

/* Ensure buttons inherit proper font styling */
button.btn {
  font-family: inherit;
  font-weight: 500;
}

/* Buttons */
.btn {
  border: 1px solid var(--border-color);
  background-color: var(--background-tertiary);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background-color: var(--border-color); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background-color: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.btn.primary:hover { background-color: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background-color: var(--danger-primary); border-color: var(--danger-primary); color: white; }
.btn.danger:hover { background-color: var(--danger-hover); border-color: var(--danger-hover); }

/* Typography & Hero */
.hero { text-align: center; margin: 24px 0 40px; }
.hero h2 { font-size: 32px; font-weight: 700; margin: 0 0 12px 0; color: var(--text-primary); }
.hero p { font-size: 16px; margin: 0; color: var(--text-secondary); }

/* Cards */
.card {
  background-color: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: var(--accent-primary); box-shadow: 0 0 20px var(--accent-glow); }
.grid3, .cards { display: grid; gap: 24px; }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 32px 0; }
.cards { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); margin: 32px 0; }

/* Vouch Card Styling */
.card.vouch { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.vouch-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; }
.vouch-head strong { font-weight: 500; color: var(--text-primary); }
.rating { font-size: 18px; letter-spacing: 2px; }
.vouch-body { background-color: var(--background-tertiary); padding: 12px 16px; border-radius: var(--radius-md); color: var(--text-secondary); font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.vouch-image { max-width: 100%; border-radius: var(--radius-md); margin-top: 8px; }

/* Admin Form */
.form .card { max-width: 1000px; margin: 0 auto; padding: 32px; }
.form label { display: block; margin-bottom: 16px; font-weight: 500; color: var(--text-secondary); font-size: 14px; }
.form input, .form textarea, .form select { width: 100%; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background-color: var(--background-primary); color: var(--text-primary); padding: 12px 14px; font-size: 14px; transition: var(--transition); margin-top: 8px; font-family: inherit; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Pair Layout for Form Controls */
.pair { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 16px; 
  align-items: end; 
}

/* Checkbox Styling - Simplified */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
}

.checkbox-label input[type="checkbox"]:hover {
  border-color: var(--accent-hover);
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
}

.checkbox-label span {
  font-size: 14px;
  line-height: 1;
  color: var(--text-secondary);
  font-weight: 500;
}

.standalone-checkbox-row {
  background-color: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 60px;
}
.standalone-checkbox-row .checkbox-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: auto;
  width: auto;
  margin: 0;
  padding: 0;
}

/* Admin Embed Fields & Drag and Drop */
.field-group { margin-bottom: 16px; }
.field-inputs { 
  background-color: var(--background-secondary); 
  border: 1px solid var(--border-color); 
  border-radius: var(--radius-md); 
  padding: 16px; 
  display: grid; 
  grid-template-columns: 1fr 1fr 100px; 
  gap: 16px; 
  align-items: center; 
  cursor: grab; 
  min-height: 60px;
}
.field-inputs:active { cursor: grabbing; }
.field-inputs input[type="text"] { 
  margin: 0; 
  height: 40px;
  line-height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Checkbox in grid - specific styling */
.field-inputs .field-inline-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0;
  padding-top: 12px; /* Move checkbox down more */
}

.field-inputs .field-inline-checkbox .checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.field-inputs .field-inline-checkbox .checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
}

.field-inputs .field-inline-checkbox .checkbox-label span {
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}
.field-actions { margin-top: 8px; padding-left: 4px; }
.field-actions .btn.danger {
  background: transparent;
  border: none;
  color: var(--danger-primary);
  padding: 4px 8px;
  font-weight: 600;
}
.field-actions .btn.danger:hover {
  background-color: var(--danger-primary);
  color: white;
  text-decoration: none;
}
.sortable-ghost {
  background: var(--background-tertiary);
  border: 2px dashed var(--accent-primary);
  opacity: 0.5;
}
.sortable-chosen {
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transform: scale(1.02);
}
.sortable-chosen .field-inputs {
  border-color: var(--accent-primary);
}

/* Variables Table Style */
.vars {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: 24px 0;
}
.vars th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
}
.vars td {
  padding: 14px 16px;
  vertical-align: middle;
}
.vars tbody tr {
  background-color: var(--background-secondary);
}
.vars tbody tr:hover {
  background-color: var(--background-tertiary);
}
.vars td:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}
.vars td:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}
.vars code {
  background-color: var(--accent-primary);
  color: white;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: 'Courier New', Courier, monospace;
}

/* Pagination Footer */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background-color: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 32px;
}
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.pagination-controls .btn { padding: 8px 12px; }
.page-info { color: var(--text-secondary); font-weight: 500; }
.per-page-selector { display: flex; align-items: center; gap: 10px; }
.per-page-selector label { margin: 0; color: var(--text-secondary); font-weight: 500; }
.per-page-selector select {
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 14px;
  margin: 0;
}
.per-page-selector select:focus { outline: 1px solid var(--accent-primary); }

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay[style*="flex"] {
  opacity: 1;
}

.modal-content {
  background-color: var(--background-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay[style*="flex"] .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close:hover {
  background-color: var(--background-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-body .form-group {
  margin-bottom: 20px;
}

.modal-body .form-group:last-child {
  margin-bottom: 0;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.modal-body input[type="text"],
.modal-body input[type="url"],
.modal-body textarea {
  width: 100%;
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.modal-body input[type="text"]:focus,
.modal-body input[type="url"]:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-body textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
  min-width: 120px;
  justify-content: center;
}

.modal-actions .btn.secondary {
  background-color: var(--background-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.modal-actions .btn.secondary:hover {
  background-color: var(--background-primary);
  color: var(--text-primary);
}

/* Star Rating */
.rating-selector {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.rating-selector input[type="radio"] {
  display: none;
}

.rating-selector .star {
  font-size: 28px;
  cursor: pointer;
  filter: grayscale(100%);
  opacity: 0.3;
  transition: all 0.2s ease;
  user-select: none;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.rating-selector .star:hover {
  filter: grayscale(0%);
  opacity: 0.8;
  transform: scale(1.1);
  background-color: var(--background-tertiary);
}

/* Character Counter */
.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Form Hint */
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Desktop Navigation - Hide mobile elements */
.nav-mobile {
  display: none !important;
}

.nav-desktop {
  display: flex;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .field-inputs { grid-template-columns: 1fr; }
  .pagination-footer { justify-content: center; }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header,
  .modal-body {
    padding: 16px;
  }
  
  .modal-actions {
    flex-direction: column;
  }

  /* Mobile Navigation */
  .nav-desktop {
    display: none !important;
  }

  .nav-mobile {
    display: flex !important;
    position: relative;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: var(--background-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px;
    height: 48px;
  }

  .mobile-menu-toggle:hover {
    background-color: var(--border-color);
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 200px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .mobile-menu.show {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu-items {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
  }

  .mobile-menu-item {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    text-align: left;
    padding: 12px 16px;
    justify-content: flex-start;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-menu-item:hover {
    background-color: var(--background-tertiary);
  }

  .mobile-menu-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
  }
}

/* Homepage Specific Styling */
.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

/* Enhanced Stat Cards */
.stat-card {
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-tertiary) 100%);
    border: 1px solid var(--border-color);
    padding: 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(155, 89, 182, 0.15);
    border-color: var(--accent-primary);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 16px;
    display: block;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card .muted {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Info Cards */
.home-info-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--background-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.home-info-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: right 0.6s ease;
}

.home-info-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 50px rgba(155, 89, 182, 0.2);
    border-color: var(--accent-primary);
}

.home-info-card:hover::after {
    right: 100%;
}

.home-info-card.discord {
    background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(88, 101, 242, 0.1) 100%);
}

.home-info-card.purchase {
    background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(87, 242, 135, 0.1) 100%);
}

.home-info-card-icon {
    font-size: 40px;
    background: linear-gradient(135deg, var(--background-tertiary), var(--border-color));
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-info-card-body h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.home-info-card-body h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.home-info-card-body h3 a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.home-info-card-body h3 a:hover::after {
    width: 100%;
}

.home-info-card-body h3 a:hover {
    color: var(--accent-primary);
}

.home-info-card-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* Login Prompt Card */
.login-prompt-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(155, 89, 182, 0.1) 100%);
    border: 2px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
}

.login-prompt-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(155, 89, 182, 0.1), transparent);
    animation: rotate 6s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

.login-prompt-card > * {
    position: relative;
    z-index: 1;
}

.login-prompt-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.login-prompt-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.login-prompt-card p {
    font-size: 16px;
    margin: 0 0 24px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.login-prompt-card .btn.primary {
    font-size: 16px;
    padding: 12px 32px;
    box-shadow: 0 4px 16px rgba(155, 89, 182, 0.4);
    transition: all 0.3s ease;
}

.login-prompt-card .btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(155, 89, 182, 0.6);
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .stat-card {
        grid-column: span 2;
    }
    
    .login-prompt-card {
        grid-column: span 6;
    }
    
    /* Make info cards the same size - each takes 3 columns so together they fill the full width */
    .home-info-card.discord,
    .home-info-card.purchase {
        grid-column: span 3;
    }
}

/* Admin Settings Styling */
.admin-settings {
  margin: 40px 0;
}

.settings-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.channel-selection {
  padding: 24px;
}

.channel-selection h3 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.channel-dropdown {
  width: 100%;
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.channel-dropdown:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.message-id-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.message-id-group input {
  flex: 1;
}

.message-id-group .btn {
  white-space: nowrap;
  padding: 12px 16px;
}

.message-edit .muted {
  margin-top: 8px;
  font-size: 13px;
}

.embed-creator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.embed-form {
  padding: 24px;
}

.embed-form h3 {
  margin: 0 0 24px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.color-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-input-group input[type="color"] {
  width: 50px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}

.color-input-group input[type="text"] {
  flex: 1;
}

.form-section {
  margin: 32px 0;
  padding: 20px;
  background-color: var(--background-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.form-section h4 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.embed-field-group {
  margin-bottom: 16px;
  padding: 20px;
  background-color: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.field-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.field-inputs input,
.field-inputs textarea {
  margin: 0;
  background-color: var(--background-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.field-inputs textarea {
  grid-column: span 2;
}

.field-inputs .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-top: 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* Embed Preview */
.embed-preview {
  padding: 24px;
  position: sticky;
  top: 20px;
}

.embed-preview h3 {
  margin: 0 0 20px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.discord-message {
  background-color: var(--background-primary);
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.bot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  flex-shrink: 0;
}

.bot-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.timestamp {
  color: var(--text-muted);
  font-size: 12px;
}

.discord-embed {
  background-color: var(--background-secondary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 4px;
  padding: 16px;
  margin-top: 8px;
  max-width: 432px;
  position: relative;
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.author-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.author-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.author-name:hover {
  text-decoration: underline;
}

.embed-title {
  color: #00aff4;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.375;
}

.embed-title a {
  color: #00aff4;
  text-decoration: none;
}

.embed-title a:hover {
  text-decoration: underline;
}

.embed-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.375;
  margin-bottom: 16px;
}

.embed-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.embed-field.inline {
  display: inline-block;
  width: calc(33.33% - 8px);
  margin-right: 12px;
}

.field-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.field-value {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.375;
}

.embed-image {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 16px;
}

.embed-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  position: absolute;
  top: 16px;
  right: 16px;
  object-fit: cover;
}

/* Add padding to embed content when thumbnail is present */
.discord-embed:has(.embed-thumbnail) {
  padding-right: 112px;
}

.embed-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
}

.footer-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.footer-timestamp::before {
  content: " • ";
  margin: 0 4px;
}

.preview-placeholder {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 32px;
}

/* Admin Dropdown */
.admin-dropdown {
  position: relative;
  display: inline-block;
}

.admin-dropdown-toggle {
  background-color: var(--background-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  height: 40px;
  min-width: auto;
}

.admin-dropdown-toggle:hover {
  background-color: var(--border-color);
}

.admin-dropdown-toggle::after {
  content: '▼';
  font-size: 10px;
  transition: transform 0.3s ease;
}

.admin-dropdown.open .admin-dropdown-toggle::after {
  transform: rotate(180deg);
}

.admin-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 4px;
}

.admin-dropdown.open .admin-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
}

.admin-dropdown-item:hover {
  background-color: var(--background-tertiary);
}

.admin-dropdown-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

.admin-dropdown-item span {
  margin-right: 8px;
}

@media (max-width: 768px) {
  .embed-creator {
    grid-template-columns: 1fr;
  }
  
  .embed-preview {
    position: static;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .color-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .embed-field.inline {
    display: block;
    width: 100%;
    margin-right: 0;
  }
  
  .field-inputs {
    grid-template-columns: 1fr;
  }
  
  .field-inputs textarea {
    grid-column: span 1;
  }
}

@media (min-width: 1200px) {
    .home-grid {
        gap: 32px;
    }
}

/* Discord Markdown Formatting */
.message-content {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.375;
}

.discord-embed h1, .message-content h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 8px 0;
}

.discord-embed h2, .message-content h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 14px 0 6px 0;
}

.discord-embed h3, .message-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 12px 0 4px 0;
}

.discord-embed a, .message-content a {
  color: var(--link-color);
  text-decoration: none;
}

.discord-embed a:hover, .message-content a:hover {
  text-decoration: underline;
}

.discord-embed code {
  background-color: var(--background-primary);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.85em;
}

.discord-embed pre {
  background-color: var(--background-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--border-color);
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.85em;
  margin: 8px 0;
  overflow-x: auto;
}

.discord-embed pre code {
  background: none;
  padding: 0;
}

.discord-embed .spoiler {
  background-color: var(--text-muted);
  color: transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: var(--transition);
}

.discord-embed .spoiler:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

.discord-embed u {
  text-decoration: underline;
}

.discord-embed s {
  text-decoration: line-through;
  opacity: 0.7;
}