:root {
  --primary: #f5a623;
  --primary-600: #ffb743;
  --bg-main: #0a0a0d;
  --bg-elev-1: #121216;
  --bg-card: #18181b;
  --bg-header: rgba(22, 22, 24, 0.82);
  --border: #232329;
  --text-main: #fafafa;
  --text-muted: #b3b3c2;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lg: 0 10px 40px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 6px 24px rgba(0,0,0,.28), 0 1px 1.5px rgba(0,0,0,.15);
  --shadow-inset: 0 1px 2px rgba(0,0,0,.35) inset;
  --container: 1000px;
}

/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1000px 400px at 20% -10%, rgba(245,166,35,0.09), transparent 60%),
              radial-gradient(800px 600px at 120% 10%, rgba(81,81,124,0.16), transparent 60%),
              var(--bg-main);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background particles layering: below content, above body background */
#bgParticles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, footer { position: relative; z-index: 1; }

::selection { background: rgba(245,166,35,.28); color: #fff; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.main { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; margin: 12px auto 28px; border-radius: var(--radius-lg);
  background: var(--bg-header); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: var(--shadow-md);
  max-width: calc(var(--container) - 8px);
}
.logo-wrap { display: flex; align-items: center; gap: .8rem; }
.logo-img { width: 36px; height: 36px; object-fit: contain; display: block; }
.logo-title { font-family: 'Poppins', sans-serif; font-weight: 800; letter-spacing: -0.3px; font-size: 1.12rem; }
.header-links { display: flex; align-items: center; gap: .5rem; }

/* Links & buttons */
.nav-link {
  color: var(--text-main); text-decoration: none; padding: .38rem .9rem; border-radius: var(--radius-sm);
  font-weight: 550; letter-spacing: .01em; transition: all .16s ease; outline: none; border: 1px solid transparent;
}
.nav-link:hover, .nav-link:focus-visible { background: #232329; color: var(--primary); }

.btn, .key-btn, .copy-btn, #fetchDataBtn { 
  appearance: none; border: none; border-radius: var(--radius-sm); cursor: pointer; font-weight: 800; 
  transition: transform .06s ease, background .16s ease, box-shadow .16s ease; text-decoration: none;
}
.btn-primary, .key-btn, #fetchDataBtn {
  background: linear-gradient(180deg, var(--primary), var(--primary-600));
  color: #18181b; box-shadow: 0 6px 24px rgba(245,166,35,.18), 0 1px 2px rgba(0,0,0,.25);
  padding: .62rem 1.2rem; font-size: 1.02rem;
}
.btn-discord {
  background: #5865f2;
  color: #18181b; box-shadow: 0 6px 24px rgba(245,166,35,.18), 0 1px 2px rgba(0,0,0,.25);
  padding: .62rem 1.2rem; font-size: 1.02rem;
}
.btn-icon { margin-right: .45rem; vertical-align: -3px; font-size: 20px; }
.btn-primary:hover, .key-btn:hover, #fetchDataBtn:hover { filter: brightness(1.05); }
.btn-primary:active, .key-btn:active, #fetchDataBtn:active { transform: translateY(1px); }

.copy-btn { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border); padding: .54rem 1.1rem; }
.copy-btn:hover { border-color: rgba(245,166,35,.6); color: var(--primary); }

/* Cards */
.card, .hero-card, .feature-card, .key-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)) , var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.hero { display: grid; align-items: center; grid-template-columns: 1.1fr 1fr; gap: 2rem; max-width: 1120px; margin: 2.2rem auto 2.8rem; }
.hero-media { display: flex; justify-content: flex-start; }
.hero-media img { width: min(520px, 92%); max-width: 560px; height: auto; display: block; }
.hero-content { display: flex; flex-direction: column; gap: 1rem; }
.hero-actions { display: flex; gap: .8rem; align-items: center; }
.btn-outline { border: 1px solid var(--border); color: var(--text-main); padding: .62rem 1.1rem; border-radius: var(--radius-sm); text-decoration: none; }
.key-card { padding: 2.1rem 1.6rem; margin: 0 auto; min-width: 320px; max-width: 520px; }
.card { padding: 1.8rem; margin-bottom: 2rem; }

