/* ==========================================================================
   Lorius Scripts — global stylesheet
   Minimal, modern, responsive. Neutral palette with an indigo accent.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --accent: #6366f1;
  --accent-dark: #4f46e5;
  --accent-soft: #eef2ff;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.1);
  --max-width: 1100px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-links a.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero (home page)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 6.5rem 1.25rem 5.5rem;
  background: linear-gradient(120deg, #eef2ff, #faf5ff, #eff6ff, #eef2ff);
  background-size: 300% 300%;
  animation: hero-slide 14s ease infinite;
}

@keyframes hero-slide {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--accent-dark), #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .tagline {
  margin-top: 0.9rem;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
}

.hero .hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Sections & typography
   -------------------------------------------------------------------------- */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 640px;
}

.page-header {
  padding: 3.5rem 0 1rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Feature cards (home)
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Script cards (scripts page)
   -------------------------------------------------------------------------- */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.script-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fade-up 0.5s ease both;
}

.script-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.script-card .card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.25rem 0;
}

.script-card .game-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.script-card .game-logo-fallback {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #a855f7);
}

.script-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.script-card .card-body {
  padding: 0.85rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
}

.script-card .description {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
}

.script-card .card-actions {
  display: flex;
  gap: 0.6rem;
}

.script-card .card-actions .btn {
  flex: 1;
  justify-content: center;
}

.copy-feedback {
  background: var(--success) !important;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Forms (suggestions, admin)
   -------------------------------------------------------------------------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 640px;
  margin: 0 auto 3rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-group .hint {
  font-weight: 400;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-message {
  display: none;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.form-message.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-message.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* --------------------------------------------------------------------------
   Ad placeholders — replace with real AdSense units after approval
   -------------------------------------------------------------------------- */
.ad-slot {
  max-width: var(--max-width);
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

.ad-slot .ad-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  min-height: 90px;
}

.ad-slot--rect .ad-placeholder {
  min-height: 250px;
  max-width: 336px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.about-content {
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.about-content p {
  margin-bottom: 1.1rem;
  color: var(--text);
}

.about-content .muted {
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Admin hub
   -------------------------------------------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-panel h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.admin-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}

.admin-list .item-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-list .item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-toolbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.admin-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.admin-note code {
  background: rgba(99, 102, 241, 0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer nav {
  display: flex;
  gap: 1rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--accent-dark);
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-up 0.7s ease both;
}

.fade-in-delay-1 { animation-delay: 0.15s; }
.fade-in-delay-2 { animation-delay: 0.3s; }
.fade-in-delay-3 { animation-delay: 0.45s; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-links.open {
    display: flex;
    animation: fade-up 0.25s ease both;
  }

  .hero {
    padding: 4.5rem 1.25rem 4rem;
  }

  .form-card {
    padding: 1.5rem;
  }
}
