/* --------------------------------------------------------------------------
   REMIX STUDIO - Premium Professional Red & Black FiveM Store System
   -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Ultra Dark Metallic & Red Palette */
  --bg-dark: #050508;
  --bg-card: rgba(14, 14, 20, 0.85);
  --bg-card-hover: rgba(24, 24, 34, 0.95);
  --bg-elevated: #111118;
  --bg-glass: rgba(10, 10, 15, 0.9);
  
  --accent-red: #FF2A4D;
  --accent-red-hover: #FF4767;
  --accent-red-dark: #880A1E;
  --accent-crimson: #DC2626;
  --accent-glow: rgba(255, 42, 77, 0.3);
  --accent-glow-subtle: rgba(255, 42, 77, 0.08);
  
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-dark: #4B5563;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(255, 42, 77, 0.25);
  --border-accent-strong: rgba(255, 42, 77, 0.6);
  
  --badge-esx: #ef4444;
  --badge-qbox: #f97316;
  --badge-standalone: #10b981;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  
  --font-heading: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-glow: 0 0 30px rgba(255, 42, 77, 0.2);
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.8);
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Global Rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Particle & Grid System */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.bg-gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% -10%, rgba(255, 42, 77, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(136, 10, 30, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg-dark) 0%, #08080c 100%);
  pointer-events: none;
  z-index: 1;
}

.app-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 20%, #FCA5A5 50%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-red-glow {
  color: var(--accent-red);
  text-shadow: 0 0 14px var(--accent-glow);
}

/* Status Pulse Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #10b981;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #880A1E, var(--accent-red));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  box-shadow: 0 0 18px var(--accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #fff;
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--accent-red);
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.68rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-crimson));
  color: #FFFFFF;
  box-shadow: 0 4px 20px var(--accent-glow);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 42, 77, 0.5);
  background: linear-gradient(135deg, var(--accent-red-hover), var(--accent-red));
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  background: var(--accent-glow-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 1.75rem;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  margin-bottom: 4.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: #fff;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* Section Controls */
.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Filter Controls Bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(16px);
}

@media (min-width: 768px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.filter-tab {
  padding: 0.55rem 1.1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.filter-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.filter-tab.active {
  background: var(--accent-glow-subtle);
  color: var(--accent-red);
  border-color: var(--border-accent);
}

/* Scripts Gallery Grid */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

/* Script Card */
.script-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  backdrop-filter: blur(16px);
}

.script-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.card-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0d0d12;
}

.card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.script-card:hover .card-banner img {
  transform: scale(1.05);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 65%);
}

.card-framework-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

.badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-esx {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-qbox {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-standalone {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-free {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-red);
  color: #fff;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 0 12px var(--accent-glow);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resmon-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.resmon-value {
  color: #34d399;
  font-weight: 700;
}

.card-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.card-footer {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.card-footer .btn {
  flex: 1;
}

/* VS Code / IDE Window Component */
.ide-window {
  background: #09090e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.ide-header {
  background: #101017;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.ide-dots {
  display: flex;
  gap: 0.4rem;
}

.ide-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.ide-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Matrix Table Section */
.matrix-section {
  margin-bottom: 5rem;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.matrix-table th, .matrix-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}

.matrix-table th {
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 700;
}

.matrix-table tr:hover {
  background: rgba(255, 42, 77, 0.03);
}

/* Testimonials Cards */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 5rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-glow-subtle);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  font-weight: 800;
  font-family: var(--font-heading);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
}

/* Responsive YouTube Showcase Video */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-accent);
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px var(--accent-glow-subtle);
  background: #000;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Tools Section */
.tools-section {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 18, 24, 0.6) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(16px);
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-glow-subtle);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-red);
  font-size: 1.5rem;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.68rem 0.9rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-body);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-red);
}

.code-output-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #34d399;
  max-height: 220px;
  overflow-y: auto;
  position: relative;
  white-space: pre;
  margin-top: 1rem;
}

/* FAQ & Community Section */
.faq-section {
  margin-bottom: 5rem;
}

.faq-accordion {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-heading);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform 0.2s ease;
  color: var(--accent-red);
}

/* Discord & Tebex CTA Box */
.discord-card {
  background: linear-gradient(135deg, rgba(255, 42, 77, 0.15), rgba(14, 14, 20, 0.95));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

/* Footer */
.footer {
  background: #030304;
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-links-group h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
  font-size: 0.85rem;
}

/* Native Dialog & Top-Layer Modal Styling */
dialog.script-modal {
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-accent-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  color: var(--text-main);
  max-width: 880px;
  width: 92vw;
  max-height: 90vh;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 50px rgba(255, 42, 77, 0.35);
  overflow: hidden;
  
  opacity: 0;
  transform: scale(0.95) translateY(12px);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.3s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog.script-modal[open] {
  opacity: 1;
  transform: scale(1) translateY(0);
  
  @starting-style {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
}

dialog.script-modal::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: display 0.3s allow-discrete, overlay 0.3s allow-discrete, background-color 0.3s ease, backdrop-filter 0.3s ease;
}

dialog.script-modal[open]::backdrop {
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  
  @starting-style {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.5);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.modal-nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
}

.modal-tab-btn {
  padding: 0.9rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-tab-btn:hover {
  color: #fff;
}

.modal-tab-btn.active {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

.modal-body {
  padding: 1.75rem;
  max-height: calc(85vh - 160px);
  overflow-y: auto;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 15px var(--accent-glow);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #222230;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red-dark);
}
