/* ============================================================
   Night Hosting — Dark Theme Stylesheet
   ============================================================ */

:root {
  --bg:          #0d1117;
  --bg-card:     #161b22;
  --bg-card2:    #1c2128;
  --border:      #30363d;
  --accent:      #58a6ff;
  --accent-dark: #1f6feb;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --success:     #3fb950;
  --danger:      #f85149;
  --warning:     #d29922;
  --info:        #58a6ff;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-width: 0;
}

.brand-icon { font-size: 20px; }
.brand-link {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
}
.brand-link:hover { color: var(--accent); text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links-main { justify-self: center; }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: 4px; }

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--bg-card2); text-decoration: none; }
.nav-link-admin { color: var(--warning); }
.nav-link-register {
  background: var(--accent-dark);
  color: #fff;
  margin-left: 4px;
}
.nav-link-register:hover { background: var(--accent); color: #fff; }
.nav-link-logout { color: var(--danger); }

/* ============================================================
   Container
   ============================================================ */

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

.page-content { position: relative; animation: page-enter 420ms ease-out both; }
@keyframes page-enter {
  from { opacity: 0; top: 12px; }
  to { opacity: 1; top: 0; }
}

/* ============================================================
   Flash messages
   ============================================================ */

.flash-messages {
  position: relative;
  left: calc((100vw - 100%) / 2);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, 100%);
  margin: 0 0 16px auto;
}

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  border: 1px solid transparent;
}
.flash-messages .alert {
  width: 100%;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: flash-enter 280ms ease-out both;
}
.flash-messages .alert.is-leaving { animation: flash-exit 260ms ease-in both; }
@keyframes flash-enter {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes flash-exit {
  to { opacity: 0; transform: translateX(28px); }
}
.alert-success { background: rgba(63,185,80,.12); border-color: var(--success); color: var(--success); }
.alert-danger  { background: rgba(248,81,73,.12);  border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: rgba(210,153,34,.12); border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(88,166,255,.12); border-color: var(--info);    color: var(--info); }
.alert-close {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 18px; line-height: 1; opacity: 0.7;
  padding: 0 4px;
}
.alert-close:hover { opacity: 1; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary  { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.btn-secondary{ background: var(--bg-card2); color: var(--text); border-color: var(--border); }
.btn-accent   { background: #2d333b; color: var(--accent); border-color: var(--accent); }
.btn-success  { background: rgba(63,185,80,.2); color: var(--success); border-color: var(--success); }
.btn-danger   { background: rgba(248,81,73,.2); color: var(--danger);  border-color: var(--danger); }
.btn-warning  { background: rgba(210,153,34,.2); color: var(--warning); border-color: var(--warning); }

.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-sm  { padding: 6px 12px; font-size: 13px; }
.btn-xs  { padding: 4px 8px; font-size: 12px; }
.btn-block { width: 100%; display: flex; }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header-row .card-title { margin-bottom: 0; }
.card-full-height { height: 100%; }

/* ============================================================
   Forms
   ============================================================ */

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input-sm {
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.form-select-sm {
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

.form-input[type="select"], select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.inline-form { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
   Auth pages
   ============================================================ */

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 160px);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-icon { font-size: 36px; margin-bottom: 12px; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: 14px; }
.auth-form { margin-bottom: 20px; }
.remember-me { margin: -2px 0 16px; }
.remember-me-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}
.remember-me-label input { accent-color: var(--accent); margin: 0; }
.auth-footer { text-align: center; color: var(--text-muted); font-size: 13px; }
.auth-link { color: var(--accent); font-weight: 500; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  text-align: center;
  padding: 80px 0 60px;
}
.hero-badge {
  display: inline-block;
  background: rgba(88,166,255,.15);
  color: var(--accent);
  border: 1px solid rgba(88,166,255,.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Plans
   ============================================================ */

.plans-section { padding: 60px 0; }
.section-title { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.section-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 40px; font-size: 16px; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.plan-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.plan-card-featured { border-color: var(--accent-dark); }
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.plan-price { margin-bottom: 20px; }
.plan-price-monthly { display: flex; align-items: baseline; }
.price-amount { font-size: 32px; font-weight: 800; color: var(--accent); }
.price-unit { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.plan-coin-cost { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.plan-features { list-style: none; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 14px; }
.feature-icon { font-size: 16px; }
.btn-plan { width: 100%; display: flex; justify-content: center; }

/* ============================================================
   Features
   ============================================================ */

.features-section { padding: 40px 0 60px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.feature-icon-lg { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

/* ============================================================
   Dashboard
   ============================================================ */

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); font-size: 14px; }
.back-link { color: var(--text-muted); font-size: 13px; display: block; margin-bottom: 4px; }
.back-link:hover { color: var(--accent); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-size: 22px; font-weight: 700; }

/* Plan badges on stat */
.plan-badge-0 { color: var(--text-muted); }
.plan-badge-1 { color: var(--accent); }
.plan-badge-2 { color: var(--warning); }

/* Plan labels in admin table */
.plan-label { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.plan-label-0 { background: rgba(139,148,158,.15); color: var(--text-muted); }
.plan-label-1 { background: rgba(88,166,255,.15); color: var(--accent); }
.plan-label-2 { background: rgba(210,153,34,.15); color: var(--warning); }

/* Status badges */
.status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-running { background: rgba(63,185,80,.15); color: var(--success); border: 1px solid rgba(63,185,80,.3); }
.status-stopped { background: rgba(139,148,158,.12); color: var(--text-muted); border: 1px solid var(--border); }
.status-crashed { background: rgba(248,81,73,.12); color: var(--danger); border: 1px solid rgba(248,81,73,.3); }

/* Upgrade card */
.upgrade-card { }
.upgrade-options { display: flex; flex-direction: column; gap: 12px; }
.upgrade-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.upgrade-plan-info { flex: 1; }
.upgrade-plan-info strong { font-weight: 600; }
.upgrade-details { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.upgrade-cost { font-weight: 700; color: var(--accent); font-size: 15px; white-space: nowrap; }

/* Bots list */
.bots-list { display: flex; flex-direction: column; gap: 8px; }
.bot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.bot-info { display: flex; align-items: center; gap: 10px; }
.bot-name { font-weight: 600; font-size: 15px; }
.bot-actions { display: flex; gap: 8px; }

/* Empty state */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }
.empty-text { color: var(--text-muted); font-size: 13px; padding: 8px 0; }

/* ============================================================
   Bot detail page
   ============================================================ */

.bot-controls { display: flex; gap: 8px; flex-wrap: wrap; }

.bot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

/* File list */
.file-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  gap: 8px;
  flex-wrap: wrap;
}
.file-info { display: flex; align-items: center; gap: 8px; }
.file-icon { font-size: 16px; }
.file-name { font-size: 13px; font-weight: 500; word-break: break-all; }
.file-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.file-hint { font-size: 11px; color: var(--text-muted); font-weight: 400; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 16px;
  position: relative;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(88,166,255,.05);
}
.upload-icon { font-size: 32px; margin-bottom: 10px; }
.upload-text { font-weight: 500; margin-bottom: 4px; }
.upload-hint { color: var(--text-muted); font-size: 12px; }
.upload-status { margin-top: 10px; font-size: 13px; font-weight: 500; }
.upload-status.ok { color: var(--success); }
.upload-status.err { color: var(--danger); }

.upload-progress { margin-top: 12px; }
.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar {
  height: 6px;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s;
}
#progress-text { font-size: 12px; color: var(--text-muted); }

/* Log box */
.log-box {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #c9d1d9;
  min-height: 360px;
  max-height: 500px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-placeholder { color: var(--text-muted); font-style: italic; }
.log-line { display: block; }
.log-hint { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.log-status { font-size: 11px; color: var(--success); }

/* ============================================================
   Admin panel
   ============================================================ */

.admin-viewing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(210,153,34,.12);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  color: var(--warning);
  margin-bottom: 20px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-table-wrapper { overflow-x: auto; overflow-y: visible; }
.admin-table { overflow: visible; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-card2); }
.row-banned td { opacity: 0.6; }

.user-name { font-weight: 600; font-size: 14px; }
.badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.badge-admin { background: rgba(210,153,34,.2); color: var(--warning); }
.date-cell { color: var(--text-muted); white-space: nowrap; }
.actions-cell { min-width: 400px; }
.admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-user-search { position: relative; max-width: 360px; margin-bottom: 14px; }
.admin-user-search .form-input { padding-left: 36px; }
.admin-user-search > i {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}
.admin-search-empty { color: var(--text-muted); font-size: 13px; margin: 0 0 14px; }

/* ============================================================
   Misc
   ============================================================ */

@media (max-width: 600px) {
  .navbar {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 4px;
    height: auto;
    min-height: 60px;
    padding: 8px 16px;
  }
  .nav-links-main {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
  .nav-actions { grid-column: 2; grid-row: 1; }
  .nav-link { padding: 6px 8px; }
  .flash-messages { width: 100%; }
  .container { padding: 20px 16px 40px; }
  .hero-title { font-size: 36px; }
  .auth-card { padding: 28px 20px; }
  .admin-table th, .admin-table td { padding: 8px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-content { animation: none; }
}

/* Refreshed site chrome and page layouts */
body {
  background-color: #0b0f16;
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(31,111,235,.14), transparent 34rem),
    radial-gradient(ellipse at 92% 18%, rgba(88,166,255,.07), transparent 30rem);
  background-attachment: fixed;
}

.navbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(15, 20, 29, .88);
  border-bottom-color: rgba(139, 148, 158, .16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-icon { color: #79b8ff; }
.brand-link { letter-spacing: -.5px; }
.nav-links { gap: 6px; }
.nav-links-main { margin-left: clamp(16px, 3vw, 40px); }
.nav-actions { margin-left: auto; }
.nav-link { border-radius: 10px; padding: 8px 13px; }
.nav-link.is-active {
  color: var(--text);
  background: rgba(88, 166, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, .14);
}
.nav-link-admin.is-active { color: var(--warning); background: rgba(210, 153, 34, .12); }
.nav-link-register { border-radius: 10px; }

.container { max-width: 1280px; padding-top: 40px; }
.page-content { min-height: calc(100vh - 150px); }

body:not(.page-bot-detail) .btn {
  border-radius: 10px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
body:not(.page-bot-detail) .btn:not(:disabled):hover {
  opacity: 1;
  transform: translateY(-1px);
}
body:not(.page-bot-detail) .btn-primary {
  background: linear-gradient(135deg, #388bfd, #1f6feb);
  border-color: #388bfd;
  box-shadow: 0 7px 20px rgba(31, 111, 235, .2);
}
body:not(.page-bot-detail) .btn-primary:not(:disabled):hover {
  box-shadow: 0 10px 24px rgba(31, 111, 235, .32);
}
body:not(.page-bot-detail) .btn-secondary {
  background: rgba(28, 33, 40, .8);
}
body:not(.page-bot-detail) .card,
body:not(.page-bot-detail) .auth-card,
body:not(.page-bot-detail) .stat-card,
body:not(.page-bot-detail) .feature-card,
body:not(.page-bot-detail) .plan-card {
  background: linear-gradient(155deg, rgba(25, 32, 43, .96), rgba(17, 22, 31, .96));
  border-color: rgba(139, 148, 158, .2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}
body:not(.page-bot-detail) .form-input {
  background: rgba(9, 13, 19, .72);
  border-color: rgba(139, 148, 158, .24);
  border-radius: 10px;
}
body:not(.page-bot-detail) .form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, .13);
}

.page-index .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 4px 0 18px;
  padding: clamp(60px, 8vw, 90px) 24px clamp(44px, 6vw, 64px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(31, 111, 235, .21), transparent 58%),
    transparent;
  box-shadow: none;
}
.page-index .hero::before,
.page-index .hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  width: 280px;
  height: 280px;
  border: 1px solid rgba(88, 166, 255, .1);
  border-radius: 50%;
  pointer-events: none;
}
.page-index .hero::before { top: -190px; left: -90px; box-shadow: 0 0 0 34px rgba(88,166,255,.025), 0 0 0 70px rgba(88,166,255,.02); }
.page-index .hero::after { right: -120px; bottom: -210px; width: 360px; height: 360px; }
.page-index .hero-badge {
  padding: 7px 15px;
  background: rgba(88, 166, 255, .1);
  border-color: rgba(88, 166, 255, .25);
}
.page-index .hero-title { font-size: clamp(44px, 7vw, 76px); }
.page-index .hero-subtitle { max-width: 590px; }
.page-index .plans-section { padding: 36px 0 56px; }
.page-index .section-title { letter-spacing: -.7px; }
.page-index .plans-grid { max-width: 1000px; gap: 22px; }
.page-index .plan-card {
  min-height: 300px;
  padding: 30px;
  border-radius: 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.page-index .plan-card:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 166, 255, .55);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .26);
}
.page-index .plan-card-featured {
  border-color: rgba(88, 166, 255, .72);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(31,111,235,.16), transparent 58%),
    linear-gradient(155deg, rgba(25, 35, 50, .98), rgba(17, 22, 31, .98));
}
.page-index .plan-badge { top: -13px; padding: 5px 13px; box-shadow: 0 6px 16px rgba(31,111,235,.25); }
.page-index .price-amount { letter-spacing: -1px; }
.page-index .plan-features { gap: 11px; }
.page-index .plan-features li { color: #b7c3d0; }
.page-index .feature-icon { color: #79b8ff; }
.page-index .features-section { padding-top: 24px; }
.page-index .feature-card {
  min-height: 180px;
  border-radius: 18px;
  transition: transform .2s ease, border-color .2s ease;
}
.page-index .feature-card:hover { transform: translateY(-3px); border-color: rgba(88,166,255,.42); }
.page-index .feature-icon-lg { color: #79b8ff; }

.page-dashboard .page-title,
.page-admin-user-panel .page-title,
.page-admin .page-title { letter-spacing: -.7px; }
.page-dashboard .stats-row,
.page-admin-user-panel .stats-row { gap: 18px; }
.page-dashboard .stat-card,
.page-admin-user-panel .stat-card {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 22px;
  border-radius: 16px;
}
.page-dashboard .stat-card::after,
.page-admin-user-panel .stat-card::after {
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(88, 166, 255, .1);
  border-radius: 50%;
  content: "";
}
.page-dashboard .stat-value,
.page-admin-user-panel .stat-value { font-size: 24px; }
.page-dashboard .card,
.page-admin-user-panel .card,
.page-admin .card { border-radius: 18px; }
.page-dashboard .bot-row,
.page-admin-user-panel .bot-row {
  padding: 15px 18px;
  border-radius: 12px;
  background: rgba(10, 15, 22, .58);
  transition: border-color .18s ease, transform .18s ease;
}
.page-dashboard .bot-row:hover,
.page-admin-user-panel .bot-row:hover { border-color: rgba(88,166,255,.35); transform: translateX(2px); }
.page-dashboard .admin-viewing-banner,
.page-admin-user-panel .admin-viewing-banner { border-radius: 12px; }

.page-login .auth-wrapper,
.page-register .auth-wrapper,
.page-new-bot .auth-wrapper { padding: 28px 0; }
.page-login .auth-card,
.page-register .auth-card,
.page-new-bot .auth-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 38px;
}
.page-login .auth-card::before,
.page-register .auth-card::before,
.page-new-bot .auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), #8b5cf6, transparent);
  content: "";
}
.page-login .auth-icon,
.page-register .auth-icon,
.page-new-bot .auth-icon { color: #79b8ff; }
.page-login .auth-title,
.page-register .auth-title,
.page-new-bot .auth-title { font-size: 25px; letter-spacing: -.5px; }
.page-login .form-label,
.page-register .form-label,
.page-new-bot .form-label { color: #c2ccd8; }

.page-new-bot .runtime-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.page-new-bot .runtime-option { position: relative; cursor: pointer; }
.page-new-bot .runtime-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.page-new-bot .runtime-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.page-new-bot .runtime-option-card img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
}
.page-new-bot .runtime-option input:checked + .runtime-option-card {
  border-color: var(--accent);
  background: rgba(88, 166, 255, .09);
  box-shadow: 0 0 0 1px rgba(88, 166, 255, .2);
}
.page-new-bot .runtime-option input:focus-visible + .runtime-option-card {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.page-new-bot .runtime-option:hover .runtime-option-card { border-color: var(--accent); }

.page-admin .admin-table-wrapper {
  border: 1px solid rgba(139, 148, 158, .16);
  border-radius: 14px;
}
.page-admin .admin-table th { background: rgba(10, 15, 22, .7); }
.page-admin .admin-table td { border-bottom-color: rgba(139, 148, 158, .12); }
.page-admin .admin-table tr:hover td { background: rgba(88, 166, 255, .045); }
.page-admin .actions-cell { min-width: 340px; }
.page-admin .admin-user-search .form-input { border-radius: 12px; }
.page-admin .modal-box { border-radius: 18px; }

.page-bot-detail .dashboard-header { margin-bottom: 28px; }
.page-bot-detail .page-title { letter-spacing: -.7px; }
.page-bot-detail .bot-tabs {
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(139, 148, 158, .16);
  border-radius: 14px;
  background: rgba(15, 20, 29, .72);
}
.page-bot-detail .bot-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
}
.page-bot-detail .bot-tab:hover { background: rgba(255,255,255,.035); }
.page-bot-detail .bot-tab.active {
  color: #dcecff;
  background: rgba(31, 111, 235, .16);
  border-color: rgba(88, 166, 255, .22);
}
.page-bot-detail #panel-files .card,
.page-bot-detail #panel-network .card,
.page-bot-detail #panel-settings .card {
  border-radius: 17px;
  background: linear-gradient(155deg, rgba(25, 32, 43, .96), rgba(17, 22, 31, .96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}
.page-bot-detail #panel-files .card-title,
.page-bot-detail #panel-network .card-title,
.page-bot-detail #panel-settings .card-title { font-size: 18px; letter-spacing: -.3px; }
.page-bot-detail #panel-files .file-row,
.page-bot-detail #panel-network .net-row {
  background: rgba(9, 13, 19, .6);
  border-color: rgba(139, 148, 158, .18);
  border-radius: 11px;
}
.page-bot-detail #panel-files .file-row:hover,
.page-bot-detail #panel-network .net-row:hover { border-color: rgba(88, 166, 255, .38); }
.page-bot-detail #panel-files .upload-zone {
  border-radius: 16px;
  background: rgba(88, 166, 255, .025);
}
.page-bot-detail #panel-files .upload-zone:hover,
.page-bot-detail #panel-files .upload-zone.dragover { background: rgba(88, 166, 255, .08); }
.page-bot-detail #panel-files .btn,
.page-bot-detail #panel-network .btn,
.page-bot-detail #panel-settings .btn {
  border-radius: 10px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.page-bot-detail #panel-files .btn:hover,
.page-bot-detail #panel-network .btn:hover,
.page-bot-detail #panel-settings .btn:hover { transform: translateY(-1px); }

@media (max-width: 480px) {
  .page-new-bot .runtime-picker { gap: 8px; }
  .page-new-bot .runtime-option-card { gap: 8px; padding: 10px; }
  .page-new-bot .runtime-option-card img { width: 32px; height: 32px; flex-basis: 32px; }
}
.page-bot-detail #panel-settings .card[style*="warning"] { box-shadow: 0 14px 38px rgba(210,153,34,.06); }
.page-bot-detail #panel-settings .card[style*="danger"] { box-shadow: 0 14px 38px rgba(248,81,73,.06); }

@media (max-width: 700px) {
  .navbar { display: flex; flex-wrap: wrap; height: auto; min-height: 64px; }
  .nav-links-main { order: 3; width: 100%; margin: 0; justify-content: flex-start; }
  .nav-actions { margin-left: auto; }
  .container { padding: 24px 16px 44px; }
  .page-index .hero { padding: 60px 18px 44px; }
  .page-index .hero-title { font-size: clamp(40px, 12vw, 58px); }
  .page-index .plans-grid { grid-template-columns: 1fr; max-width: 440px; gap: 22px; }
  .page-index .plan-card { min-height: auto; }
  .page-index .feature-card { min-height: 0; }
  .page-login .auth-card,
  .page-register .auth-card,
  .page-new-bot .auth-card { padding: 30px 22px; }
  .page-dashboard .stat-card,
  .page-admin-user-panel .stat-card { padding: 17px; }
  .page-bot-detail .bot-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-bot-detail .bot-tab { justify-content: center; padding: 10px 8px; }
  .page-admin .actions-cell { min-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@keyframes dashboard-item-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-dashboard .stats-row .stat-card,
.page-admin-user-panel .stats-row .stat-card {
  animation: dashboard-item-in .42s ease-out both;
}
.page-dashboard .stats-row .stat-card:nth-child(2),
.page-admin-user-panel .stats-row .stat-card:nth-child(2) { animation-delay: 70ms; }
.page-dashboard .stats-row .stat-card:nth-child(3),
.page-admin-user-panel .stats-row .stat-card:nth-child(3) { animation-delay: 140ms; }
.page-dashboard .stats-row .stat-card:nth-child(4),
.page-admin-user-panel .stats-row .stat-card:nth-child(4) { animation-delay: 210ms; }
.page-dashboard .bots-list .bot-row,
.page-admin-user-panel .bots-list .bot-row {
  animation: dashboard-item-in .36s ease-out both;
}
.page-dashboard .bots-list .bot-row:nth-child(2),
.page-admin-user-panel .bots-list .bot-row:nth-child(2) { animation-delay: 60ms; }
.page-dashboard .bots-list .bot-row:nth-child(3),
.page-admin-user-panel .bots-list .bot-row:nth-child(3) { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  .page-dashboard .stat-card,
  .page-admin-user-panel .stat-card,
  .page-dashboard .bot-row,
  .page-admin-user-panel .bot-row { animation: none; }
}

.account-menu { position: relative; }
.account-avatar,
.discord-account-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(139, 148, 158, .3);
  border-radius: 50%;
  background: linear-gradient(145deg, #27364b, #151b26);
  color: #dcecff;
  font-size: 15px;
  font-weight: 700;
}
.account-avatar { padding: 0; cursor: pointer; transition: border-color .18s, transform .18s; }
.account-avatar:hover { border-color: var(--accent); transform: translateY(-1px); }
.account-avatar img,
.discord-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: 230px;
  padding: 8px;
  border: 1px solid rgba(139, 148, 158, .22);
  border-radius: 14px;
  background: #171d28;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .45);
  animation: account-menu-in .16s ease-out both;
}
.account-menu-panel[hidden] { display: none; }
.account-menu-identity { display: grid; gap: 2px; padding: 10px 11px 12px; border-bottom: 1px solid var(--border); }
.account-menu-identity strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.account-menu-identity span { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-panel > a {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--text);
  font-weight: 500;
}
.account-menu-panel > a:hover { background: rgba(255, 255, 255, .055); text-decoration: none; }
.account-menu-panel > .account-menu-logout { color: #ff8f88; }
@keyframes account-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.discord-auth-card .auth-icon { color: #7289da; font-size: 42px; }
.btn-discord {
  justify-content: center;
  gap: 10px;
  border-color: #5865f2;
  background: #5865f2;
  color: #fff;
  font-weight: 600;
}
.btn-discord:hover { border-color: #7180ff; background: #7180ff; color: #fff; }
.discord-auth-note { margin: 16px 0 22px; color: var(--text-muted); font-size: 12px; text-align: center; }
.discord-auth-card .auth-footer { border-top: 1px solid rgba(139, 148, 158, .14); padding-top: 18px; }

.account-settings { max-width: 920px; margin: 0 auto; }
.account-settings-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.account-settings-header h1 { margin-bottom: 4px; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.7px; }
.account-settings-header p:not(.eyebrow) { color: var(--text-muted); }
.eyebrow { margin-bottom: 5px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-settings-card {
  padding: 22px;
  border: 1px solid rgba(139, 148, 158, .18);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(25, 32, 43, .96), rgba(17, 22, 31, .96));
  box-shadow: 0 15px 40px rgba(0, 0, 0, .14);
}
.settings-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.settings-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: rgba(88, 166, 255, .12); color: var(--accent); font-size: 16px; }
.discord-settings-icon { background: rgba(88, 101, 242, .16); color: #8994ff; }
.settings-card-heading h2 { margin-bottom: 2px; font-size: 16px; }
.settings-card-heading p,
.settings-help { color: var(--text-muted); font-size: 12px; }
.account-profile-form { display: grid; gap: 12px; }
.account-profile-form .form-label { margin: 0; }
.account-profile-form .btn { justify-self: start; margin-top: 4px; }
.discord-account-row { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.discord-account-avatar { flex: 0 0 48px; width: 48px; height: 48px; }
.discord-account-details { display: grid; min-width: 0; gap: 3px; }
.discord-account-details strong,
.discord-account-details span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.discord-account-details span { color: var(--text-muted); font-size: 12px; }
.settings-help { margin-top: 14px; line-height: 1.7; }
.account-wide-card { grid-column: 1 / -1; }
.account-wide-card .btn { display: inline-flex; }

@media (max-width: 700px) {
  .account-settings-header { align-items: flex-start; }
  .account-settings-grid { grid-template-columns: 1fr; }
  .account-wide-card { grid-column: auto; }
}
@media (max-width: 420px) {
  .account-settings-header { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .account-menu-panel { animation: none; }
}

.page-index .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 4px 0 18px;
  padding: clamp(60px, 8vw, 90px) 24px clamp(44px, 6vw, 64px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(31, 111, 235, .21), transparent 58%),
    transparent;
  box-shadow: none;
}
.page-index .hero::before,
.page-index .hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  width: 280px;
  height: 280px;
  border: 1px solid rgba(88, 166, 255, .1);
  border-radius: 50%;
  pointer-events: none;
}
.page-index .hero::before { top: -190px; left: -90px; box-shadow: 0 0 0 34px rgba(88,166,255,.025), 0 0 0 70px rgba(88,166,255,.02); }
.page-index .hero::after { right: -120px; bottom: -210px; width: 360px; height: 360px; }
.page-index .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, .96fr);
  align-items: center;
  gap: clamp(36px, 6vw, 82px);
  max-width: 1160px;
  margin: 0 auto;
  text-align: left;
}
.page-index .hero-copy { position: relative; z-index: 1; }
.page-index .hero-badge {
  padding: 7px 15px;
  background: rgba(88, 166, 255, .1);
  border-color: rgba(88, 166, 255, .25);
  margin-bottom: 22px;
}
.page-index .hero-title {
  font-size: clamp(46px, 5.7vw, 72px);
  line-height: 1.02;
  margin-bottom: 20px;
}
.page-index .hero-title span {
  background: linear-gradient(110deg, #79b8ff 12%, #a5d6ff 55%, #58a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.page-index .hero-subtitle {
  max-width: 540px;
  margin: 0 0 28px;
  font-size: 17px;
}
.page-index .hero-actions { justify-content: flex-start; }
.page-index .hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  color: #b7c3d0;
  font-size: 12px;
}
.page-index .hero-highlights span { display: inline-flex; align-items: center; gap: 7px; }
.page-index .hero-highlights i { color: var(--success); font-size: 11px; }
.page-index .hero-preview {
  position: relative;
  padding: 18px;
  perspective: 1100px;
  animation: home-preview-in .8s cubic-bezier(.2, .8, .2, 1) both;
}
.page-index .preview-glow {
  position: absolute;
  inset: 12% 4%;
  border-radius: 50%;
  background: rgba(31, 111, 235, .22);
  filter: blur(60px);
  pointer-events: none;
}
.page-index .preview-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 148, 158, .25);
  border-radius: 18px;
  background: #10151e;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .5), 0 0 0 6px rgba(255, 255, 255, .018);
  transform: rotateX(var(--preview-rotate-x, 2deg)) rotateY(var(--preview-rotate-y, -5deg));
  transform-style: preserve-3d;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), box-shadow 180ms ease;
  will-change: transform;
}
.page-index .hero-preview:hover .preview-window { box-shadow: 0 38px 92px rgba(0, 0, 0, .58), 0 0 28px rgba(88, 166, 255, .08); }
.page-index .preview-topbar {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(139, 148, 158, .13);
  background: rgba(255, 255, 255, .025);
}
.page-index .preview-window-dots { display: flex; gap: 5px; }
.page-index .preview-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #485363; }
.page-index .preview-window-dots i:first-child { background: #f7768e; }
.page-index .preview-window-dots i:nth-child(2) { background: #e0af68; }
.page-index .preview-window-dots i:nth-child(3) { background: #9ece6a; }
.page-index .preview-window-title { color: #8b949e; font-size: 8px; font-weight: 700; letter-spacing: .9px; }
.page-index .preview-window-title span { margin: 0 5px; color: #46505e; }
.page-index .preview-tag { padding: 3px 7px; border: 1px solid rgba(88, 166, 255, .24); border-radius: 5px; color: #79b8ff; font-size: 8px; font-weight: 700; letter-spacing: .7px; }
.page-index .preview-body { display: grid; min-height: 300px; grid-template-columns: 132px minmax(0, 1fr); }
.page-index .preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 10px;
  border-right: 1px solid rgba(139, 148, 158, .12);
  background: rgba(255, 255, 255, .012);
}
.page-index .preview-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 15px 3px; color: #dce5f0; font-size: 10px; font-weight: 700; }
.page-index .preview-brand > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: rgba(88, 166, 255, .16); color: #79b8ff; }
.page-index .preview-nav-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 7px; color: #7d8999; font-size: 9px; }
.page-index .preview-nav-item i { width: 12px; text-align: center; }
.page-index .preview-nav-item.is-current { background: rgba(88, 166, 255, .12); color: #9acaff; }
.page-index .preview-sidebar-bottom { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 10px 2px 0; border-top: 1px solid rgba(139, 148, 158, .12); color: #8b949e; font-size: 8px; }
.page-index .preview-avatar { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #345d91, #6f4a91); color: #fff; font-size: 8px; font-weight: 700; }
.page-index .preview-main { min-width: 0; padding: 18px; }
.page-index .preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.page-index .preview-heading > div { display: grid; gap: 3px; }
.page-index .preview-kicker { color: #778395; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.page-index .preview-heading strong { color: #edf3fa; font-size: 15px; }
.page-index .preview-add { padding: 6px 8px; border: 1px solid rgba(88, 166, 255, .34); border-radius: 6px; color: #9acaff; font-size: 8px; }
.page-index .preview-bot-card { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid rgba(139, 148, 158, .16); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.page-index .preview-bot-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: rgba(88, 101, 242, .16); color: #8e9bff; font-size: 15px; }
.page-index .preview-bot-name { display: grid; min-width: 0; gap: 2px; }
.page-index .preview-bot-name strong { overflow: hidden; color: #e6edf3; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.page-index .preview-bot-name span { color: #8591a1; font-size: 8px; }
.page-index .preview-status { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: #8ed4a0; font-size: 8px; }
.page-index .preview-status i,
.page-index .preview-console p i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #3fb950; }
.page-index .preview-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 10px 0; }
.page-index .preview-metrics > div { display: grid; gap: 6px; padding: 10px; border: 1px solid rgba(139, 148, 158, .13); border-radius: 8px; }
.page-index .preview-metrics span { color: #778395; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
.page-index .preview-metrics strong { color: #cbd6e2; font-size: 9px; }
.page-index .preview-metrics strong i { margin-right: 4px; color: #79b8ff; }
.page-index .preview-console { padding: 10px; border: 1px solid rgba(139, 148, 158, .13); border-radius: 8px; background: rgba(7, 11, 17, .7); }
.page-index .preview-console-title { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #8995a5; font-size: 7px; font-weight: 700; letter-spacing: .5px; }
.page-index .preview-console-title span:first-child i { margin-right: 4px; color: #79b8ff; }
.page-index .preview-console-title span:last-child { color: #667487; }
.page-index .preview-console p { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #8f9cad; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.page-index .preview-console p i { width: 4px; height: 4px; }
.page-index .preview-console p span { color: #79b8ff; }
.page-index .preview-console p:nth-of-type(1) { animation: console-line-in 480ms 900ms both; }
.page-index .preview-console p:nth-of-type(2) { animation: console-line-in 480ms 1250ms both; }
.page-index .preview-console p:nth-of-type(3) { animation: console-line-in 480ms 1600ms both; }
.page-index .preview-cursor {
  display: inline-block;
  width: 5px;
  height: 9px;
  margin-left: 3px;
  background: #79b8ff;
  vertical-align: -2px;
  animation: preview-cursor-blink 900ms steps(1) infinite;
}
@keyframes home-preview-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes console-line-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes preview-cursor-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}
@keyframes home-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-index .home-section-heading { max-width: 680px; margin: 0 auto 30px; text-align: center; }
.page-index .home-eyebrow { display: inline-block; margin-bottom: 8px; color: #79b8ff; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.page-index .home-section-heading .section-title { margin-bottom: 7px; font-size: clamp(25px, 3vw, 32px); }
.page-index .home-section-heading .section-subtitle,
.page-index .home-section-heading > p:last-child { margin: 0; color: var(--text-muted); font-size: 14px; }
.page-index .how-section { padding: 18px 0 34px; }
.page-index .steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1000px; margin: 0 auto; }
.page-index .step-card { position: relative; min-height: 178px; padding: 22px; border: 1px solid rgba(139, 148, 158, .17); border-radius: 16px; background: linear-gradient(145deg, rgba(25, 32, 43, .75), rgba(17, 22, 31, .75)); }
.page-index .step-card,
.page-index .feature-card,
.page-index .plan-card {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  animation: home-card-in .55s cubic-bezier(.2, .8, .2, 1) both;
}
.page-index .step-card:nth-child(2),
.page-index .plan-card:nth-child(2),
.page-index .feature-card:nth-child(2) { animation-delay: 100ms; }
.page-index .step-card:nth-child(3),
.page-index .plan-card:nth-child(3),
.page-index .feature-card:nth-child(3) { animation-delay: 200ms; }
.page-index .feature-card:nth-child(4) { animation-delay: 300ms; }
.page-index .step-card:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 166, 255, .42);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.page-index .step-number { position: absolute; top: 16px; right: 17px; color: rgba(139, 148, 158, .35); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.page-index .step-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 15px; border: 1px solid rgba(88, 166, 255, .19); border-radius: 11px; background: rgba(88, 166, 255, .09); color: #79b8ff; font-size: 15px; }
.page-index .step-card h3 { margin-bottom: 5px; color: #e6edf3; font-size: 15px; }
.page-index .step-card p { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.page-index .plans-section { padding: 36px 0 56px; }
.page-index .section-title { letter-spacing: -.7px; }
.page-index .plans-grid { max-width: 1000px; gap: 22px; }
.page-index .plan-card {
  min-height: 300px;
  padding: 30px;
  border-radius: 20px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.page-index .plan-card:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 166, 255, .55);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .26);
}
.page-index .plan-card-featured {
  border-color: rgba(88, 166, 255, .72);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(31,111,235,.16), transparent 58%),
    linear-gradient(155deg, rgba(25, 35, 50, .98), rgba(17, 22, 31, .98));
}
.page-index .plan-badge { top: -13px; padding: 5px 13px; box-shadow: 0 6px 16px rgba(31,111,235,.25); }
.page-index .price-amount { letter-spacing: -1px; }
.page-index .plan-features { gap: 11px; }
.page-index .plan-features li { color: #b7c3d0; }
.page-index .feature-icon { color: #79b8ff; }
.page-index .features-section { padding-top: 24px; }
.page-index .features-section .home-section-heading { margin-bottom: 26px; }
.page-index .feature-card {
  min-height: 180px;
  border-radius: 18px;
  transition: transform .2s ease, border-color .2s ease;
}
.page-index .feature-card:hover { transform: translateY(-3px); border-color: rgba(88,166,255,.42); }
.page-index .feature-icon-lg { color: #79b8ff; }
.page-index .home-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 20px 0 32px;
  padding: 25px 28px;
  border: 1px solid rgba(88, 166, 255, .24);
  border-radius: 18px;
  background: radial-gradient(ellipse at 0% 50%, rgba(31, 111, 235, .15), transparent 60%), rgba(22, 27, 34, .78);
}
.page-index .home-cta-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: rgba(88, 166, 255, .12); color: #79b8ff; font-size: 18px; }
.page-index .home-cta-copy { flex: 1; }
.page-index .home-cta-copy .home-eyebrow { margin-bottom: 3px; }
.page-index .home-cta h2 { color: #e6edf3; font-size: 19px; line-height: 1.3; }
.page-index .home-cta p { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.page-index .home-cta .btn { flex: 0 0 auto; }

@media (max-width: 960px) {
  .page-index .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 680px; text-align: center; }
  .page-index .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .page-index .hero-title { font-size: clamp(46px, 8vw, 68px); }
  .page-index .hero-subtitle { margin-right: auto; margin-left: auto; }
  .page-index .hero-actions { justify-content: center; }
  .page-index .hero-preview { width: min(100%, 590px); margin: 0 auto; }
  .page-index .preview-window { transform: none; }
}

@media (max-width: 700px) {
  .navbar { display: flex; flex-wrap: wrap; height: auto; min-height: 64px; }
  .nav-links-main { order: 3; width: 100%; margin: 0; justify-content: flex-start; }
  .nav-actions { margin-left: auto; }
  .container { padding: 24px 16px 44px; }
  .page-index .hero { padding: 48px 8px 36px; }
  .page-index .hero-title { font-size: clamp(40px, 12vw, 58px); }
  .page-index .hero-highlights { justify-content: center; gap: 8px 13px; }
  .page-index .hero-preview { padding: 8px 0; }
  .page-index .preview-body { grid-template-columns: 94px minmax(0, 1fr); min-height: 270px; }
  .page-index .preview-sidebar { padding: 12px 7px; }
  .page-index .preview-brand { margin-left: 1px; font-size: 8px; }
  .page-index .preview-nav-item { gap: 5px; padding: 7px 5px; font-size: 8px; }
  .page-index .preview-main { padding: 13px 10px; }
  .page-index .preview-window-title { font-size: 7px; }
  .page-index .preview-window-dots { gap: 3px; }
  .page-index .steps-grid { grid-template-columns: 1fr; max-width: 480px; }
  .page-index .step-card { min-height: 0; padding: 18px; }
  .page-index .home-cta { flex-wrap: wrap; gap: 13px; padding: 20px; }
  .page-index .home-cta-copy { min-width: calc(100% - 60px); }
  .page-index .home-cta .btn { width: 100%; }
  .page-index .plans-grid { grid-template-columns: 1fr; max-width: 440px; gap: 22px; }
  .page-index .plan-card { min-height: auto; }
  .page-index .feature-card { min-height: 0; }
  .page-login .auth-card,
  .page-register .auth-card,
  .page-new-bot .auth-card { padding: 30px 22px; }
  .page-dashboard .stat-card,
  .page-admin-user-panel .stat-card { padding: 17px; }
  .page-bot-detail .bot-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-bot-detail .bot-tab { justify-content: center; padding: 10px 8px; }
  .page-admin .actions-cell { min-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .page-index .hero-preview,
  .page-index .step-card,
  .page-index .feature-card,
  .page-index .plan-card,
  .page-index .preview-console p,
  .page-index .preview-cursor { animation: none !important; }
  .page-index .preview-window { transform: none; }
}


/* Notification position override */
.flash-messages { position: fixed !important; top: 72px !important; right: 72px !important; left: auto !important; z-index: 1500; width: min(420px, calc(100vw - 96px)); margin: 0 !important; }
@media (max-width: 640px) { .flash-messages { top: 64px !important; right: 16px !important; width: calc(100vw - 32px); } }
/* Notification position adjustment */
.flash-messages {
  right: 48px !important;
}
@media (max-width: 640px) {
  .flash-messages {
    right: 16px !important;
  }
}
.flash-messages { right: 24px !important; }
@media (max-width: 640px) {
  .flash-messages { right: 16px !important; }
}