.hero-title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 900; color: var(--primary); letter-spacing: -0.6px; }
.hero-desc { color: var(--text-main); font-size: 1.06rem; opacity: .95; margin: .9rem 0 1.6rem; line-height: 1.6; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; max-width: 900px; margin: 1.2rem auto 0; }
.features.features--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .features.features--two { grid-template-columns: 1fr; } }
.feature-card { padding: 1.8rem 1.4rem; min-height: 130px; display: flex; flex-direction: column; gap: .6rem; }
.feature-title { color: var(--primary); font-weight: 900; font-size: 1.18rem; letter-spacing: -0.015em; display: flex; align-items: center; gap: .5rem; }
.feature-icon { font-size: 22px; }
.feature-desc { color: var(--text-muted); font-size: .98rem; line-height: 1.55; }

/* Scripts catalog */
.script-card { display: grid; grid-template-columns: 132px 1fr; gap: 1.1rem; align-items: stretch; justify-items: start; padding: 1rem; }
.script-thumb-wrap {
  width: 120px; height: 120px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: none;
  background: transparent;
  box-shadow: none;
}
.script-thumb-inner {
  width: 100%; height: 100%;
  border-radius: 0.60rem;
  overflow: hidden;
  display: grid; place-items: center;
}
.script-thumb {
  width: 100%; height: 100%; 
  background: #0f0f12; object-fit: cover; display: block;
}
.script-meta { display: flex; flex-direction: column; gap: .35rem; padding-top: .5rem; height: 100%; width: 100%; }
.script-meta-bottom { margin-top: auto; display: flex; gap: .5rem; justify-content: flex-end; align-items: center; }
.script-title { color: var(--text-main); font-weight: 850; letter-spacing: -.2px; font-size: 1.06rem; }
.script-desc { color: var(--text-muted); font-size: .95rem; line-height: 1.45; }

/* Status chip */
.script-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); }
.status-icon { font-size: 18px; }
.status-op { color: #22c55e; }
.status-wip { color: #f59e0b; }
.status-patched { color: #ef4444; }

.script-open { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; background: rgba(255,255,255,0.02); }
.script-open:hover { border-color: rgba(245,166,35,.6); color: var(--primary); }
.script-open .material-symbols-rounded { font-size: 16px; }

@media (max-width: 600px) {
  .script-card { grid-template-columns: 112px 1fr; }
  .script-thumb-wrap { width: 104px; height: 104px; }
  .script-thumb-inner { border-radius: var(--radius-lg); }
}

/* Code blocks */
.code-block {
  background: #121218e6; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-inset);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'JetBrains Mono', Consolas, 'Liberation Mono', monospace;
  color: #f4f4f4; padding: 1rem; width: 100%; white-space: pre-wrap; word-break: break-word; margin: .6rem 0 1.1rem;
}
.script-label { color: var(--text-main); font-weight: 600; margin-bottom: .5rem; }
.key-title { color: var(--primary); font-weight: 900; letter-spacing: -0.4px; margin-bottom: 1rem; text-align: center; }

/* Forms */
.analysis-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-title { font-size: 1.28rem; font-weight: 800; text-align: center; }
.input-group { display: flex; gap: .8rem; flex-wrap: wrap; }
#analysisKeyInput {
  flex: 1; min-width: 220px; background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-main); padding: .72rem .9rem; font-size: 1rem; box-shadow: var(--shadow-inset);
}
#analysisKeyInput:focus-visible { outline: none; border-color: rgba(245,166,35,.7); box-shadow: 0 0 0 3px rgba(245,166,35,.18); }

/* Table */
.table-container { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.results-table th, .results-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.results-table th { color: var(--primary); font-weight: 700; }
.results-table td { color: var(--text-muted); }
.results-table tr:last-child td { border-bottom: none; }
.status-active { color: #4ade80; }
.status-expired { color: #f87171; }

/* Footer */
.footer { text-align: center; color: var(--text-muted); margin: 3.2rem auto 1.2rem; padding: .8rem 0; }

/* Messages */
.message-box { text-align: center; padding: 1.6rem; color: var(--text-muted); font-size: 1.02rem; }

/* Animations */
@keyframes subtle-float { from { transform: translateY(0); } 50% { transform: translateY(-3px); } to { transform: translateY(0); } }
.hero-card { animation: subtle-float 10s ease-in-out infinite; }

/* Responsive */
@media (max-width: 600px) {
  .header { margin: 8px 8px 18px; padding: .9rem .9rem; }
  .logo-img { width: 30px; height: 30px; }
  .logo-title { font-size: 1rem; }
  .card { padding: 1.1rem; }
  .hero { grid-template-columns: 1fr; gap: 1.25rem; margin: 1.6rem auto 2.2rem; }
  .hero-media { justify-content: center; }
  .hero-media img { width: 92%; max-width: 520px; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .features { gap: .8rem; }
}


