* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0b0f1a;
  background-image: radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.06), transparent 35%);
  color: #e7e9ee;
  min-height: 100vh;
}
a { color: inherit; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid #1c2334;
  background: rgba(11, 15, 26, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  color: #e7e9ee;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.navbar .nav-links { display: flex; gap: 28px; align-items: center; }
.navbar .nav-links a { color: #9aa3b5; text-decoration: none; font-size: 14px; transition: color 0.15s ease; }
.navbar .nav-links a:hover { color: #e7e9ee; }

.user-menu { position: relative; }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: block;
  border: 1px solid #232a3d;
  transition: border-color 0.15s ease;
}
.user-avatar:hover { border-color: #6366f1; }
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 42px;
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 10px;
  padding: 6px;
  min-width: 170px;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.user-dropdown.show { display: block; }
.user-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: #e7e9ee;
  text-decoration: none;
  font-size: 14px;
}
.user-dropdown a:hover { background: #1c2334; }

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 90px 24px 60px;
  text-align: center;
  position: relative;
}
.hero-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 65%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}
.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 24px;
  position: relative;
  box-shadow: 0 0 0 1px #232a3d, 0 20px 50px rgba(99, 102, 241, 0.25);
}
.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 20px;
  position: relative;
}
.hero h1 .accent { color: #818cf8; }
.hero p {
  color: #9aa3b5;
  font-size: 17px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 32px;
  position: relative;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
  text-align: left;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.feature-card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: #6366f1; }
.feature-icon {
  color: #6366f1;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.feature-blue:hover { border-color: #6366f1; }
.feature-blue .feature-icon { color: #818cf8; }
.feature-teal:hover { border-color: #14b8a6; }
.feature-teal .feature-icon { color: #2dd4bf; }
.feature-red:hover { border-color: #ef4444; }
.feature-red .feature-icon { color: #f87171; }
.feature-amber:hover { border-color: #f59e0b; }
.feature-amber .feature-icon { color: #fbbf24; }
.feature-purple:hover { border-color: #8b5cf6; }
.feature-purple .feature-icon { color: #a78bfa; }
.feature-pink:hover { border-color: #ec4899; }
.feature-pink .feature-icon { color: #f472b6; }

.hero-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 640px;
  margin: 28px auto 0;
}
.hero-stat {
  background: #131826;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  border-top: 2px solid #6366f1;
}
.hero-stat.stat-blue-top { border-top-color: #378ADD; }
.hero-stat.stat-teal-top { border-top-color: #1D9E75; }
.hero-stat.stat-amber-top { border-top-color: #EF9F27; }
.hero-stat.stat-purple-top { border-top-color: #7F77DD; }
.hero-stat-number { font-size: 20px; color: #a5b4fc; font-weight: 600; }
.hero-stat-label { font-size: 12px; color: #9aa3b5; margin-top: 2px; }

.hero-pricing-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 640px;
  margin: 40px auto 0;
}
.hero-price-card {
  background: #131826;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  border: 1px solid #232a3d;
}
.hero-price-card.featured { border: 2px solid #6366f1; }
.hero-price-card.gold { border-color: #f59e0b; }
.hero-price-tier { font-size: 13px; color: #9aa3b5; margin-bottom: 4px; }
.hero-price-card.featured .hero-price-tier { color: #a5b4fc; }
.hero-price-card.gold .hero-price-tier { color: #fbbf24; }
.hero-price-amount { font-size: 20px; color: #f5f7fa; font-weight: 600; }
.feature-card h3 { margin: 0 0 6px; font-size: 15px; }
.feature-card p { margin: 0; color: #9aa3b5; font-size: 13px; line-height: 1.5; }

.container {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px;
}
.container h1 { font-size: 30px; margin-bottom: 6px; }
.container > p.subtitle { color: #9aa3b5; margin-bottom: 32px; }

.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: #0e1320;
  border-right: 1px solid #1c2334;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e7e9ee;
  font-weight: 600;
  font-size: 17px;
  padding: 8px 10px 20px;
}
.sidebar-brand img { width: 30px; height: 30px; border-radius: 50%; }
.sidebar-section {
  color: #565f77;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 14px 6px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-spacer { flex: 1; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #9aa3b5;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-icon { width: 17px; height: 17px; flex-shrink: 0; color: inherit; }
.sidebar-link:hover { background: #151b2b; color: #e7e9ee; }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0.06));
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-top: 1px solid #1c2334;
}
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; }
.sidebar-user { display: flex; flex-direction: column; font-size: 13px; }
.sidebar-user span { color: #e7e9ee; font-weight: 500; }
.sidebar-user a { color: #77809a; text-decoration: none; font-size: 12px; }
.sidebar-user a:hover { color: #f0a3a3; }

.app-main { flex: 1; min-width: 0; position: relative; }
.app-main::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='300' viewBox='0 0 340 300'%3E%3Cg fill='none' stroke-width='1.5'%3E%3Cpolygon points='60,15 100,38 100,84 60,107 20,84 20,38' stroke='%236366f1'/%3E%3Cpolygon points='240,45 280,68 280,114 240,137 200,114 200,68' stroke='%2314b8a6'/%3E%3Cpolygon points='150,170 190,193 190,239 150,262 110,239 110,193' stroke='%23f59e0b'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}
.app-topbar, .app-content, .legal-bar { position: relative; z-index: 1; }
.app-topbar {
  display: flex;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid #1c2334;
}
.app-search {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 8px;
  padding: 9px 16px;
  color: #e7e9ee;
  font-size: 14px;
  max-width: 340px;
  width: 100%;
}
.app-search::placeholder { color: #77809a; }
.app-search:focus { outline: none; border-color: #6366f1; }
.search-wrapper { position: relative; max-width: 340px; width: 100%; }
.search-results {
  display: none;
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 10px;
  padding: 6px;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  max-height: 320px;
  overflow-y: auto;
}
.search-results.show { display: block; }
.search-group-label {
  color: #565f77;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px 4px;
}
.search-result {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #e7e9ee;
  text-decoration: none;
  font-size: 13px;
}
.search-result:hover { background: #1c2334; }
.search-result-desc { color: #77809a; font-size: 12px; }
.search-empty { padding: 10px; color: #77809a; font-size: 13px; }
.app-content { padding: 32px; max-width: 1100px; }
.app-content h1 { font-size: 28px; margin: 0 0 6px; }
.app-content .subtitle { color: #9aa3b5; margin-bottom: 28px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.stat-card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 12px;
  padding: 18px 20px;
}
.stat-number { font-size: 26px; font-weight: 700; color: #e7e9ee; }
.stat-label { color: #9aa3b5; font-size: 13px; margin-top: 4px; }
.stat-card { border-top: 3px solid transparent; }
.stat-blue { border-top-color: #6366f1; }
.stat-blue .stat-number { color: #a5b4fc; }
.stat-amber { border-top-color: #f59e0b; }
.stat-amber .stat-number { color: #fbbf24; }
.stat-red { border-top-color: #ef4444; }
.stat-red .stat-number { color: #f87171; }
.stat-purple { border-top-color: #a855f7; }
.stat-purple .stat-number { color: #c084fc; }
.stat-teal { border-top-color: #14b8a6; }
.stat-teal .stat-number { color: #2dd4bf; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0e1320;
  border: 1px solid #1c2334;
  border-radius: 8px;
}
.activity-text { font-size: 13px; color: #b7bfd1; }
.activity-text strong { color: #e7e9ee; }
.activity-reason { color: #77809a; }
.activity-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}
.activity-ban { background: #3a1616; color: #f0a3a3; }
.activity-kick { background: #3a2a16; color: #f0c3a3; }
.activity-timeout { background: #3a3016; color: #f0dba3; }
.activity-warn { background: #35341a; color: #e3e08a; }
.rank-badge {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  padding: 3px 9px;
  border-radius: 5px;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #4f52d6);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35); }
.btn-secondary {
  background: transparent;
  border: 1px solid #2b3348;
  color: #e7e9ee;
}
.btn-secondary:hover { background: #151b2b; box-shadow: none; transform: none; }

.back-link { color: #9aa3b5; text-decoration: none; font-size: 14px; }
.back-link:hover { color: #e7e9ee; }

.server-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.server-card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #e7e9ee;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.server-card:hover { border-color: #6366f1; transform: translateY(-2px); }
.server-card img, .server-icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: block;
  background: linear-gradient(135deg, #6366f1, #4f52d6);
}

.card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: #262e45; }
.card h3 { margin: 0 0 16px; font-size: 16px; }

form { margin-top: 20px; }
label {
  display: block;
  margin-bottom: 18px;
  font-size: 14px;
  color: #b7bfd1;
}
select, input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #232a3d;
  background: #0e1320;
  color: #e7e9ee;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
select:focus, input:focus { outline: none; border-color: #6366f1; }

hr { border: none; border-top: 1px solid #1c2334; margin: 28px 0; }
small { color: #77809a; display: block; margin-top: 4px; }

.premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #3a2e02;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #14351f; color: #86e3a6; border: 1px solid #1f5c34; }
.toast-error { background: #3a1616; color: #f0a3a3; border: 1px solid #5c1f1f; }

.command-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.command-card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}
.command-card:hover { border-color: #6366f1; }
.command-card .name { font-weight: 600; font-size: 15px; color: #a5b4fc; }
.command-card .desc { color: #9aa3b5; font-size: 13px; margin-top: 4px; }
.category-label {
  color: #6366f1;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 10px;
}
.category-label:first-of-type { margin-top: 8px; }
.cat-blue { color: #818cf8; }
.cat-teal { color: #2dd4bf; }
.cat-red { color: #f87171; }
.cat-amber { color: #fbbf24; }
.cat-purple { color: #c084fc; }

.category-block { margin-bottom: 8px; }
.category-desc { color: #77809a; font-size: 13px; margin: 0 0 14px; }

.command-grid-big { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.command-card-big {
  padding: 20px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.command-card-big:hover {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}
.command-card-big .name { font-size: 17px; }
.command-desc-hover {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.pricing-card {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 14px;
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.pricing-popular {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1, 0 20px 40px rgba(99, 102, 241, 0.15);
}
.pricing-lifetime { border-color: #f59e0b; }
.pricing-lifetime .pricing-price { color: #fbbf24; }

.server-picker-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #9aa3b5;
  margin: 12px 0;
}
.server-picker {
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 8px;
  padding: 7px 12px;
  color: #e7e9ee;
  font-size: 14px;
}
.pricing-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #6366f1;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 14px;
  border-radius: 999px;
}
.pricing-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pricing-price { font-size: 34px; font-weight: 700; margin: 18px 0; color: #e7e9ee; }
.pricing-price span { font-size: 14px; font-weight: 400; color: #77809a; }
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  font-size: 13px;
  color: #b7bfd1;
  padding-left: 22px;
  position: relative;
}
.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #57f287;
  font-weight: 700;
}
.pricing-features code {
  background: #0e1320;
  border: 1px solid #232a3d;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: #a5b4fc;
}
.billing-toggle {
  position: relative;
  display: inline-flex;
  background: #0e1320;
  border: 1px solid #1c2334;
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 4px;
  width: fit-content;
}
.billing-slider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: linear-gradient(135deg, #6366f1, #4f52d6);
  border-radius: 6px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}
.billing-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: #77809a;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.billing-btn.active { color: #fff; }

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.owner-server-list { display: flex; flex-direction: column; gap: 10px; }

.legal-bar {
  background: #0e1320;
  border-bottom: 1px solid #1c2334;
  padding: 8px 32px;
  font-size: 12px;
  color: #77809a;
  text-align: center;
}
.legal-bar a { color: #a5b4fc; text-decoration: none; }
.legal-bar a:hover { text-decoration: underline; }

.sidebar-link-gold { color: #d4a72c; }
.sidebar-link-gold:hover { background: rgba(212, 167, 44, 0.1); color: #fbbf24; }
.sidebar-link-gold.active {
  background: linear-gradient(135deg, rgba(212, 167, 44, 0.18), rgba(212, 167, 44, 0.06));
  color: #fbbf24;
  border: 1px solid rgba(212, 167, 44, 0.3);
}

.pricing-icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: inherit; }
.pricing-ribbon-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.checkout-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.checkout-gold:hover { box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35); }
.lifetime-savings {
  font-size: 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 16px;
}

.locked-card {
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.08);
}
.locked-card h3 { display: flex; align-items: center; gap: 8px; }
.premium-tag {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #2a1a02;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 5px;
  margin-left: 12px;
  vertical-align: middle;
}
.toggle-row-locked { opacity: 0.55; cursor: not-allowed; }
.toggle-row-locked input { accent-color: #565f77; }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  margin-top: 12px;
  padding-top: 10px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar {
  width: 100%;
  max-width: 22px;
  background: linear-gradient(180deg, #818cf8, #6366f1);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}
.bar-label { font-size: 9px; color: #565f77; margin-top: 6px; writing-mode: vertical-rl; transform: rotate(180deg); height: 40px; }

.diagnostics-results { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.diagnostic-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #0e1320;
  border: 1px solid #1c2334;
  border-radius: 8px;
  font-size: 13px;
}
.diagnostic-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.diagnostic-pass .diagnostic-dot { background: #57f287; }
.diagnostic-warn .diagnostic-dot { background: #fbbf24; }
.diagnostic-fail .diagnostic-dot { background: #f87171; }
.diagnostic-detail { color: #9aa3b5; font-size: 12px; margin-top: 2px; }

.error-list { display: flex; flex-direction: column; gap: 8px; }
.error-row {
  background: #0e1320;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}
.error-row-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.error-source { font-size: 11px; font-weight: 600; color: #f87171; text-transform: uppercase; letter-spacing: 0.04em; }
.error-time { font-size: 11px; color: #77809a; }
.error-message { font-size: 13px; color: #e7e9ee; word-break: break-word; }

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.status-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-approved { background: rgba(87, 242, 135, 0.15); color: #57f287; }
.status-denied { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.color-input-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.color-input-row input[type="text"] { margin-top: 0; flex: 1; }
.color-swatch {
  width: 42px;
  height: 40px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #232a3d;
  background: #0e1320;
  cursor: pointer;
  flex-shrink: 0;
}

.price-strikethrough {
  font-size: 18px;
  color: #565f77;
  text-decoration: line-through;
  font-weight: 500;
  margin-right: 6px;
}
.discount-badge {
  display: inline-block;
  background: rgba(87, 242, 135, 0.15);
  color: #57f287;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  margin-left: 8px;
  vertical-align: middle;
}

.console-output {
  background: #05070c;
  border: 1px solid #1c2334;
  border-radius: 8px;
  padding: 12px 14px;
  height: 320px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  margin-top: 12px;
}
.console-line { color: #9aa3b5; white-space: pre-wrap; word-break: break-word; padding: 1px 0; }
.console-warn { color: #fbbf24; }
.console-error { color: #f87171; }

.app-content {
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.page-fade-out {
  opacity: 0;
  transform: translateY(6px);
}

.changelog-list { margin: 0; padding-left: 20px; color: #b7bfd1; font-size: 14px; line-height: 1.8; }
.changelog-list li { margin-bottom: 2px; }

.owner-server-row-detailed { align-items: flex-start; flex-wrap: wrap; }
.owner-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.owner-mini-stats span {
  font-size: 11px;
  color: #9aa3b5;
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 5px;
  padding: 2px 8px;
}
.owner-mini-warn { color: #f87171 !important; border-color: rgba(239, 68, 68, 0.3) !important; }

.embed-preview-label {
  color: #565f77;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 16px 0 6px;
}
.embed-preview {
  background: #0e1320;
  border: 1px solid #1c2334;
  border-left: 4px solid transparent;
  border-radius: 6px;
  padding: 12px 14px;
  transition: border-left-color 0.15s ease;
}
.embed-preview-active { border-left-width: 4px; }
.embed-preview-title { font-weight: 700; font-size: 14px; color: #e7e9ee; margin-bottom: 4px; }
.embed-preview-desc { font-size: 13px; color: #b7bfd1; white-space: pre-wrap; }
.embed-preview-footer { font-size: 11px; color: #77809a; margin-top: 8px; }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #57f287;
  margin-left: 8px;
  vertical-align: middle;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(87, 242, 135, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px rgba(87, 242, 135, 0); }
}

.save-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #131826;
  border: 1px solid #6366f1;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  z-index: 25;
  animation: fadeInUp 0.25s ease both;
}
.save-bar.show { display: flex; }
.save-bar span { font-size: 14px; color: #e7e9ee; }
.save-bar-actions { display: flex; gap: 10px; flex-shrink: 0; }

.support-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
}
.support-icon { width: 40px; height: 40px; color: #a5b4fc; flex-shrink: 0; }
.support-card h3 { margin: 0 0 2px; }
.support-card .subtitle { margin: 0; }
.support-card .btn { margin-left: auto; flex-shrink: 0; }
.premium-server-list { display: flex; flex-direction: column; gap: 10px; }
.premium-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 10px;
  gap: 12px;
}
.owner-server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #0e1320;
  border: 1px solid #1c2334;
  border-radius: 8px;
  gap: 12px;
}
.owner-server-info { display: flex; flex-direction: column; }
.owner-server-info small { color: #77809a; }

textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #232a3d;
  background: #0e1320;
  color: #e7e9ee;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
textarea:focus { outline: none; border-color: #6366f1; }

.binds-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.binds-table th, .binds-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #1c2334;
  font-size: 14px;
}
.binds-table th { color: #77809a; font-weight: 500; font-size: 13px; }

.btn-delete {
  background: transparent;
  border: 1px solid #5c1f1f;
  color: #f0a3a3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-delete:hover { background: #3a1616; }

.role-options {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #232a3d;
  border-radius: 8px;
  background: #0e1320;
  margin-top: 6px;
}
.role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #e7e9ee;
  cursor: pointer;
  border-bottom: 1px solid #1c2334;
}
.role-option:last-child { border-bottom: none; }
.role-option:hover { background: #151b2b; }
.role-option input { accent-color: #6366f1; }
#role-search { margin-bottom: 0; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e7e9ee;
  margin-bottom: 14px;
  cursor: pointer;
}
.toggle-row input { accent-color: #6366f1; width: 16px; height: 16px; }

select[multiple] {
  height: auto;
}

.custom-select-wrapper { position: relative; margin-top: 6px; }
.native-select-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 1px;
  width: 1px;
  margin: 0;
}
.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #232a3d;
  background: #0e1320;
  color: #e7e9ee;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  text-align: left;
  font-family: inherit;
}
.custom-select-trigger:hover, .custom-select-trigger.open { border-color: #14b8a6; }
.custom-select-trigger::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid #77809a;
  border-bottom: 2px solid #77809a;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-left: 10px;
  flex-shrink: 0;
}
.custom-select-trigger.open::after { transform: rotate(-135deg); }
.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #131826;
  border: 1px solid #1c2334;
  border-radius: 10px;
  padding: 4px;
  max-height: 0;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.custom-select-options.show {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.custom-select-option {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #e7e9ee;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.custom-select-option:hover { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.custom-select-option.selected { color: #2dd4bf; font-weight: 600; }

@media (max-width: 800px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .stat-card, .pricing-card, .server-card {
  animation: fadeInUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.stat-grid .stat-card:nth-child(1) { animation-delay: 0.03s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: 0.09s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: 0.21s; }
.stat-grid .stat-card:nth-child(5) { animation-delay: 0.27s; }
.pricing-grid .pricing-card:nth-child(1) { animation-delay: 0.03s; }
.pricing-grid .pricing-card:nth-child(2) { animation-delay: 0.12s; }
.pricing-grid .pricing-card:nth-child(3) { animation-delay: 0.21s; }

#page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #6366f1, #a5b4fc);
  z-index: 999;
  transition: width 0.4s ease, opacity 0.2s ease;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
}
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .hero { padding-top: 50px; padding-left: 16px; padding-right: 16px; }
  .hero p { font-size: 15px; }
  .command-grid, .command-grid-big { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }

  /* Sidebar becomes a normal stacked panel above the content, not a squeezed row -
     six+ nav links in one horizontal strip doesn't fit on a phone screen. */
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar-nav { flex-direction: column; }
  .sidebar-footer { border-top: 1px solid #1c2334; margin-top: 8px; }

  .app-topbar { padding: 12px 16px; }
  .search-wrapper, .app-search { max-width: 100%; }
  .app-content { padding: 16px; }
  .legal-bar { padding: 8px 16px; font-size: 11px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .command-card-big { padding: 16px 18px; }

  .owner-server-row, .premium-server-row { flex-wrap: wrap; gap: 10px; }
  .support-card { flex-direction: column; align-items: flex-start; }
  .support-card .btn { margin-left: 0; width: 100%; text-align: center; }

  .bar-chart { height: 110px; }
  .bar-label { display: none; } /* vertical rotated labels don't fit narrow screens legibly */
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
}
