/* Slang Tester Portal - Slang Theme */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@400;500;600;700&family=Oxanium:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0606;
  --fg: #e6e6e6;
  --muted: #8a7a7a;
  --red: #FF313D;
  --red2: #ff0000;
  --red3: #ff5252;
  --red4: #FF505F;
  --orange: #FF5300;
  --green: #58EE88;
  --green2: #2D8A2D;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 0, 0, 0.15);
  --btn-neutral: rgba(255,255,255,0.04);
  --btn-neutral-hover: rgba(255,255,255,0.08);
  --border: rgba(255, 0, 0, 0.1);
  --font: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-accent: 'Oxanium', sans-serif;
  --font-logo: 'Bebas Neue', sans-serif;
  --mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

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

html { scrollbar-width: thin; scrollbar-color: rgba(255,0,0,0.4) transparent; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,0,0,0.4); border-radius: 2px; }

body {
  background: #0a0606;
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(255,82,82,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(255,82,82,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(255,82,82,0.05) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: #fff; }

/* --- Topbar ---------------------------------------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  background:
    radial-gradient(ellipse 35% 180% at 50% 0%, rgba(255, 30, 40, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 25% 200% at 12% 50%, rgba(255, 50, 60, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 8, 10, 0.98) 0%, rgba(12, 6, 7, 0.98) 100%);
  border-bottom: 1px solid rgba(255,0,0,0.25);
  box-shadow: 0 1px 0 rgba(255,0,0,0.25), 0 2px 12px rgba(255,0,0,0.25), 0 4px 24px rgba(0,0,0,0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Brand / Logo ---------------------------------- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1;
  text-decoration: none;
}

.title-1 {
  font-family: var(--font-logo);
  font-size: 24px;
  letter-spacing: 0.08em;
  display: inline-block;
  transform: skewX(-8deg);
  color: #ff0000;
  line-height: 1;
}
.logo-v {
  color: #ffffff;
  margin-left: 4px;
}
.title-2 {
  font-family: var(--font-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fd3e3e;
  text-transform: uppercase;
  margin-top: 1px;
  padding-left: 2px;
}

/* --- Topbar Nav ------------------------------------ */
.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar nav a {
  position: relative;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}
.topbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--orange);
  box-shadow: 0 0 7.97px rgba(255, 0, 0, 0.75);
  transition: left 0.15s ease, right 0.15s ease;
  border-radius: 1px;
}
.topbar nav a:hover { color: #fff; }
.topbar nav a:hover::after { left: 14px; right: 14px; }
.topbar nav a.active-nav { color: #fff; }
.topbar nav a.active-nav::after { left: 14px; right: 14px; }

.inline-form { display: inline-flex; }

.nav-btn {
  background: none;
  border: 1px solid rgba(255,0,0,0.2);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.nav-btn:hover {
  color: var(--fg);
  border-color: rgba(255,0,0,0.4);
  background: rgba(255,0,0,0.07);
}

/* --- Layout --------------------------------------- */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px 28px 72px;
}

/* --- Page Header ---------------------------------- */
.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-family: var(--font);
  font-size: 26px;
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: 0.02em;
  position: relative;
  padding-left: 14px;
}
.page-header h1::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--orange);
  box-shadow: 0 0 7.97px rgba(255, 0, 0, 0.75);
  border-radius: 1px;
}

.back-link {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.back-link:hover { color: var(--red3); }

/* --- Hero ----------------------------------------- */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 62px - 108px);
}

/* --- Cards ---------------------------------------- */
.card {
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(255, 82, 82, 0.22) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 10% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 90% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse at 50% 50%, rgba(39, 20, 20, 0.93) 0%, rgba(20, 11, 11, 0.93) 100%);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.06), inset 0 0 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: rgba(255,0,0,0.30);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.10), inset 0 0 60px rgba(0, 0, 0, 0.15);
}

.login-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(255, 82, 82, 0.52) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 10% 100%, rgba(255, 82, 82, 0.15) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 90% 100%, rgba(255, 82, 82, 0.15) 0%, transparent 100%),
    radial-gradient(ellipse at 50% 50%, rgba(39, 20, 20, 0.93) 0%, rgba(20, 11, 11, 0.93) 100%);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 16px;
  padding: 44px 36px;
}

.login-card .logo-hero {
  margin-bottom: 10px;
}
.login-card .logo-hero .title-1 {
  font-size: 36px;
  letter-spacing: 0.1em;
}

