/* BESTBOT THEME OVERRIDES */

:root {
  --bg-color: #121212;
  --bg-secondary: #1e1e1e;
  --panel-bg: #252525;
  --panel-bg-hover: #2f2f2f;
  --sidebar-bg: #1a1a1a;
  --server-sidebar-bg: #121212;
  --primary: #5865F2; /* Discord Blurple */
  --primary-hover: #4752C4;
  --primary-soft: rgba(88, 101, 242, 0.15);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-muted: #9ba1a6;
  --radius-lg: 12px;
  --radius-md: 8px;
}

body {
  background-color: var(--bg-color);
}

body::before {
  display: none; /* Remove subtle grid from previous theme */
}

/* Dual Sidebar Layout */
.settings-layout {
  display: flex;
  height: calc(100vh - var(--nav-height));
  position: relative;
}

.servers-sidebar {
  width: 72px;
  background: var(--server-sidebar-bg);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
  overflow-y: auto;
}

.servers-sidebar::-webkit-scrollbar {
  width: 0px;
}

.server-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.server-icon-btn:hover {
  border-radius: 16px;
  background: var(--primary);
}

.server-icon-btn.active {
  border-radius: 16px;
  background: var(--primary);
}

.server-icon-btn.active::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 32px;
  background: white;
  border-radius: 4px;
}

.server-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-separator {
  width: 32px;
  height: 2px;
  background: var(--glass-border);
  margin: 4px 0;
}

.home-btn {
  color: var(--text-muted);
}
.home-btn:hover {
  color: white;
}

/* Secondary Sidebar */
.settings-sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  overflow-y: auto;
}

.settings-sidebar .sidebar-server-info {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.settings-sidebar .srv-name {
  font-size: 18px;
  font-weight: 800;
  color: white;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 8px 8px;
}

.sidebar-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.sidebar-item:hover {
  background: var(--panel-bg);
  color: var(--text-main);
}

.sidebar-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-item.active::before {
  display: none; /* Remove old style */
}

/* Content Area */
.settings-content {
  flex: 1;
  background: var(--bg-color);
  overflow-y: auto;
  padding: 40px;
}

.module-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.module-header h2 {
  font-size: 20px;
  font-weight: 700;
}

/* Best Bot Grid */
.bestbot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.bestbot-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bestbot-card:hover {
  background: var(--panel-bg);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.bestbot-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bestbot-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.bestbot-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  font-size: 14px;
  color: var(--text-muted);
}

.bestbot-card.active .bestbot-card-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.bestbot-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* ==============================
   Inner Module Pages (Best Bot)
   ============================== */

.bb-module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--glass-border);
  padding: 30px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.bb-module-header h2 {
  font-size: 24px;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
}

.bb-module-header .module-desc {
  color: var(--text-muted);
  margin: 0;
  font-size: 14px;
  max-width: 600px;
  line-height: 1.5;
}

.bb-settings-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.bb-settings-card h3 {
  font-size: 16px;
  margin: 0 0 8px 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-settings-card .card-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 20px 0;
}

/* Forms */
.bb-form-group {
  margin-bottom: 20px;
}

.bb-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bb-input, .bb-select, .bb-textarea {
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.bb-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.bb-input:focus, .bb-select:focus, .bb-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.bb-form-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}
.bb-form-row .bb-form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Toggles */
.toggle-slider {
  background: #3f4147;
}

.toggle-switch input:checked + .toggle-slider {
  background: #3ba55c; /* Green color for toggles in Discord */
  border-color: #3ba55c;
}

/* Tables */
.bb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
}
.bb-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--glass-border);
}
.bb-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.bb-table tr:last-child td {
  border-bottom: none;
}
