/* =============================================
   АВТОКЛИКЕР — РЕДАКТОР УЗЛОВ
   Современная темная тема в стиле программы
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-primary: #1a1a1a;
  --bg-secondary: #222222;
  --bg-tertiary: #2a2a2a;
  --bg-card: rgba(42, 42, 42, 0.85);
  --bg-card-hover: rgba(50, 50, 50, 0.9);
  --bg-glass: rgba(42, 42, 42, 0.7);
  --bg-header: rgba(26, 26, 26, 0.92);
  --bg-toolbar: #333333;
  --bg-input: #2a2a2a;

  /* Accents */
  --accent-primary: #4a6a7a;
  --accent-hover: #5a7a8a;
  --accent-pressed: #3a5a6a;
  --accent-green: #44aa44;
  --accent-green-hover: #55bb55;
  --accent-warning: #ffaa44;
  --accent-danger: #cc4444;
  --accent-glow: rgba(74, 106, 122, 0.3);
  --accent-border: rgba(74, 106, 122, 0.15);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #dddddd;
  --text-muted: #999999;
  --text-disabled: #888888;
  --text-placeholder: #666666;

  /* Borders */
  --border-light: #3a3a3a;
  --border-medium: #444444;
  --border-dark: #555555;

  /* Node colors (from program) */
  --node-control: #4a7a8a;
  --node-input: #5a8a4a;
  --node-condition: #8a7a5a;
  --node-action: #8a5a4a;
  --node-flow: #6a6a8a;
  --node-signal: #d19a2a;

  /* Sizes */
  --header-height: 70px;
  --max-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Gradients */
  --gradient-hero: linear-gradient(160deg, #1a1a1a 0%, #222222 40%, #1a1a1a 100%);
  --gradient-card: linear-gradient(180deg, rgba(74,106,122,0.06) 0%, transparent 100%);
  --gradient-accent: linear-gradient(135deg, #4a6a7a, #5a7a8a);
  --gradient-green: linear-gradient(135deg, #44aa44, #55bb55);
  --gradient-text: linear-gradient(135deg, #4a6a7a, #6a8a9a, #44aa44);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(74,106,122,0.2);
  --shadow-glow-green: 0 0 20px rgba(68,170,68,0.2);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* --- Scrollbar (matching program) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #5a5a5a; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section common --- */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
  margin: 1rem auto 1.5rem;
}

/* --- Grid --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header.scrolled {
  background: rgba(26, 26, 26, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--text-primary);
}

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

.nav a {
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-normal);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: rgba(74,106,122,0.1);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
}

.nav-cta {
  background: var(--gradient-accent) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem 1.25rem !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* --- Mobile Menu Toggle --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--gradient-hero), url('../img/fon.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(74,106,122,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(68,170,68,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 750px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(74,106,122,0.15);
  border: 1px solid rgba(74,106,122,0.25);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero h1 .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(74,106,122,0.3);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-secondary {
  background: rgba(74,106,122,0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: rgba(74,106,122,0.2);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-green {
  background: var(--gradient-green);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(68,170,68,0.3);
}

.btn-green:hover {
  box-shadow: var(--shadow-glow-green);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--accent-danger);
  color: var(--text-primary);
}

.btn-danger:hover {
  background: #dd5555;
  transform: translateY(-1px);
  color: var(--text-primary);
}

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

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.feature-card:hover {
  border-color: rgba(74,106,122,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(74,106,122,0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-number .accent {
  color: var(--accent-primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Screenshot Section --- */
.screenshot-wrapper {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.screenshot-wrapper::before {
  content: '';
  display: block;
  padding-top: 62.5%;
}

.screenshot-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-disabled);
  gap: 1rem;
  background: linear-gradient(135deg, #1e1e1e, #252525);
}

.screenshot-placeholder svg {
  width: 64px;
  height: 64px;
  stroke: var(--text-disabled);
  opacity: 0.5;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: rgba(74,106,122,0.25);
  box-shadow: var(--shadow-md);
}

/* --- Pricing / License --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(74,106,122,0.3);
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
  opacity: 1;
}

.pricing-badge {
  display: inline-block;
  background: rgba(74,106,122,0.15);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.pricing-card h3 {
  margin-bottom: 0.75rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pricing-price-period {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.pricing-features {
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
}

.pricing-features li.disabled {
  color: var(--text-disabled);
}

.pricing-features li.disabled::before {
  content: '✗';
  color: var(--text-disabled);
}

/* --- Download --- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.download-card:hover {
  border-color: rgba(74,106,122,0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.download-icon {
  width: 56px;
  height: 56px;
  background: rgba(74,106,122,0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.download-card h3 {
  margin-bottom: 0.5rem;
}

.download-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.download-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* --- Manual / Docs --- */
.manual-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
}

.manual-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 4rem);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.manual-sidebar h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.manual-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.manual-nav a {
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.manual-nav a:hover {
  background: rgba(74,106,122,0.1);
  color: var(--text-primary);
}

.manual-nav a.active {
  background: rgba(74,106,122,0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

.manual-nav .nav-child {
  padding-left: 1.25rem;
}

.manual-content {
  padding-bottom: 4rem;
}

.manual-content h1 {
  margin-bottom: 1rem;
}

.manual-content h2 {
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.manual-content h3 {
  margin: 1.5rem 0 0.75rem;
}

.manual-content p {
  margin-bottom: 1rem;
}

.manual-content ul,
.manual-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.manual-content ol {
  list-style: decimal;
}

.manual-content li {
  margin-bottom: 0.5rem;
}

.manual-content code {
  background: rgba(74,106,122,0.1);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.manual-content pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.manual-content pre code {
  background: none;
  padding: 0;
}

.manual-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
}

.manual-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem auto;
  max-width: 100%;
}

/* --- Examples --- */
.examples-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}

.filter-tab:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.filter-tab.active {
  background: rgba(74,106,122,0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.example-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(74,106,122,0.3);
}

.example-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.example-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.example-card:hover .example-image img {
  transform: scale(1.03);
}

.example-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-disabled);
  font-size: 0.9rem;
}

.example-body {
  padding: 1.25rem 1.5rem;
}

.example-body h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.example-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.example-category {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* --- Videos --- */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(74,106,122,0.3);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.video-card:hover .video-play-overlay {
  opacity: 1;
}

.video-play-btn {
  width: 56px;
  height: 56px;
  background: rgba(74,106,122,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

.video-play-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
  margin-left: 3px;
}

.video-card:hover .video-play-btn {
  transform: scale(1.1);
}

.video-platform-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0,0,0,0.7);
  color: var(--text-primary);
  text-transform: uppercase;
}

.video-body {
  padding: 1.25rem 1.5rem;
}

.video-body h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.video-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.lightbox-close:hover {
  color: var(--accent-primary);
}

/* --- Video Modal --- */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.video-modal-content {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16/9;
  position: relative;
}

.video-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
}

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.video-modal-close:hover {
  color: var(--accent-primary);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: 1.1rem;
}

.social-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.animate {
  opacity: 0;
  transform: translateY(30px);
}

.animate.animated {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale.animated {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* --- Page Header --- */
.page-header {
  padding: calc(var(--header-height) + 3rem) 0 3rem;
  text-align: center;
  background: var(--gradient-hero);
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- Error Pages --- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

/* --- Flash Messages --- */
.flash-messages {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash-message {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease;
  min-width: 250px;
  max-width: 400px;
}

.flash-success {
  background: rgba(68,170,68,0.15);
  border: 1px solid rgba(68,170,68,0.3);
  color: var(--accent-green);
}

.flash-error {
  background: rgba(204,68,68,0.15);
  border: 1px solid rgba(204,68,68,0.3);
  color: var(--accent-danger);
}

/* ----------------------------------------------
   ADMIN PANEL STYLES
   ---------------------------------------------- */
.admin-body {
  background: var(--bg-primary);
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  padding: 1.5rem 0;
}

.admin-sidebar-header {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.admin-sidebar-header .logo {
  font-size: 1rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.admin-nav a:hover {
  background: rgba(74,106,122,0.1);
  color: var(--text-primary);
}

.admin-nav a.active {
  background: rgba(74,106,122,0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

.admin-nav a.active::before {
  content: '';
  width: 3px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 2px;
  margin-left: calc(-0.85rem - 3px);
  position: absolute;
  left: 0;
}

.admin-main {
  flex: 1;
  margin-left: 250px;
  padding: 2rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header h1 {
  font-size: 1.5rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

/* Admin Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.admin-stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Admin Tables */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 0.85rem 1.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
}

.admin-table td {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(74,106,122,0.03);
}

.admin-table .actions {
  display: flex;
  gap: 0.5rem;
}

/* Admin Forms */
.admin-form {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 800px;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group .hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(74,106,122,0.15);
}

.form-control::placeholder {
  color: var(--text-placeholder);
}

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

select.form-control {
  cursor: pointer;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.form-checkbox label {
  margin-bottom: 0;
  cursor: pointer;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

/* Admin Login */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.admin-login-box {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
}

.admin-login-box .logo {
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.admin-login-box h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.admin-login-box p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.admin-login-error {
  background: rgba(204,68,68,0.1);
  border: 1px solid rgba(204,68,68,0.25);
  color: var(--accent-danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(74,106,122,0.3);
  border-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
  background: var(--accent-primary);
}

/* Badge */
.badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-active {
  background: rgba(68,170,68,0.15);
  color: var(--accent-green);
}

.badge-inactive {
  background: rgba(136,136,136,0.15);
  color: var(--text-disabled);
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100%;
    position: fixed;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    padding: 1rem;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }
}

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1200px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .manual-layout { grid-template-columns: 1fr; }
  .manual-sidebar {
    position: static;
    margin-bottom: 2rem;
    max-height: none;
  }
  .pricing-card.featured { transform: none; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 999;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav a {
    font-size: 1.15rem;
    padding: 0.75rem 1.5rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .examples-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-header { padding-top: calc(var(--header-height) + 2rem); }
  .examples-header { flex-direction: column; align-items: flex-start; }
  .section { padding: 3rem 0; }
  .admin-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { padding: 1.25rem; }
  .hero { min-height: 90vh; }
  .section { padding: 2.5rem 0; }
}