.login-card .login-label {
  font-family: var(--font-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #fd3e3e;
  text-transform: uppercase;
  margin-bottom: 28px;
  display: block;
}

.login-card h1 {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  padding-left: 0;
}
.login-card h1::before { display: none; }
.login-card .muted { margin-bottom: 28px; font-size: 14px; }

.forbidden-card { text-align: center; }
.forbidden-card h1 { color: var(--red); padding-left: 0; }
.forbidden-card h1::before { display: none; }
.forbidden-card .muted { margin: 12px 0 28px; }

/* --- Scripts Grid --------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.script-card {
  display: block;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 50, 60, 0.42) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(255, 82, 82, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255, 82, 82, 0.28) 0%, transparent 70%),
    linear-gradient(180deg, rgba(45, 18, 22, 0.92) 0%, rgba(22, 10, 12, 0.95) 100%);
  border: 1px solid rgba(255, 0, 0, 0.22);
  border-radius: 14px;
  padding: 22px 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 24px rgba(255, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.script-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,0,0,0.35), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.script-card:hover {
  border-color: rgba(255, 0, 0, 0.6);
  box-shadow: 0 12px 40px rgba(255, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-3px);
}
.script-card:hover::before { opacity: 1; }
.script-card.deployed { border-color: rgba(88, 238, 136, 0.25); }
.script-card.deployed:hover { border-color: rgba(88, 238, 136, 0.45); }

.script-card h3 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.script-card .card-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.4;
}
.script-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* --- Badges --------------------------------------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-accent);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}
.badge-green {
  background: rgba(88, 238, 136, 0.14);
  border-color: rgba(88, 238, 136, 0.4);
  color: var(--green);
  letter-spacing: 0.18em;
}

.meta { font-family: var(--font-accent); font-size: 13px; color: var(--muted); margin-top: 4px; }
.muted { color: var(--muted); }

/* --- Action Bar ----------------------------------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
}

.action-status {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  margin-left: 6px;
  color: var(--muted);
  transition: color 0.2s ease;
}
.action-status.ok { color: var(--green); }
.action-status.err { color: var(--red); }

/* --- Buttons -------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--btn-neutral);
  color: var(--fg);
  border: 1px solid rgba(255,0,0,0.18);
  padding: 9px 18px;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--btn-neutral-hover);
  border-color: rgba(255,0,0,0.32);
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(180deg, #ff1a1a 0%, #cc0000 100%);
  border-color: #cc0000;
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #ff3333 0%, #dd0000 100%);
  border-color: #dd0000;
  box-shadow: 0 6px 28px rgba(255, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

.btn.danger {
  background: rgba(255,49,61,0.12);
  border-color: #FF313D;
  color: #FF313D;
  box-shadow: 0 4px 20px rgba(255, 49, 49, 0.4);
}
.btn.danger:hover {
  background: rgba(255,49,61,0.2);
  box-shadow: 0 6px 28px rgba(255, 49, 49, 0.55);
  transform: translateY(-1px);
}

.btn[disabled], .btn.disabled-btn {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* --- Tabs ----------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-top: 8px;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 16px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: -1px;
  transition: color 0.15s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.tab:hover { color: var(--fg); }
.tab.active {
  color: var(--fg);
  border-bottom-color: var(--orange);
  box-shadow: 0 0 7.97px rgba(255, 0, 0, 0.75);
}
.lock-icon { font-size: 11px; }

.panes { margin-top: 4px; }
.pane { display: none; padding: 20px 0; }
.pane.active { display: block; }

/* --- Protected ------------------------------------ */
.protected-msg {
  padding: 28px;
  background: var(--card-bg);
  border: 1px dashed rgba(255,0,0,0.18);
  border-radius: 12px;
  text-align: center;
  font-family: var(--font);
  font-size: 14px;
  color: var(--muted);
}

/* --- Code Blocks ---------------------------------- */
pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,0,0,0.08);
  border-radius: 10px;
  padding: 18px 22px;
  overflow-x: auto;
}
pre code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: #c9d1d9;
  background: none;
}
code {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(255,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--red3);
}

/* --- Markdown Pane -------------------------------- */
.pane h1, .pane h2, .pane h3, .pane h4 {
  font-family: var(--font);
  font-weight: 700;
  margin: 22px 0 10px;
  letter-spacing: 0.02em;
}
.pane p { margin: 8px 0; }
.pane ul, .pane ol { margin: 8px 0 8px 24px; }
.pane li { margin: 4px 0; }
.pane a { color: var(--red); }
.pane a:hover { color: var(--red3); }
.pane hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.pane blockquote {
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 16px;
  color: var(--muted);
  margin: 12px 0;
}

/* --- Content card wrapper ------------------------- */
.content-card {
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(255, 82, 82, 0.22) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 10% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 90% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse at 50% 50%, rgba(39, 20, 20, 0.93) 0%, rgba(20, 11, 11, 0.93) 100%);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.06), inset 0 0 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 16px;
  padding: 24px;
  margin-top: 8px;
}

/* --- Table ---------------------------------------- */
.table-wrap {
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(255, 82, 82, 0.22) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 10% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse 45% 40% at 90% 100%, rgba(255, 82, 82, 0.10) 0%, transparent 100%),
    radial-gradient(ellipse at 50% 50%, rgba(39, 20, 20, 0.93) 0%, rgba(20, 11, 11, 0.93) 100%);
  box-shadow: 0 0 80px rgba(255, 0, 0, 0.06), inset 0 0 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 8px;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { border-bottom: 2px solid rgba(255,0,0,0.25); }
th {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: top;
  max-width: 280px;
  word-break: break-word;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,0,0,0.025); }

.ts-cell { white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.error-cell { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* --- Action/State Badges -------------------------- */
.action-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.action-deploy { background: rgba(88,238,136,0.12); color: var(--green); border: 1px solid rgba(88,238,136,0.2); }
.action-restart { background: rgba(255,200,50,0.12); color: #ffc832; border: 1px solid rgba(255,200,50,0.2); }
.action-remove { background: rgba(255,49,61,0.12); color: var(--red); border: 1px solid rgba(255,49,61,0.2); }

.state-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.state-success { background: rgba(88,238,136,0.12); color: var(--green); border: 1px solid rgba(88,238,136,0.2); }
.state-failed { background: rgba(255,49,61,0.12); color: var(--red); border: 1px solid rgba(255,49,61,0.2); }
.state-started { background: rgba(255,83,0,0.12); color: #ff8c42; border: 1px solid rgba(255,83,0,0.2); }

/* --- Responsive ----------------------------------- */
@media (max-width: 640px) {
  main { padding: 20px 16px 56px; }
  .topbar { padding: 0 16px; height: 58px; }
  .grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; align-items: flex-start; }
  table { font-size: 12px; }
  th, td { padding: 8px 10px; }
  .login-card { padding: 32px 22px; }
  .login-card .logo-hero .title-1 { font-size: 28px; }
}

.title-1 .logo-v { margin-left: 0.18em; }
