/* Variables */
/* NOTE: index.html loads landing-critical.css + async landing-below-fold.css; other pages use landing.css */
:root {
  --bg-dark: #1f2229;
  --bg-darker: #191c22;
  --bg-code-editor: #2d2d2d;
  --bg-code-tab: #3a3a3a;
  --bg-code-tab-active: #2d2d2d;
  --bg-purple-light: #e8d5f2;
  --bg-secondary: #1f2229;
  --text-white: #ffffff;
  --text-gray: #cccccc;
  --text-black: #000000;
  --accent-orange: #6c7cff;
  --accent-orange-hover: #5468f2;
  --accent-hover: #5468f2;
  --accent-purple: #9d4edd;
  --accent-purple-light: #c77dff;
  --glow-orange: rgba(108, 124, 255, 0.3);
  --glow-purple: rgba(157, 78, 221, 0.3);
  --code-keyword: #ff9800;
  --code-function: #b2bdff;
  --code-string: #ff6b6b;
  --code-builtin: #4ec9b0;
  --code-variable: #9cdcfe;
  --text-primary: #ffffff;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove outline on mouse focus, but keep it for keyboard navigation */
button:focus:not(:focus-visible),
button:active:not(:focus-visible),
a:focus:not(:focus-visible),
a:active:not(:focus-visible),
input:focus:not(:focus-visible),
input:active:not(:focus-visible),
textarea:focus:not(:focus-visible),
textarea:active:not(:focus-visible),
select:focus:not(:focus-visible),
select:active:not(:focus-visible) {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Show visible focus indicator for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: hidden;
}

/* Custom Scrollbar - в цвет сайта */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-corner {
  background: var(--bg-purple-light);
  border: none;
  outline: none;
}

::-webkit-scrollbar-track {
  background: var(--bg-purple-light);
  border-radius: 10px;
  border: none;
  outline: none;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-orange);
  border-radius: 10px;
  border: none;
  outline: none;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange-hover);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #131416;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f5f5f5;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-orange) var(--bg-purple-light);
}

[data-theme="dark"] * {
  scrollbar-color: var(--accent-orange) #131416;
}

[data-theme="light"] * {
  scrollbar-color: var(--accent-orange) #f5f5f5;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-purple-light);
  color: var(--text-black);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background: #131416;
  color: var(--text-white);
}

[data-theme="light"] body {
  background: #f5f5f5;
  color: var(--text-black);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.header .container,
.hero-section-wrapper > .container {
  max-width: 1776px;
}

@media (max-width: 969px) {
  html {
    width: 100%;
    overflow-x: hidden;
  }

  .container {
    max-width: 100%;
    padding: 0 16px;
    width: 100%;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  * {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 769px) {
  .container {
    max-width: 100%;
    padding: 0 16px;
  }
}

/* Header */
.header {
  padding: 20px 0;
  background: transparent;
  border-bottom: none;
  position: relative;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.header-top-indicator {
  position: fixed;
  top: 0;
  left: 50vw;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-orange);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
  display: none;
}

[data-theme="dark"] .header {
  background: transparent;
  border-bottom: none;
}

[data-theme="light"] .header {
  background: transparent;
  border-bottom: none;
}

/* Header with background when scrolled */
.header.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .header.scrolled {
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  gap: 24px;
}

.header-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-menu-wrapper .theme-toggle-btn {
  margin-left: 0;
}

/* Header Navigation */

.header-nav-item {
  position: relative;
}

.header-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  position: relative;
  --header-link-accent: var(--accent-orange);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 6px;
  font-family: inherit;
  white-space: nowrap;
}

[data-theme="dark"] .header-nav-link {
  color: #ffffff;
}

[data-theme="light"] .header-nav-link {
  color: #333333;
}

.header-nav-link i {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.header-nav-item-dropdown.active .header-nav-link i {
  transform: rotate(180deg);
}

.header-nav-link:hover {
  color: var(--header-link-accent);
}

[data-theme="light"] .header-nav-link:hover {
  background: transparent;
  color: var(--header-link-accent);
}

[data-theme="dark"] .header-nav-link:hover {
  background: transparent;
}

.header-nav-link--vacancies {
  --header-link-accent: #6c7cff;
}

.header-nav-link--trainer {
  --header-link-accent: #35d07f;
}

.header-nav-link--interview {
  --header-link-accent: #f2b230;
}

.header-nav-link--support {
  --header-link-accent: #49b3ff;
}

.header-nav-link:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

/* Скрытый пункт меню (до доработки, не удалять) */
.header-nav-link--hidden {
  display: none !important;
  visibility: hidden !important;
}

/* questions.html временно скрыт: flex у ссылок перебивает [hidden] */
.header-nav-link--trainer,
.header-nav a[href*="questions/questions.html"],
.header-menu a[href*="questions/questions.html"],
a.header-nav-link[href*="questions/questions.html"],
.mobile-menu-nav a[href*="questions/questions.html"],
.mobile-menu a[href*="questions/questions.html"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* BETA badge on nav links - правый край чуть выше, левый на месте */
.header-nav-badge {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 0;
  margin-left: -0.15em;
  padding: 1px 5px;
  background: var(--accent-orange);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  vertical-align: baseline;
  transform: rotate(-8deg);
  transform-origin: left center;
}

/* Header Dropdown Menu */
.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: #2d2d2d;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

[data-theme="light"] .header-dropdown-menu {
  background: #f5f5f5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.header-nav-item-dropdown.active .header-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-dropdown-menu-inner {
  padding: 8px 0;
}

.header-dropdown-item {
  display: block;
  padding: 12px 20px;
  color: var(--text-white);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

[data-theme="light"] .header-dropdown-item {
  color: var(--text-black);
}

.header-dropdown-item:hover {
  background: transparent;
  border-left-color: var(--accent-orange);
  color: var(--accent-orange);
}

[data-theme="light"] .header-dropdown-item:hover {
  background: transparent;
}

.header-dropdown-item:focus {
  outline: none;
  background: transparent;
  border-left-color: var(--accent-orange);
}

[data-theme="light"] .header-dropdown-item:focus {
  background: transparent;
}

.header-burger-wrapper {
  position: relative;
  display: none; /* Hidden for future use */
  align-items: center;
}

/* Theme Toggle Button - скрыт: светлая тема пока не доработана */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #8ea5ff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  visibility: hidden !important;
  pointer-events: none !important;
}

.theme-toggle-btn i {
  font-size: 18px;
  color: #8ea5ff;
  transition: none;
}

.theme-toggle-btn:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

[data-theme="light"] .theme-toggle-btn {
  background: transparent;
  border: 2px solid #8ea5ff;
}

[data-theme="light"] .theme-toggle-btn i {
  color: #8ea5ff;
}

/* Animation Toggle Switch */
.animation-toggle-switch {
  position: relative;
  width: 40px;
  height: 23px;
  background: rgba(108, 124, 255, 0.3);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background-color 0.3s ease;
}

.animation-toggle-switch:hover {
  background: rgba(108, 124, 255, 0.46);
}

.animation-toggle-switch[aria-pressed="true"] {
  background: var(--accent-orange);
}

.animation-toggle-switch[aria-pressed="true"]:hover {
  background: var(--accent-orange-hover);
}

.animation-toggle-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.animation-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb {
  transform: translateX(17px);
}

.animation-toggle-thumb i {
  font-size: 9px;
  color: var(--accent-orange);
  transition: color 0.3s ease, transform 0.3s ease;
  display: block;
  line-height: 1;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb i {
  color: var(--accent-orange);
}

/* Показываем play когда выключено, pause когда включено */
.animation-toggle-thumb .fa-pause {
  display: none;
}

.animation-toggle-thumb .fa-play {
  display: block;
  margin-left: 1px;
}

.animation-toggle-switch[aria-pressed="true"]
  .animation-toggle-thumb
  .fa-pause {
  display: block;
}

.animation-toggle-switch[aria-pressed="true"] .animation-toggle-thumb .fa-play {
  display: none;
}

.animation-toggle-switch:focus {
  outline: none;
  box-shadow: none;
}

.animation-toggle-switch:focus-visible {
  outline: none;
  box-shadow: none;
}

/* Header Language Switch */
.header-language-switch {
  position: relative;
  flex-shrink: 0;
}

.header-language-switch__summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
}

.header-language-switch__current {
  min-width: 62px;
  height: 40px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.header-language-switch__flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header-language-switch__flag-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.header-language-switch__label {
  font-size: 14px;
  font-weight: 600;
  color: #f5f7ff;
  letter-spacing: 0.02em;
}

.header-language-switch__toggle {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d7dcff;
  font-size: 10px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s ease !important;
  will-change: transform;
}

.header-language-switch.is-open .header-language-switch__toggle {
  transform: rotate(180deg);
}

.header-language-switch__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border-radius: 10px;
  border: none;
  background: #403e4c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  z-index: 1004;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0.38s !important;
  will-change: opacity, transform;
}

.header-language-switch > .header-language-switch__dropdown {
  display: block;
}

.header-language-switch.is-open > .header-language-switch__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s !important;
  transition-delay: 0.08s, 0.08s, 0s !important;
}

.header-language-switch:not(.is-open) > .header-language-switch__dropdown {
  transition: opacity 0.28s cubic-bezier(0.4, 0, 1, 1),
    transform 0.28s cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 0s !important;
}

.header-language-switch__option {
  width: 100%;
  min-height: 38px;
  border: none;
  background: transparent;
  color: #e7ebff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.header-language-switch__option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.header-language-switch__option--active {
  color: #ffffff;
  font-weight: 700;
}

.header-language-switch__option--disabled,
.header-language-switch__option[disabled],
.header-language-switch__option[aria-disabled="true"] {
  color: rgba(231, 235, 255, 0.38);
  cursor: not-allowed;
  opacity: 0.78;
  pointer-events: none;
}

.header-language-switch__option--disabled:hover,
.header-language-switch__option[disabled]:hover,
.header-language-switch__option[aria-disabled="true"]:hover {
  background: transparent;
}

.header-language-switch__option--disabled .header-language-switch__option-label,
.header-language-switch__option[disabled] .header-language-switch__option-label {
  color: rgba(231, 235, 255, 0.42);
}

.header-language-switch__option-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 0;
  padding: 1px 5px;
  background: var(--accent-orange, #ff8a3d);
  color: #000;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  transform-origin: center center;
  flex-shrink: 0;
}

.header-language-switch__option-badge--beta {
  background: var(--accent-orange, #ff8a3d);
  color: #000;
}

.header-language-switch__option-badge--soon {
  background: var(--accent-orange, #ff8a3d);
  color: #000;
}

.header-language-switch__summary:focus-visible,
.header-language-switch__option:focus-visible {
  outline: 2px solid rgba(142, 165, 255, 0.8);
  outline-offset: 2px;
}

[data-theme="light"] .header-language-switch__current {
  border-color: transparent;
  background: transparent;
}

[data-theme="light"] .header-language-switch__label {
  color: #2a315a;
}

[data-theme="light"] .header-language-switch__toggle {
  border-color: transparent;
  background: transparent;
  color: #2a315a;
}

[data-theme="light"] .header-language-switch__dropdown {
  border: none;
  background: #403e4c;
  box-shadow: 0 14px 32px rgba(17, 28, 63, 0.18);
}

[data-theme="light"] .header-language-switch__option {
  color: #2d3562;
}

[data-theme="light"] .header-language-switch__option:hover {
  background: rgba(32, 54, 117, 0.08);
}

/* Global animation disable - when animations are turned off */
.animations-disabled *,
.animations-disabled *::before,
.animations-disabled *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* Keep essential transitions for UI elements */
.animations-disabled .header,
.animations-disabled .theme-toggle-btn,
.animations-disabled .animation-toggle-switch,
.animations-disabled .animation-toggle-thumb,
.animations-disabled .mobile-menu,
.animations-disabled .mobile-menu-overlay,
.animations-disabled .faq-answer,
.animations-disabled .header-nav-link,
.animations-disabled .header-donate-btn,
.animations-disabled .start-learning-btn,
.animations-disabled .subscribe-btn,
.animations-disabled .course-card,
.animations-disabled button,
.animations-disabled a {
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease,
    transform 0.2s ease !important;
}

/* Кнопка «наверх»: при отключённых анимациях - короче, без «пружины» */
.animations-disabled .scroll-to-top {
  transition: opacity 2.4s ease-in-out, transform 2.4s ease-in-out, visibility 0s linear 2.4s !important;
}

.animations-disabled .scroll-to-top.visible {
  transition: opacity 2.4s ease-in-out, transform 2.4s ease-in-out, visibility 0s linear 0s !important;
}

/* Stop iframes (videos) when animations disabled */
.animations-disabled iframe {
  pointer-events: none;
}

/* ===== Sections above snow (z-index > 9999) ===== */
.database-categories,
.terms-intro,
.terms-section,
.terms-content,
.course-card,
.payment-section,
.payment-card,
.payment-cards,
.payment-methods,
.donate-wrapper,
.donate-header,
.subscribe-box,
.lesson-container,
.lesson-breadcrumb,
.lesson-header,
.lesson-content,
.lesson-block,
.lesson-navigation {
  position: relative;
  z-index: 10000;
}

.header-donate-btn {
  padding: 10px 20px;
  background: var(--accent-orange);
  color: #333;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.header-donate-btn i {
  font-size: 14px;
}

.header-donate-btn:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
}

.header-donate-btn:focus {
  outline: none;
}

.header-donate-btn:active {
  transform: translateY(0);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-black);
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.header-logo:hover,
.header-logo:active,
.header-logo:focus {
  opacity: 1;
  color: var(--text-black);
}

.header-logo:active {
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .header-logo:hover,
[data-theme="dark"] .header-logo:active,
[data-theme="dark"] .header-logo:focus {
  color: var(--text-white);
}

[data-theme="dark"] .header-logo {
  color: var(--text-white);
}

[data-theme="light"] .header-logo {
  color: var(--text-black);
}

[data-theme="light"] .header-logo:hover,
[data-theme="light"] .header-logo:active,
[data-theme="light"] .header-logo:focus {
  color: var(--text-black);
}

/* <picture> иначе выше img и ломает выравнивание текста / обрезает логотип */
.header-logo picture {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 0;
}

.header-logo-img {
  display: block;
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: none;
}

.header-logo-text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.header-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-black);
}

.menu-icon {
  width: 24px;
  height: 2px;
  /* Сайт по умолчанию тёмный — бургер белый */
  background: #ffffff;
  transition: all 0.3s ease;
}

[data-theme="light"] .header-burger-wrapper .menu-icon,
[data-theme="light"] .header-menu-btn .menu-icon {
  background: #000000;
}

.header-menu-btn:hover .menu-icon {
  background: var(--accent-orange);
}

[data-theme="light"] .header-menu-btn:hover .menu-icon,
[data-theme="light"] .header-menu-btn.active:hover .menu-icon {
  background: var(--accent-orange);
}

.header-menu-btn:focus {
  outline: none;
}

.header-menu-btn.active .menu-icon:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header-menu-btn.active .menu-icon:nth-child(2) {
  opacity: 0;
}

.header-menu-btn.active .menu-icon:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 27px);
  right: 50%;
  transform: translateX(50%);
  width: 240px;
  background: #2d2d2d;
  z-index: 1000;
  display: none;
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #2d2d2d;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-menu-main {
  width: 100%;
  background: #2d2d2d;
  padding: 8px 0;
  overflow-y: auto;
  max-height: 70vh;
  border-radius: 8px;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 20px;
  color: var(--text-white);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-menu-item-active {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--accent-orange);
}

.dropdown-menu-arrow {
  font-size: 10px;
  color: #858585;
  width: 12px;
  display: inline-block;
}

.dropdown-menu-item-active .dropdown-menu-arrow {
  color: var(--text-white);
}

/* Main */
.main {
  padding: 0;
  position: relative;
}

/* Hero Section Background */
.hero-section-wrapper {
  position: relative;
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #0d2137 25%,
    #0f2847 50%,
    #0a1f3a 75%,
    #061220 100%
  );
  overflow: hidden;
}

.hero-section-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      ellipse 80% 50% at 20% 40%,
      rgba(79, 195, 247, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 60%,
      rgba(108, 124, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 50% 30% at 50% 80%,
      rgba(156, 220, 254, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

[data-theme="light"] .hero-section-wrapper {
  background: linear-gradient(
    135deg,
    #e8f4fc 0%,
    #d4ebf7 25%,
    #c1e2f3 50%,
    #d4ebf7 75%,
    #e8f4fc 100%
  );
}

[data-theme="light"] .hero-section-wrapper::before {
  background: radial-gradient(
      ellipse 80% 50% at 20% 40%,
      rgba(79, 195, 247, 0.2) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 60%,
      rgba(108, 124, 255, 0.15) 0%,
      transparent 50%
    );
}

/* Grid pattern overlay */
.hero-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(
      rgba(79, 195, 247, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(79, 195, 247, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

[data-theme="light"] .hero-grid-pattern {
  background-image: linear-gradient(
      rgba(0, 100, 150, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(0, 100, 150, 0.05) 1px, transparent 1px);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

/* Hero Background Animation Container */
.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* Floating Code Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.floating-element {
  position: absolute;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-weight: 600;
  opacity: 0;
  animation: floatUp 12s linear infinite;
  pointer-events: none;
  text-shadow: 0 0 20px currentColor;
  filter: blur(0px);
}

/* Разные размеры и цвета элементов */
.floating-element--bracket {
  font-size: 48px;
  color: rgba(108, 124, 255, 0.62);
}

.floating-element--tag {
  font-size: 32px;
  color: rgba(79, 195, 247, 0.7);
}

.floating-element--symbol {
  font-size: 40px;
  color: rgba(255, 198, 41, 0.6);
}

.floating-element--code {
  font-size: 18px;
  color: rgba(156, 220, 254, 0.5);
  background: rgba(30, 30, 30, 0.4);
  padding: 8px 16px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.floating-element--icon {
  font-size: 36px;
  color: rgba(78, 201, 176, 0.6);
}

.floating-element--binary {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
}

/* Animation keyframes */
@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0.5);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg) scale(1);
    opacity: 0;
  }
}

@keyframes floatUpSlow {
  0% {
    transform: translateY(100vh) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(30px);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) rotate(360deg) translateX(-30px);
    opacity: 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes drift {
  0% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(20px) translateY(-10px);
  }
  50% {
    transform: translateX(0) translateY(-20px);
  }
  75% {
    transform: translateX(-20px) translateY(-10px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

/* Позиции элементов */
.floating-element:nth-child(1) {
  left: 5%;
  animation-delay: 0s;
  animation-duration: 15s;
}
.floating-element:nth-child(2) {
  left: 15%;
  animation-delay: 2s;
  animation-duration: 12s;
}
.floating-element:nth-child(3) {
  left: 25%;
  animation-delay: 4s;
  animation-duration: 18s;
}
.floating-element:nth-child(4) {
  left: 35%;
  animation-delay: 1s;
  animation-duration: 14s;
}
.floating-element:nth-child(5) {
  left: 45%;
  animation-delay: 3s;
  animation-duration: 16s;
}
.floating-element:nth-child(6) {
  left: 55%;
  animation-delay: 5s;
  animation-duration: 13s;
}
.floating-element:nth-child(7) {
  left: 65%;
  animation-delay: 2.5s;
  animation-duration: 17s;
}
.floating-element:nth-child(8) {
  left: 75%;
  animation-delay: 0.5s;
  animation-duration: 11s;
}
.floating-element:nth-child(9) {
  left: 85%;
  animation-delay: 4.5s;
  animation-duration: 15s;
}
.floating-element:nth-child(10) {
  left: 92%;
  animation-delay: 1.5s;
  animation-duration: 14s;
}
.floating-element:nth-child(11) {
  left: 10%;
  animation-delay: 6s;
  animation-duration: 16s;
}
.floating-element:nth-child(12) {
  left: 30%;
  animation-delay: 7s;
  animation-duration: 13s;
}
.floating-element:nth-child(13) {
  left: 50%;
  animation-delay: 8s;
  animation-duration: 15s;
}
.floating-element:nth-child(14) {
  left: 70%;
  animation-delay: 9s;
  animation-duration: 12s;
}
.floating-element:nth-child(15) {
  left: 90%;
  animation-delay: 10s;
  animation-duration: 14s;
}
.floating-element:nth-child(16) {
  left: 20%;
  animation-delay: 3.5s;
  animation-duration: 17s;
}
.floating-element:nth-child(17) {
  left: 40%;
  animation-delay: 5.5s;
  animation-duration: 11s;
}
.floating-element:nth-child(18) {
  left: 60%;
  animation-delay: 7.5s;
  animation-duration: 18s;
}
.floating-element:nth-child(19) {
  left: 80%;
  animation-delay: 2s;
  animation-duration: 13s;
}
.floating-element:nth-child(20) {
  left: 95%;
  animation-delay: 4s;
  animation-duration: 16s;
}

/* Code Rain Effect */
.code-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.code-column {
  position: absolute;
  top: -100%;
  font-family: "Consolas", monospace;
  font-size: 14px;
  color: rgba(78, 201, 176, 0.4);
  animation: codeRain 8s linear infinite;
  white-space: nowrap;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

@keyframes codeRain {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Glowing orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 20s ease-in-out infinite;
  pointer-events: none;
}

.glow-orb--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.3) 0%,
    transparent 70%
  );
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.glow-orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(108, 124, 255, 0.2) 0%,
    transparent 70%
  );
  bottom: 20%;
  right: 30%;
  animation-delay: 5s;
}

.glow-orb--3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(156, 220, 254, 0.25) 0%,
    transparent 70%
  );
  top: 40%;
  right: 50%;
  animation-delay: 10s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(20px, 30px) scale(1.05);
  }
}

/* Terminal Window Animation */
.animated-terminal {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  background: linear-gradient(135deg, #1e1e1e 0%, #252526 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  animation: terminalFloat 6s ease-in-out infinite;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes terminalFloat {
  0%,
  100% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(-51%) translateX(-5px) rotate(0.5deg);
  }
  50% {
    transform: translateY(-52%) translateX(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-51%) translateX(-5px) rotate(-0.5deg);
  }
}

.animated-terminal__header {
  background: linear-gradient(180deg, #2d2d2d 0%, #252526 100%);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
  height: 52px;
  position: relative;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.animated-terminal__file-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 30, 30, 0.6);
  padding: 8px 18px;
  height: 100%;
  border-top-left-radius: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex: 1;
  transition: background 0.2s ease;
  position: relative;
}

.animated-terminal__file-tab::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 195, 247, 0.3),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.animated-terminal__file-tab:hover::before {
  opacity: 1;
}

.animated-terminal__file-icon {
  color: #4fc3f7;
  font-size: 15px;
  filter: drop-shadow(0 0 4px rgba(79, 195, 247, 0.4));
  transition: all 0.2s ease;
}

.animated-terminal__file-tab:hover .animated-terminal__file-icon {
  color: #81d4fa;
  filter: drop-shadow(0 0 6px rgba(79, 195, 247, 0.6));
}

.animated-terminal__file-name {
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
  font-family: "Segoe UI", "Consolas", "Monaco", monospace;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.animated-terminal__dots {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.animated-terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.animated-terminal__dot--red {
  background: #ff5f56;
  box-shadow: 0 0 8px rgba(255, 95, 86, 0.3);
}

.animated-terminal__dot--yellow {
  background: #6c7cff;
  box-shadow: 0 0 8px rgba(108, 124, 255, 0.3);
}

.animated-terminal__dot--green {
  background: #27ca40;
  box-shadow: 0 0 8px rgba(39, 202, 64, 0.3);
}

.animated-terminal__dot:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.animated-terminal__title {
  flex: 1;
  text-align: center;
  color: #858585;
  font-size: 13px;
  font-family: "Consolas", monospace;
}

.animated-terminal__run-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #27ca40 0%, #2edc4a 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(39, 202, 64, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.animated-terminal__run-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.animated-terminal__run-btn:hover {
  background: linear-gradient(135deg, #2edc4a 0%, #4ade80 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(39, 202, 64, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.animated-terminal__run-btn:hover::before {
  width: 200%;
  height: 200%;
}

.animated-terminal__run-btn:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 8px rgba(39, 202, 64, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.animated-terminal__run-btn i {
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

.animated-terminal__run-btn:hover i {
  transform: scale(1.1);
}

/* Light theme for terminal header */
[data-theme="light"] .animated-terminal {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .animated-terminal__header {
  background: linear-gradient(180deg, #f5f5f5 0%, #eeeeee 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .animated-terminal__file-tab {
  background: rgba(255, 255, 255, 0.8);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .animated-terminal__file-icon {
  color: #1976d2;
  filter: drop-shadow(0 0 4px rgba(25, 118, 210, 0.3));
}

[data-theme="light"]
  .animated-terminal__file-tab:hover
  .animated-terminal__file-icon {
  color: #1565c0;
  filter: drop-shadow(0 0 6px rgba(25, 118, 210, 0.5));
}

[data-theme="light"] .animated-terminal__file-name {
  color: #212121;
}

[data-theme="light"] .animated-terminal__body {
  background: #ffffff;
}

[data-theme="light"] .terminal-line-numbers {
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  color: #999999;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .terminal-line-numbers span {
  color: #999999;
}

[data-theme="light"] .terminal-line-numbers span:hover {
  color: #1976d2;
  text-shadow: 0 0 6px rgba(25, 118, 210, 0.2);
}

[data-theme="light"] .terminal-line-numbers span::before {
  background: rgba(25, 118, 210, 0.3);
}

[data-theme="light"] .terminal-line-numbers::after {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(25, 118, 210, 0.2) 10%,
    rgba(25, 118, 210, 0.25) 50%,
    rgba(25, 118, 210, 0.2) 90%,
    transparent 100%
  );
  box-shadow: 0 0 4px rgba(25, 118, 210, 0.15);
}

[data-theme="light"] .terminal-code {
  background: #ffffff;
  color: #212121;
}

.animated-terminal__output-popup {
  position: absolute;
  top: 60px;
  right: 20px;
  transform: translateY(-10px) scale(0.9);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  white-space: nowrap;
  pointer-events: none;
}

.animated-terminal__output-popup::before {
  content: "▶ Вывод:";
  display: block;
  font-size: 10px;
  color: #888;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.animated-terminal__output-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.animated-terminal__output-text {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 15px;
  color: #4caf50;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
  animation: textGlow 1.5s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% {
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
  }
  100% {
    text-shadow: 0 0 20px rgba(76, 175, 80, 0.8),
      0 0 30px rgba(76, 175, 80, 0.4);
  }
}

[data-theme="light"] .animated-terminal__output-popup {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(46, 125, 50, 0.1);
  border: 1px solid rgba(46, 125, 50, 0.3);
}

[data-theme="light"] .animated-terminal__output-popup::before {
  color: #666;
}

[data-theme="light"] .animated-terminal__output-text {
  color: #2e7d32;
  text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

.animated-terminal__body {
  padding: 20px;
  min-height: 280px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.8;
}

.terminal-line {
  opacity: 0;
  animation: typeLine 0.5s ease forwards;
  margin-bottom: 4px;
}

.terminal-line--prompt {
  color: #4ec9b0;
}

.terminal-line--command {
  color: #9cdcfe;
}

.terminal-line--output {
  color: #d4d4d4;
}

.terminal-line--success {
  color: #4caf50;
}

.terminal-line--highlight {
  color: #8ea5ff;
}

.terminal-line:nth-child(1) {
  animation-delay: 0.5s;
}
.terminal-line:nth-child(2) {
  animation-delay: 1.2s;
}
.terminal-line:nth-child(3) {
  animation-delay: 1.9s;
}
.terminal-line:nth-child(4) {
  animation-delay: 2.6s;
}
.terminal-line:nth-child(5) {
  animation-delay: 3.3s;
}
.terminal-line:nth-child(6) {
  animation-delay: 4s;
}
.terminal-line:nth-child(7) {
  animation-delay: 4.7s;
}
.terminal-line:nth-child(8) {
  animation-delay: 5.4s;
}
.terminal-line:nth-child(9) {
  animation-delay: 6.1s;
}
.terminal-line:nth-child(10) {
  animation-delay: 6.8s;
}

@keyframes typeLine {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Cursor blink */
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #4ec9b0;
  animation: cursorBlink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes cursorBlink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Floating Code Cards */
.floating-code-card {
  position: absolute;
  background: rgba(30, 30, 30, 0.95);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: "Consolas", monospace;
  font-size: 12px;
  color: #d4d4d4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(79, 195, 247, 0.1);
  border: 1px solid rgba(79, 195, 247, 0.2);
  backdrop-filter: blur(8px);
  animation: cardFloat 8s ease-in-out infinite;
  z-index: 50;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-code-card--1 {
  top: 45%;
  right: 10px;
  transform: translateY(-50%);
  animation: cardFloat 6s linear infinite !important;
  animation-delay: 0s;
}

.floating-code-card--2 {
  top: 65%;
  right: 10px;
  transform: translateY(-50%);
  animation: cardFloatReverse 6s linear infinite !important;
  animation-delay: 0s;
}

.floating-code-card--3 {
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  animation-delay: 1s;
}

@keyframes cardFloat {
  0% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(calc(-50% - 12px)) translateX(-3px) rotate(1.5deg);
  }
  50% {
    transform: translateY(calc(-50% + 2px)) translateX(2px) rotate(0.7deg);
  }
  75% {
    transform: translateY(calc(-50% + 10px)) translateX(3px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
}

@keyframes cardFloatReverse {
  0% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(calc(-50% + 12px)) translateX(3px) rotate(-1.5deg);
  }
  50% {
    transform: translateY(calc(-50% - 2px)) translateX(-2px) rotate(-0.7deg);
  }
  75% {
    transform: translateY(calc(-50% - 10px)) translateX(-3px) rotate(1.5deg);
  }
  100% {
    transform: translateY(-50%) translateX(0) rotate(0deg);
  }
}

.code-card__keyword {
  color: #569cd6;
}
.code-card__function {
  color: #dcdcaa;
}
.code-card__string {
  color: #ce9178;
}
.code-card__variable {
  color: #9cdcfe;
}
.code-card__builtin {
  color: #4ec9b0;
}

/* Light theme adjustments for floating elements */
[data-theme="light"] .floating-element {
  opacity: 0;
}

[data-theme="light"] .floating-element--bracket {
  color: rgba(108, 124, 255, 0.7);
}

[data-theme="light"] .floating-element--tag {
  color: rgba(0, 122, 204, 0.7);
}

[data-theme="light"] .floating-element--symbol {
  color: rgba(200, 150, 0, 0.7);
}

[data-theme="light"] .floating-element--code {
  color: rgba(0, 100, 150, 0.6);
  background: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .floating-element--icon {
  color: rgba(0, 150, 100, 0.7);
}

[data-theme="light"] .floating-element--binary {
  color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .glow-orb--1 {
  background: radial-gradient(
    circle,
    rgba(79, 195, 247, 0.25) 0%,
    transparent 70%
  );
}

[data-theme="light"] .glow-orb--2 {
  background: radial-gradient(
    circle,
    rgba(108, 124, 255, 0.15) 0%,
    transparent 70%
  );
}

[data-theme="light"] .glow-orb--3 {
  background: radial-gradient(
    circle,
    rgba(0, 122, 204, 0.2) 0%,
    transparent 70%
  );
}

[data-theme="light"] .floating-code-card {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  border-color: rgba(0, 122, 204, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 20px rgba(79, 195, 247, 0.1);
}

[data-theme="light"] .animated-terminal {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Code Editor (New Design)
   ======================================== */

.code-editor {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: rgb(30, 30, 30);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  font-family: Consolas, Monaco, "Courier New", monospace;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: codeEditorFloat 6s ease-in-out infinite;
  z-index: 10;
  isolation: isolate;
}

@keyframes codeEditorFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-3px) translateX(-3px);
  }
  50% {
    transform: translateY(-6px) translateX(-6px);
  }
  75% {
    transform: translateY(-3px) translateX(-3px);
  }
}

.code-editor-header {
  background: rgb(37, 37, 38);
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 30;
  overflow: visible;
}

.code-editor-tabs {
  display: flex;
  gap: 0;
  flex: 1;
}

.code-tab {
  padding: 12px 20px;
  background: rgb(45, 45, 48);
  color: rgb(133, 133, 133);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-tab-icon {
  font-size: 14px;
}

.code-tab-active {
  background: rgb(30, 30, 30);
  color: rgb(204, 204, 204);
  border-bottom: 2px solid rgb(0, 122, 204);
}

.code-editor-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
}

.code-action-btn {
  background: transparent;
  border: none;
  color: rgb(204, 204, 204);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-action-btn i {
  font-size: 14px;
}

.code-action-btn__play-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.code-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.code-action-btn:focus {
  outline: none;
}

.code-editor-body {
  padding: 0;
  min-height: 280px;
  background: rgb(30, 30, 30);
  display: flex;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.code-line-numbers {
  background: rgb(37, 37, 38);
  padding: 16px 12px;
  color: rgb(133, 133, 133);
  font-size: 13px;
  line-height: 1.8;
  text-align: right;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-family: Consolas, Monaco, "Courier New", monospace;
  min-width: 40px;
  align-self: stretch;
  box-sizing: border-box;
}

.code-line-numbers span {
  display: block;
}

.code-content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  overflow-x: hidden;
  box-sizing: border-box;
}

.code-content {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgb(212, 212, 212);
  font-family: Consolas, Monaco, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: transparent;
}

.code-content .code-keyword {
  color: rgb(86, 156, 214);
}

.code-content .code-function {
  color: rgb(220, 220, 170);
}

.code-content .code-string {
  color: rgb(206, 145, 120);
}

.code-content .code-builtin {
  color: rgb(78, 201, 176);
}

.code-content .code-variable {
  color: rgb(156, 220, 254);
}

/* Code Result Panel */
.code-result-panel {
  position: fixed;
  top: 87px;
  right: 20px;
  width: 390px;
  max-height: 520px;
  background: #1a1a1f;
  border-radius: 14px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 30px rgba(108, 124, 255, 0.08);
  border: 1px solid rgba(108, 124, 255, 0.18);
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(100% + 16px)) scale(0.995);
  pointer-events: none;
  will-change: opacity, transform;
  transition:
    opacity 0.55s ease,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.62s !important;
  overflow: hidden;
  font-family: Consolas, Monaco, "Courier New", monospace;
}

.code-result-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  transition:
    opacity 0.5s ease,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s !important;
  z-index: 9999999;
}

@media (prefers-reduced-motion: reduce) {
  .code-result-panel,
  .code-result-panel.show {
    transition: none;
    transform: none;
  }
}

.code-result-header {
  background: #22222a;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(108, 124, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* accent top line */
.code-result-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-purple));
  border-radius: 14px 14px 0 0;
  z-index: 2;
  transform-origin: left center;
  transform: scaleX(0);
}

.code-result-panel.show::before {
  animation: codeResultCountdown var(--result-autoclose-ms, 5000ms) linear forwards !important;
}

@keyframes codeResultCountdown {
  0% {
    transform: scaleX(1);
  }
  100% {
    transform: scaleX(0);
  }
}

.code-result-title {
  color: #cccccc;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* running dot indicator */
.code-result-title::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ec94e;
  border-radius: 50%;
  flex-shrink: 0;
  animation: crPulse 1.8s ease-in-out infinite;
}

@keyframes crPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(78, 201, 78, 0.4); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 5px rgba(78, 201, 78, 0); }
}

.code-result-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  line-height: 1;
  margin-left: auto;
}

.code-result-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgb(204, 204, 204);
}

.code-result-content {
  padding: 16px;
  color: rgb(78, 201, 176);
  font-size: 14px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.code-result-content::-webkit-scrollbar {
  width: 8px;
}

.code-result-content::-webkit-scrollbar-track {
  background: rgb(37, 37, 38);
}

.code-result-content::-webkit-scrollbar-thumb {
  background: rgb(62, 62, 66);
  border-radius: 4px;
}

.code-result-content::-webkit-scrollbar-thumb:hover {
  background: rgb(78, 78, 82);
}

/* Light theme for Code Editor */
[data-theme="light"] .code-editor {
  background: rgb(255, 255, 255);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-editor-header {
  background: rgb(245, 245, 245);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-tab {
  background: rgb(230, 230, 230);
  color: rgb(100, 100, 100);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .code-tab-active {
  background: rgb(255, 255, 255);
  color: rgb(51, 51, 51);
  border-bottom: 2px solid rgb(0, 122, 204);
}

[data-theme="light"] .code-action-btn {
  color: rgb(100, 100, 100);
}

[data-theme="light"] .code-action-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgb(51, 51, 51);
}

[data-theme="light"] .code-editor-body {
  background: rgb(255, 255, 255);
}

[data-theme="light"] .code-line-numbers {
  background: rgb(245, 245, 245);
  color: rgb(150, 150, 150);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .code-content {
  color: rgb(51, 51, 51);
}

[data-theme="light"] .code-content .code-keyword {
  color: rgb(0, 0, 255);
}

[data-theme="light"] .code-content .code-function {
  color: rgb(121, 94, 38);
}

[data-theme="light"] .code-content .code-string {
  color: rgb(163, 21, 21);
}

[data-theme="light"] .code-content .code-builtin {
  color: rgb(38, 127, 153);
}

[data-theme="light"] .code-content .code-variable {
  color: rgb(0, 16, 128);
}

[data-theme="light"] .code-result-panel {
  background: rgb(255, 255, 255);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-result-header {
  background: rgb(245, 245, 245);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .code-result-title {
  color: rgb(51, 51, 51);
}

[data-theme="light"] .code-result-close {
  color: rgb(100, 100, 100);
}

[data-theme="light"] .code-result-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgb(51, 51, 51);
}

[data-theme="light"] .code-result-content {
  color: rgb(38, 127, 153);
}

[data-theme="light"] .code-result-content::-webkit-scrollbar-track {
  background: rgb(245, 245, 245);
}

[data-theme="light"] .code-result-content::-webkit-scrollbar-thumb {
  background: rgb(200, 200, 200);
}

[data-theme="light"] .code-result-content::-webkit-scrollbar-thumb:hover {
  background: rgb(170, 170, 170);
}

/* Code Editor Responsive */
@media (max-width: 968px) {
  .code-result-panel {
    top: 72px;
    right: 16px;
    left: auto;
    width: min(390px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    transform: translateX(calc(100% + 20px)) scale(0.995);
  }

  .code-result-panel.show {
    right: 16px;
    left: auto;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 768px) {
  .code-editor {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    animation: none;
  }

  .code-content {
    font-size: 12px;
  }

  .code-line-numbers {
    font-size: 12px;
    padding: 16px 8px;
    min-width: 32px;
  }
}

@media (max-width: 480px) {
  .code-action-btn {
    padding: 4px 6px;
  }

  .code-action-btn i {
    font-size: 12px;
  }

  .code-tab {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* Hero адаптация от 440px и ниже */
@media (max-width: 440px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-left {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-title-line {
    font-size: 40px;
  }

  .hero-title-line-small {
    font-size: 32px;
  }

  .hero-description {
    max-width: 100%;
    font-size: 16px;
    margin: 0 auto;
  }

  .start-learning-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    margin: 0 auto;
    width: 100%;
    max-width: 320px;
  }

  .hero-right {
    justify-content: center;
    width: 100%;
  }

  .hero-right .code-editor {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 100;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-white);
  transition: color 0.3s ease;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-title {
  color: var(--text-white);
}

[data-theme="light"] .hero-title {
  color: #0a1f3a;
  text-shadow: none;
}

.hero-title-line {
  font-size: 56px;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.hero-title-line-small {
  font-size: 48px;
}

/* Выделение слова в заголовке героя */
.hero-title .highlight-yellow {
  background-color: #6c7cff;
  color: #fff;
  padding: 1px 4px;
  border-radius: 10px;
  font-weight: 600;
}

[data-theme="light"] .hero-title .highlight-yellow {
  background-color: #6c7cff;
  color: #fff;
}

.hero-description {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  position: relative;
  transition: color 0.3s ease;
  margin-top: -8px;
}

[data-theme="dark"] .hero-description {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .hero-description {
  color: #2a4a6a;
}

/* Start Learning Button */
.start-learning-btn {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  background: var(--accent-orange);
  color: #333;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 16px var(--glow-orange);
  align-self: flex-start;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.start-learning-btn i {
  font-size: 16px;
}

.start-learning-btn:hover {
  background: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 124, 255, 0.35);
}

.start-learning-btn:active {
  transform: translateY(0);
}

.start-learning-btn:focus {
  outline: none;
}

/* Hero Right - Code Editor */
.hero-right {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Old code-result-panel styles removed - using new styles from code-editor section */

.code-editor-header {
  background: #252526;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 30;
  overflow: visible;
}

.code-editor-tabs {
  display: flex;
  gap: 0;
  flex: 1;
}

.code-tab {
  padding: 12px 20px;
  background: #2d2d30;
  color: #858585;
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-tab-icon {
  font-size: 14px;
}

.code-tab-active {
  background: #1e1e1e;
  color: #cccccc;
  border-bottom: 2px solid #007acc;
}

.code-editor-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
}

.code-action-btn {
  background: transparent;
  border: none;
  color: #cccccc;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-action-btn i {
  font-size: 14px;
}

.code-action-btn__play-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.code-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.code-action-btn:focus {
  outline: none;
}

.code-editor-body {
  padding: 0;
  min-height: 280px;
  background: #1e1e1e;
  display: flex;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.code-line-numbers {
  background: #252526;
  padding: 16px 12px;
  color: #858585;
  font-size: 13px;
  line-height: 1.8;
  text-align: right;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  min-width: 40px;
}

.code-line-numbers span {
  display: block;
}

.code-content-wrapper {
  flex: 1;
  padding: 16px 20px;
  overflow-x: hidden;
}

.code-content {
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #d4d4d4;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  white-space: pre-wrap;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: transparent;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.code-content * {
  border-bottom: none !important;
  text-decoration: none !important;
  outline: none !important;
}

.code-content-wrapper pre,
.code-content-wrapper code,
.code-content-wrapper pre code,
.code-content-wrapper pre code span {
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.code-content-wrapper pre code:last-child,
.code-content-wrapper pre code span:last-child {
  border-bottom: none !important;
}

.code-content-wrapper pre code::after,
.code-content-wrapper pre code::before,
.code-content-wrapper pre code span::after,
.code-content-wrapper pre code span::before {
  content: none !important;
  display: none !important;
  border: none !important;
  border-bottom: none !important;
}

.code-keyword {
  color: #569cd6;
  text-decoration: none !important;
  border-bottom: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Специфичные правила для последнего code-keyword, чтобы убрать красную линию */
.code-content-wrapper pre code span.code-keyword:last-child,
.code-content-wrapper pre code span.code-keyword:last-of-type,
.code-content code span.code-keyword:last-child,
.code-content code span.code-keyword:last-of-type {
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  outline: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

.code-content-wrapper pre code span.code-keyword:last-child::after,
.code-content-wrapper pre code span.code-keyword:last-child::before,
.code-content-wrapper pre code span.code-keyword:last-of-type::after,
.code-content-wrapper pre code span.code-keyword:last-of-type::before,
.code-content code span.code-keyword:last-child::after,
.code-content code span.code-keyword:last-child::before,
.code-content code span.code-keyword:last-of-type::after,
.code-content code span.code-keyword:last-of-type::before {
  content: none !important;
  display: none !important;
  border: none !important;
  border-bottom: none !important;
  background: none !important;
}

/* Универсальное правило для удаления любых визуальных артефактов после последнего элемента в code */
.code-content-wrapper pre,
.code-content-wrapper pre code,
.code-content-wrapper pre code span,
.code-content-wrapper pre code span.code-keyword {
  position: relative;
}

.code-content-wrapper pre::after,
.code-content-wrapper pre::before,
.code-content-wrapper pre code::after,
.code-content-wrapper pre code::before,
.code-content-wrapper pre code span::after,
.code-content-wrapper pre code span::before,
.code-content-wrapper pre code span.code-keyword::after,
.code-content-wrapper pre code span.code-keyword::before,
.code-content-wrapper pre code span.code-keyword:last-child::after,
.code-content-wrapper pre code span.code-keyword:last-child::before,
.code-content-wrapper pre code span.code-keyword:last-of-type::after,
.code-content-wrapper pre code span.code-keyword:last-of-type::before {
  content: "" !important;
  display: none !important;
  position: absolute !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  height: 0 !important;
  width: 0 !important;
  border: none !important;
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
  line-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.code-function {
  color: #dcdcaa;
}

.code-string {
  color: #ce9178;
}

.code-builtin {
  color: #4ec9b0;
}

.code-variable {
  color: #9cdcfe;
}

/* Courses Section */
.courses-section {
  padding: 50px 0 70px 0;
  margin-top: -30px;
  background: var(--bg-purple-light);
  transition: background-color 0.3s ease;
  position: relative;
  border-radius: 30px;
  z-index: 10;
}

[data-theme="dark"] .courses-section {
  background: #131416;
}

[data-theme="light"] .courses-section {
  background: #f5f5f5;
}

.courses-section .container {
  padding: 0 20px;
}

.courses-section-header {
  text-align: left;
  margin-bottom: 40px;
  position: relative;
  z-index: 100000;
}

.courses-section-title {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-black);
  margin-bottom: 32px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .courses-section-title {
  color: var(--text-white);
}

.courses-section-subtitle {
  font-size: 18px;
  color: #666666;
  margin: 0;
  text-align: left;
  transition: color 0.3s ease;
}

[data-theme="dark"] .courses-section-subtitle {
  color: var(--text-gray);
}

.courses-wrapper {
  width: 100%;
  position: relative;
  z-index: 100000;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.course-card {
  width: 100%;
  height: 376px;
  background: #252526;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

[data-theme="light"] .course-card {
  border: none;
}

.course-card,
.course-card:hover,
.course-card:active,
.course-card:focus {
  text-decoration: none;
}

.course-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.course-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: filter 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.course-card:not(.course-card-disabled):hover .course-card-image {
  transform: scale(1.04);
}

.course-card[data-category="frontend"] .course-card-image {
  object-fit: cover;
  object-position: center;
}

.course-card-content-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0);
  transition: background 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-card-content-center {
  background: rgba(0, 0, 0, 0.45);
}

/* Title slides up on hover */
.course-card-title-center {
  transform: translateY(8px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.course-card:hover .course-card-title-center {
  transform: translateY(0);
}

/* CTA button appears from below on hover */
.course-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 20px;
  background: rgba(108, 124, 255, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.35s ease 0.05s,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s,
    background 0.2s ease;
  margin-top: 10px;
  margin-bottom: 4px;
  pointer-events: none;
}

.course-card:hover .course-card-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.course-card-cta:hover {
  background: var(--accent-orange) !important;
}

.course-card-title-center {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
  text-decoration: none;
  border-bottom: none;
}

.course-card a .course-card-title-center,
.course-card .course-card-title-center {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Course Card Colors */
.course-card[data-category="frontend"] {
  background: #252526;
}

.course-card[data-category="1c"] {
  background: #252526;
}

.course-card[data-category="1c"] .course-card-image {
  object-fit: cover;
  object-position: center;
}

.course-card[data-category="designer"] .course-card-image {
  background: linear-gradient(135deg, #000000 0%, #dc2626 100%);
}

.course-card[data-category="3d"] .course-card-image {
  background: linear-gradient(135deg, #000000 0%, #131416 100%);
}

.course-card[data-category="marketplace"] .course-card-image {
  background: linear-gradient(135deg, #d4a574 0%, #f5deb3 100%);
}

.course-card[data-category="ai"] .course-card-image {
  background: linear-gradient(135deg, #6b21a8 0%, #9333ea 100%);
}

/* Disabled Course Card */
.course-card-disabled {
  opacity: 0.5;
  filter: grayscale(100%);
  cursor: not-allowed !important;
  pointer-events: none;
}

.course-card-disabled .course-card-image {
  filter: grayscale(100%) brightness(0.6);
}

.course-card-disabled .course-card-content-center {
  background: rgba(0, 0, 0, 0.6) !important;
}

.course-card-disabled:hover .course-card-content-center {
  background: rgba(0, 0, 0, 0.6) !important;
}

.course-card-disabled .course-card-title-center {
  color: rgba(255, 255, 255, 0.6);
}

.course-card-disabled .course-card-badge {
  background: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.6);
}

.course-card-disabled-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  z-index: 10;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 768px) {
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .course-card {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    max-width: 100%;
    overflow: hidden;
  }

  .course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    padding: 0;
    transform: none !important;
  }

  .course-card:not(.course-card-disabled):hover .course-card-image {
    transform: none !important;
  }

  .course-card-badge {
    top: 12px;
    right: 12px;
    left: auto;
    font-size: 11px;
    padding: 7px 12px;
    white-space: nowrap;
    text-align: left;
    max-width: calc(100% - 24px);
  }

  .course-card-content-center {
    padding: 16px;
  }

  .course-card-title-center {
    font-size: 20px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .course-card {
    aspect-ratio: 4 / 3;
  }

  .course-card-title-center {
    font-size: 18px;
  }
}

/* FAQ Section */
.faq-section {
  padding: 100px 0;
  background: #ffffff;
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .faq-section {
  background: #131416;
}

[data-theme="light"] .faq-section {
  background: #ffffff;
}

.faq-title {
  font-size: 48px;
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: var(--text-black);
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

[data-theme="dark"] .faq-title {
  color: var(--text-white);
}

.faq-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.faq-item {
  background: var(--text-white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .faq-item {
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

[data-theme="dark"] .faq-item:hover {
  background: #333333;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.faq-item.active {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .faq-item.active {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .faq-item.active .faq-icon {
  background: #9e9e9e;
  color: #fff;
}

[data-theme="light"] .faq-answer,
[data-theme="light"] .faq-item.active .faq-answer {
  background: transparent;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 32px 28px 32px;
  background: transparent;
  border: none;
  color: var(--text-black);
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  gap: 24px;
  position: relative;
}

[data-theme="dark"] .faq-question {
  color: rgba(255, 255, 255, 0.9);
}

.faq-question:hover {
  color: inherit;
}

.faq-question:focus {
  outline: none;
  border-radius: 16px;
}

.faq-question span:first-child {
  flex: 1;
  line-height: 1.5;
  padding-right: 20px;
}

.faq-icon {
  font-size: 28px;
  font-weight: 300;
  color: #333333;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-orange);
  border-radius: 50%;
  line-height: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--accent-orange);
  color: #333;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition:
    grid-template-rows 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 32px;
  background: transparent;
}

.faq-answer > * {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.4s ease 0.1s,
    transform 0.4s ease 0.1s;
}

.faq-item.active .faq-answer {
  grid-template-rows: 1fr;
  padding: 0 32px 28px 32px;
}

.faq-item.active .faq-answer > * {
  opacity: 1;
  transform: translateY(0);
}

.faq-answer p {
  color: #555555;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  padding-top: 8px;
}

[data-theme="dark"] .faq-answer p {
  color: rgba(255, 255, 255, 0.7);
}

.faq-youtube {
  background-color: #ff0000;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.faq-youtube:hover {
  background-color: #cc0000;
}

.faq-rutube {
  background-color: #4fc3f7;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.faq-rutube:hover {
  background-color: #29b6f6;
}

[data-theme="light"] .faq-youtube {
  background-color: #ff0000;
  color: #ffffff;
}

[data-theme="light"] .faq-youtube:hover {
  background-color: #cc0000;
}

[data-theme="light"] .faq-rutube {
  background-color: #4fc3f7;
  color: #ffffff;
}

[data-theme="light"] .faq-rutube:hover {
  background-color: #29b6f6;
}

/* Learning Process Section */
.learning-process-section {
  padding: 100px 0;
  background: #2d2d2d;
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 2;
}

[data-theme="dark"] .learning-process-section {
  background: #131416;
}

[data-theme="light"] .learning-process-section {
  background: #f5f5f5;
}

.learning-process-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-white);
  text-align: left;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

[data-theme="dark"] .learning-process-title {
  color: var(--text-white);
}

[data-theme="light"] .learning-process-title {
  color: var(--text-black);
}

.learning-process-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}

.learning-process-content:last-child {
  margin-bottom: 0;
}

.learning-process-content-reverse {
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

.learning-process-content-reverse .learning-process-left {
  order: 2;
}

.learning-process-content-reverse .learning-process-right {
  order: 1;
}

@media (max-width: 968px) {
  .learning-process-content-reverse {
    grid-template-columns: 1fr;
  }

  .learning-process-content-reverse .learning-process-left {
    order: 1;
  }

  .learning-process-content-reverse .learning-process-right {
    order: 2;
  }
}

.learning-process-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.learning-process-item {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  background: var(--text-white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 36px 32px 28px 32px;
}

[data-theme="dark"] .learning-process-item {
  background: transparent;
  box-shadow: none;
}

[data-theme="light"] .learning-process-item {
  background: transparent;
  box-shadow: none;
}

.learning-process-number {
  font-size: 72px;
  font-weight: 700;
  color: var(--accent-orange);
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.3s ease;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 124, 255, 0.12);
  border-radius: 50%;
  font-size: 28px;
}

.learning-process-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.learning-process-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-black);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.5;
  transition: color 0.3s ease;
  text-align: left;
}

[data-theme="dark"] .learning-process-heading {
  color: var(--text-white);
}

.learning-process-description {
  font-size: 17px;
  line-height: 1.7;
  color: #555555;
  margin: 0;
  transition: color 0.3s ease;
  text-align: left;
}

[data-theme="dark"] .learning-process-description {
  color: var(--text-gray);
}

[data-theme="light"] .learning-process-description {
  color: #555555;
}

.learning-process-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.learning-process-visual {
  width: 100%;
  max-width: 600px;
}

.learning-process-visual-code .code-editor {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.learning-process-visual--video {
  max-width: 720px;
}

@media (min-width: 1100px) {
  .learning-process-visual--video {
    max-width: 800px;
  }
}

.learning-process-video-frame {
  --lp-video-aspect: 1920 / 988;
  width: 100%;
  aspect-ratio: var(--lp-video-aspect);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  background: #000;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}

.learning-process-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000;
  object-fit: cover;
  object-position: center;
}

.learning-process-video-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.learning-process-video-fallback[hidden] {
  display: none !important;
}

.learning-process-video-frame.is-fallback-active .learning-process-video-local {
  display: none;
}

.learning-process-video-frame.is-fallback-active .learning-process-video-fallback {
  display: block !important;
}

.video-loading-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #ffffff;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.video-loading-spinner svg {
  width: 48px;
  height: 48px;
  animation: spinner-rotate 1s linear infinite;
}

@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.video-loading-spinner.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

.learning-process-visual-task {
  background: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(128, 128, 128, 0.2);
}

[data-theme="light"] .learning-process-visual-task {
  border: none;
}

.task-interface {
  background: #1e1e1e;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.task-interface-header {
  background: #252526;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.task-interface-tabs {
  display: flex;
  gap: 0;
}

.task-tab {
  padding: 12px 20px;
  background: #2d2d30;
  color: #858585;
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
}

.task-tab-active {
  background: #1e1e1e;
  color: #cccccc;
  border-bottom: 2px solid #007acc;
}

.task-interface-body {
  padding: 0;
  background: #1e1e1e;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.task-interface-body:has(.job-vacancies) {
  height: 400px;
}

.task-attempts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.task-attempt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #252526;
  border-radius: 6px;
  font-size: 13px;
  color: #cccccc;
}

.task-attempt-id {
  font-weight: 600;
  color: #858585;
  min-width: 60px;
}

.task-attempt-status {
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.task-status-success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.task-status-error {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.task-attempt-date {
  color: #858585;
  font-size: 12px;
  margin-left: auto;
}

.task-attempt-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f44336;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-attempt-btn i {
  font-size: 11px;
}

.task-attempt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #f44336;
}

.task-score {
  color: #858585;
  font-size: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Feedback Chat: фиксированная высота блока, переполнение - скролл в зоне сообщений */
.feedback-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  overflow: hidden;
  padding: 18px 14px 14px;
  flex: 0 0 auto;
}

.feedback-chat-messages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.feedback-chat .feedback-message-text {
  font-size: 13px;
  line-height: 1.38;
  padding: 8px 12px;
}

/* Индикатор «печатает»: три маленькие точки у нижней кромки пузыря (анимация ниже, после глобального * { animation: none }) */
.feedback-message-text--typing {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 32px;
  min-width: 44px;
  padding: 10px 12px 5px 12px;
  background: linear-gradient(145deg, #2a2d35 0%, #252526 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feedback-typing {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: auto;
  padding-bottom: 1px;
}

.feedback-typing__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(165, 178, 202, 0.9);
  flex-shrink: 0;
}

@keyframes feedback-typing-bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.28;
  }

  50% {
    transform: translateY(2px);
    opacity: 1;
  }
}

.feedback-chat .feedback-message-time {
  font-size: 11px;
}

.feedback-chat .feedback-input-wrapper {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 10px;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-chat .feedback-input {
  padding: 8px 12px;
  font-size: 13px;
}

.feedback-chat .feedback-send-btn {
  padding: 8px 18px;
  font-size: 13px;
}

.feedback-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
}

.feedback-message-user {
  flex-direction: row;
  align-self: flex-start;
  max-width: 94%;
}

.feedback-message-support {
  flex-direction: row-reverse;
  align-self: flex-end;
  max-width: 94%;
}

.feedback-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #007acc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}


.feedback-message-user .feedback-message-avatar {
  background: #2d333b;
}

.feedback-message-avatar > i {
  line-height: 1;
}

.feedback-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.feedback-avatar-img--logo {
  object-fit: contain;
  padding: 3px;
  box-sizing: border-box;
}

.feedback-message-avatar-support {
  background: #36393f;
}

.feedback-message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-message-user .feedback-message-content {
  align-items: flex-start;
}

.feedback-message-support .feedback-message-content {
  align-items: flex-end;
}

.feedback-message-text {
  background: #252526;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #cccccc;
  max-width: 80%;
  line-height: 1.4;
  font-family: "Roboto", sans-serif;
}

.feedback-message-text a {
  color: #4caf50;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.feedback-message-text a:hover {
  color: #66bb6a;
}

.feedback-message-time {
  font-size: 11px;
  color: #858585;
  padding: 0 4px;
}

.feedback-input-wrapper {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.feedback-input {
  flex: 1;
  background: #252526;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: #cccccc;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.feedback-input:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.feedback-input:focus {
  border-color: #007acc;
  outline: none;
  box-shadow: none;
}

.feedback-input:active {
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
  box-shadow: none;
}

.feedback-input:invalid {
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
  box-shadow: none;
}

.feedback-input::placeholder {
  color: #858585;
}

.feedback-send-btn {
  background: #007acc;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  min-height: 37px;
}

.feedback-send-btn i {
  font-size: 12px;
}

.feedback-send-btn:hover {
  background: #005a9e;
}

.feedback-send-btn:focus {
  outline: 2px solid #007acc;
  outline-offset: 2px;
}

/* Job Applications Styles */
.job-applications {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 260px;
  overflow-y: auto;
}

.job-application {
  background: #252526;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.job-application-pending {
  border-left-color: #8ea5ff;
}

.job-application-interview {
  border-left-color: #42a5f5;
}

.job-application-success {
  border-left-color: #4caf50;
}

.job-application-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.job-application-title {
  font-size: 14px;
  font-weight: 600;
  color: #cccccc;
  flex: 1;
}

.job-application-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.job-status-pending {
  background: rgba(142, 165, 255, 0.2);
  color: #8ea5ff;
}

.job-status-interview {
  background: rgba(66, 165, 245, 0.2);
  color: #42a5f5;
}

.job-status-success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.job-application-company {
  font-size: 12px;
  color: #858585;
}

.job-application-date {
  font-size: 11px;
  color: #858585;
}

.job-application-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #007acc;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
}

.job-application-btn:hover {
  background: rgba(0, 122, 204, 0.1);
  border-color: #007acc;
}

.job-application-btn:focus {
  outline: 2px solid #007acc;
  outline-offset: 2px;
}

.job-application-btn i {
  font-size: 11px;
}

/* Job Chat Styles */
.job-chat {
  display: flex;
  flex-direction: column;
  height: 260px;
  overflow: hidden;
  background: #1e1e1e;
}

.job-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #252526;
}

.job-chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.job-chat-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-chat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job-chat-name {
  font-size: 14px;
  font-weight: 600;
  color: #cccccc;
}

.job-chat-salary {
  font-size: 16px;
  font-weight: 700;
  color: #4caf50;
}

.job-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  flex: 1;
  overflow-y: auto;
}

.job-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.job-message-hr {
  flex-direction: row;
}

.job-message-user {
  flex-direction: row-reverse;
}

.job-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.job-message-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job-message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 70%;
}

.job-message-hr .job-message-content {
  align-items: flex-start;
}

.job-message-user .job-message-content {
  align-items: flex-end;
}

.job-message-text {
  background: #252526;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #cccccc;
  line-height: 1.4;
}

.job-message-text-user {
  background: #4caf50;
  color: #ffffff;
}

.job-message-time {
  font-size: 11px;
  color: #858585;
  padding: 0 4px;
}

.job-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.job-chat-messages::-webkit-scrollbar-track {
  background: #252526;
  border-radius: 3px;
}

.job-chat-messages::-webkit-scrollbar-thumb {
  background: #858585;
  border-radius: 3px;
}

.job-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #cccccc;
}

/* Custom scrollbar: зона сообщений чата и заявки */
.feedback-chat-messages::-webkit-scrollbar,
.job-applications::-webkit-scrollbar {
  width: 6px;
}

.feedback-chat-messages::-webkit-scrollbar-track,
.job-applications::-webkit-scrollbar-track {
  background: #252526;
  border-radius: 3px;
}

.feedback-chat-messages::-webkit-scrollbar-thumb,
.job-applications::-webkit-scrollbar-thumb {
  background: #858585;
  border-radius: 3px;
}

.feedback-chat-messages::-webkit-scrollbar-thumb:hover,
.job-applications::-webkit-scrollbar-thumb:hover {
  background: #cccccc;
}

/* Job Vacancies Styles */
.job-vacancies {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  background: #1e1e1e;
  border-radius: 8px;
  width: 100%;
  height: 100%;
  margin: 0;
  min-height: 0;
}

.job-vacancies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  background: #252526;
}

.job-vacancies-title {
  font-size: 16px;
  font-weight: 600;
  color: #cccccc;
  font-family: "Roboto", sans-serif;
}

.job-vacancies-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #cccccc;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: "Roboto", sans-serif;
}

.job-vacancies-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.job-vacancy-card {
  background: #252526;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
  transition: background 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.job-vacancy-card:last-child {
  border-bottom: none;
}

.job-vacancy-card:hover {
  background: #2a2a2a;
  text-decoration: none;
  color: inherit;
}

.job-vacancy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 16px;
}

.job-vacancy-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.job-vacancy-position {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 4px;
  font-family: "Roboto", sans-serif;
}

.job-vacancy-company-name {
  font-size: 13px;
  color: #858585;
  line-height: 1.4;
  font-family: "Roboto", sans-serif;
}

.job-vacancy-salary {
  font-size: 16px;
  font-weight: 600;
  color: #cccccc;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: "Roboto", sans-serif;
}

.job-vacancy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.job-vacancy-tag {
  background: transparent;
  color: #858585;
  font-size: 12px;
  font-weight: 400;
  padding: 0;
  border: none;
  line-height: 1.4;
  font-family: "Roboto", sans-serif;
}

.job-vacancy-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.job-vacancy-time {
  font-size: 12px;
  color: #858585;
  font-family: "Roboto", sans-serif;
}

.job-vacancies-list::-webkit-scrollbar {
  width: 6px;
}

.job-vacancies-list::-webkit-scrollbar-track {
  background: #252526;
  border-radius: 3px;
}

.job-vacancies-list::-webkit-scrollbar-thumb {
  background: #858585;
  border-radius: 3px;
}

.job-vacancies-list::-webkit-scrollbar-thumb:hover {
  background: #cccccc;
}

[data-theme="light"] .job-vacancies {
  background: #f5f5f5;
}

[data-theme="light"] .job-vacancies-header {
  background: #f5f5f5;
  border-bottom-color: #e0e0e0;
}

[data-theme="light"] .job-vacancies-title {
  color: #333333;
}

[data-theme="light"] .job-vacancies-badge {
  background: #e0e0e0;
  color: #666666;
}

[data-theme="light"] .job-vacancy-card {
  background: #f5f5f5;
  border-bottom-color: #e0e0e0;
}

[data-theme="light"] .job-vacancy-card:hover {
  background: #f9f9f9;
}

[data-theme="light"] .job-vacancy-position {
  color: #333333;
}

[data-theme="light"] .job-vacancy-company-name {
  color: #666666;
}

[data-theme="light"] .job-vacancy-salary {
  color: #333333;
}

[data-theme="light"] .job-vacancy-tag {
  color: #666666;
}

[data-theme="light"] .job-vacancy-time {
  color: #999999;
}

[data-theme="light"] .job-vacancies-list::-webkit-scrollbar-track {
  background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .animated-terminal {
    width: 450px;
    right: 2%;
  }
}

@media (max-width: 968px) {
  body {
    margin: 0;
  }

  .hero-right .code-editor {
    animation: none;
    transform: none;
  }

  .animated-terminal {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    animation: none;
  }

  .floating-code-card {
    display: none;
  }

  .glow-orb {
    opacity: 0.5;
  }

  .floating-element {
    font-size: 80%;
  }

  .faq-title {
    font-size: 36px;
    margin-bottom: 40px;
  }

  .faq-list {
    max-width: 100%;
    gap: 16px;
  }

  .faq-question {
    padding: 32px 20px 24px 20px;
    font-size: 18px;
  }

  .faq-item.active .faq-answer {
    padding: 0 20px 24px 20px;
    max-height: 500px;
  }

  .faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
  }

  .faq-answer p {
    font-size: 16px;
  }

  .mobile-frame {
    max-width: 240px;
    max-height: 400px;
  }

  /* Hero Section - Center alignment */
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-left {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
    margin: 0 auto;
  }

  .start-learning-btn {
    align-self: center;
    width: auto;
    margin: 0 auto;
  }

  .hero-right {
    align-items: center;
    justify-content: center;
    display: flex;
  }

  .hero-right .code-editor {
    max-width: 90%;
    width: 100%;
  }

  .code-editor-body {
    flex-direction: row;
    padding: 0;
  }

  .code-line-numbers {
    order: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-left: none;
    text-align: right;
  }

  .code-content-wrapper {
    order: 2;
    text-align: left;
    width: 100%;
    display: block;
  }

  .code-content-wrapper pre {
    text-align: left;
    margin: 0;
    padding: 0;
    width: 100%;
    display: block;
  }

  .code-content {
    text-align: left !important;
    display: block;
    width: 100%;
  }

  .hero-title-line {
    font-size: 56px;
  }

  .hero-title-line-small {
    font-size: 48px;
  }

  /* Learning Process Title - Center alignment */
  .learning-process-title {
    text-align: center;
  }

  /* Learning Process Content - порядок: left сверху, right снизу для всех блоков */
  .learning-process-content {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
  }

  .learning-process-content-reverse {
    grid-template-columns: 1fr;
  }

  /* Для всех блоков порядок: текст сверху, видео снизу */
  .learning-process-content .learning-process-left {
    order: 1;
  }

  .learning-process-content .learning-process-right {
    order: 2;
  }

  .learning-process-content-reverse .learning-process-left {
    order: 1;
  }

  .learning-process-content-reverse .learning-process-right {
    order: 2;
  }

  /* Burger Menu для 968px */
  .header-nav {
    display: none;
  }

  /* Mobile Menu - показываем на 968px */
  .mobile-menu-overlay {
    display: block !important;
  }

  .mobile-menu {
    display: flex !important;
  }

  .header-menu-wrapper {
    justify-content: flex-end;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .header-inner {
    justify-content: space-between;
    position: relative;
  }

  /* Порядок элементов: кнопка поддержать проект, переключатель темы, небольшой отступ, бургер */
  .header-menu-wrapper .header-donate-btn {
    display: flex;
    order: 1;
  }

  .header-menu-wrapper .theme-toggle-btn {
    display: flex;
    order: 2;
  }

  /* Скрываем переключатель языка на 968px */
  .header-menu-wrapper .header-language-switch {
    display: none !important;
  }

  /* Mobile Menu Overlay - фон как на мобильных (серый, а не чисто чёрный) */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Menu - серое меню на всю ширину и высоту (как до 770px) */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(45, 45, 45, 0.95);
    z-index: 100002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  [data-theme="light"] .mobile-menu {
    background: rgba(245, 245, 245, 0.95);
  }

  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
  }

  /* Скрываем третью ссылку "Поддержать проект" на 968px */
  .mobile-menu-nav a[href="donate.html"],
  .mobile-menu-nav a[href*="donate.html"] {
    display: none;
  }

  .mobile-menu-nav a {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    padding: 16px 32px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    width: 100%;
    text-align: center;
  }

  [data-theme="light"] .mobile-menu-nav a {
    color: #ffffff;
  }

  .mobile-menu-nav a:hover {
    color: var(--accent-orange);
    background: transparent;
    transform: none;
  }

  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
  }

  [data-theme="light"] .mobile-menu-close {
    color: #ffffff;
  }

  .mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-orange);
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  body {
    margin: 0;
  }

  .sidebar {
    display: none;
  }

  /* Hero Section - Center alignment */
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-left {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
    margin: 0 auto;
  }

  .start-learning-btn {
    align-self: center;
    width: auto;
    margin: 0 auto;
  }

  /* Courses Section Header - Center alignment */
  .courses-section-header {
    text-align: center;
  }

  .courses-section-subtitle {
    text-align: center;
  }

  /* Footer Left - Center alignment */
  .footer-left {
    text-align: center;
    align-items: center;
    margin: 0 auto;
    max-width: 100%;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-language-controls {
    justify-content: center;
  }

  .footer-right {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero-title-line {
    font-size: 42px;
  }

  .hero-title-line-small {
    font-size: 36px;
  }

  .faq-section {
    padding: 60px 0;
  }

  .faq-title {
    font-size: 32px;
    margin-bottom: 30px;
  }

  .faq-list {
    gap: 12px;
  }

  .faq-question {
    padding: 28px 16px 20px 16px;
    font-size: 16px;
    gap: 16px;
  }

  .faq-icon {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .faq-item.active .faq-answer {
    padding: 0 16px 20px 16px;
    max-height: 500px;
  }

  .faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
  }

  .faq-answer p {
    font-size: 15px;
  }

  .subscribe-section {
    padding: 40px 0;
  }

  .subscribe-box {
    padding: 24px 20px;
    margin-bottom: 20px;
  }

  .subscribe-title {
    font-size: 24px;
    width: 100%;
  }

  .subscribe-buttons {
    width: 100%;
  }

  .subscribe-btn {
    padding: 18px 20px;
    min-height: 56px;
    font-size: 15px;
    width: 100%;
    max-width: 300px;
  }

  .subscribe-return-btn {
    padding: 16px 28px;
    font-size: 15px;
  }

  .learning-process-section {
    padding: 40px 0;
  }

  .learning-process-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .learning-process-content {
    gap: 30px;
    margin-bottom: 50px;
  }

  .learning-process-left {
    gap: 30px;
  }

  .learning-process-number {
    font-size: 24px;
    width: 48px;
    height: 48px;
  }

  .learning-process-heading {
    font-size: 18px;
  }

  .learning-process-description {
    font-size: 14px;
  }

  .mobile-frame {
    max-width: 200px;
    max-height: 350px;
  }
}

@media (max-width: 890px) {
  .subscribe-section {
    padding: 50px 0;
  }

  .subscribe-box {
    padding: 30px 24px;
    margin-bottom: 24px;
  }

  .subscribe-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    align-items: center;
  }

  .subscribe-title {
    font-size: 28px;
    text-align: center;
    width: 100%;
  }

  .subscribe-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
  }

  .subscribe-btn {
    justify-content: center;
    padding: 18px 24px;
    width: 100%;
    max-width: 300px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .learning-process-section {
    padding: 50px 0;
  }

  .learning-process-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
  }

  .learning-process-content {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
  }

  .learning-process-content-reverse {
    grid-template-columns: 1fr;
  }

  /* На мобильной версии для всех блоков порядок: текст, потом видео */
  .learning-process-content-reverse .learning-process-left {
    order: 1;
  }

  .learning-process-content-reverse .learning-process-right {
    order: 2;
  }

  .learning-process-left {
    gap: 40px;
    order: 1;
  }

  .learning-process-right {
    order: 2;
  }

  .learning-process-item {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    padding: 28px 24px 24px;
  }

  .learning-process-number {
    font-size: 24px;
    width: 48px;
    height: 48px;
  }

  .learning-process-heading {
    font-size: 20px;
    text-align: center;
  }

  .learning-process-description {
    font-size: 15px;
    text-align: center;
  }

  .learning-process-visual {
    max-width: 100%;
  }

  .learning-process-visual-code .code-editor {
    max-width: 100%;
  }

  .learning-process-visual-task {
    max-width: 100%;
  }

  .job-vacancies {
    width: 100%;
    margin: 0;
  }

  .subscribe-section {
    padding: 50px 0;
  }

  .subscribe-box {
    padding: 30px 24px;
    margin-bottom: 24px;
  }

  .subscribe-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
    align-items: center;
  }

  .subscribe-title {
    font-size: 28px;
    text-align: center;
    width: 100%;
  }

  .subscribe-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
  }

  .subscribe-btn {
    justify-content: center;
    padding: 30px 24px;
    width: 100%;
    max-width: 300px;
  }

  .subscribe-return-btn {
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    font-size: 16px;
  }

  .hero-description {
    font-size: 16px;
  }

  .cta-btn {
    font-size: 16px;
    padding: 14px 28px;
  }

  .start-learning-btn {
    max-width: 300px;
  }

  .code-editor-body {
    padding: 0;
  }

  .code-content {
    font-size: 12px;
  }

  .dropdown-menu {
    width: 100%;
    right: 0;
    left: 0;
    margin-top: 10px;
  }

  .dropdown-menu-main {
    width: 100%;
  }

  .course-card {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    max-width: 100%;
    overflow: hidden;
  }

  .course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    padding: 0;
    transform: none !important;
  }

  .course-card:not(.course-card-disabled):hover .course-card-image {
    transform: none !important;
  }

  .course-card[data-category="frontend"] .course-card-image,
  .course-card[data-category="1c"] .course-card-image {
    object-fit: cover;
    object-position: center center;
    padding: 0;
  }

  .courses-wrapper {
    width: 100%;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .courses-section-title {
    font-size: 32px;
  }

  .courses-section-subtitle {
    font-size: 16px;
  }

  .courses-title {
    font-size: 32px;
  }

  .courses-subtitle {
    font-size: 16px;
  }

  .filter-btn {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* Subscribe Section */
.subscribe-section {
  padding: 100px 0;
  background: var(--bg-purple-light);
  transition: background-color 0.3s ease;
  position: relative;
  z-index: 3;
}

[data-theme="dark"] .subscribe-section {
  background: #131416;
}

[data-theme="light"] .subscribe-section {
  background: #f5f5f5;
}

.subscribe-box {
  background: linear-gradient(135deg, #f8d7e8 0%, #e8d5f2 100%);
  border-radius: 20px;
  padding: 40px 60px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .subscribe-box {
  background: linear-gradient(135deg, #2d1a3a 0%, #3d2a4a 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .subscribe-box {
  background: linear-gradient(135deg, #f8d7e8 0%, #e8d5f2 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.subscribe-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.subscribe-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-black);
  margin: 0;
  transition: color 0.3s ease;
}

[data-theme="dark"] .subscribe-title {
  color: var(--text-white);
}

.subscribe-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 24px;
  min-height: 50px;
  background: var(--text-white);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-black);
  transition: all 0.3s ease;
  font-family: inherit;
  cursor: pointer;
}

.subscribe-btn:hover {
  background: var(--text-white);
  color: var(--text-black);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subscribe-btn:focus {
  outline: none;
}

.subscribe-btn i {
  font-size: 20px;
  flex-shrink: 0;
}

.subscribe-return {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 85px;
}

.subscribe-return-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 40px;
  background: #8ea5ff;
  color: var(--text-black);
  border: none;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 198, 41, 0.3);
  position: relative;
  z-index: 100000;
}

.subscribe-return-btn i {
  font-size: 18px;
}

.subscribe-return-btn:hover {
  background: #ffb74d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 198, 41, 0.4);
}

.subscribe-return-btn:focus {
  outline: none;
}

.subscribe-return-btn:active {
  transform: translateY(0);
}

/* Channel Modal Styles */
.channel-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.channel-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.channel-modal {
  background: var(--bg-dark);
  border-radius: 20px;
  padding: 40px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.5s ease;
  opacity: 0;
}

.channel-modal-overlay.show .channel-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.channel-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 10;
}

.channel-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
}

.channel-modal-close:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.channel-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 30px;
  text-align: center;
  font-family: "Roboto Condensed", sans-serif;
}

.channel-modal-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.channel-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.channel-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-orange);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108, 124, 255, 0.2);
}

.channel-option:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.channel-option-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.channel-option-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
  text-align: center;
}

.channel-option-url {
  font-size: 14px;
  color: var(--text-gray);
  text-align: center;
  word-break: break-all;
}

[data-theme="light"] .channel-modal {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .channel-modal-title {
  color: var(--text-black);
}

[data-theme="light"] .channel-modal-close {
  color: var(--text-black);
}

[data-theme="light"] .channel-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-black);
}

[data-theme="light"] .channel-option {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .channel-option:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent-orange);
}

[data-theme="light"] .channel-option-title {
  color: var(--text-black);
}

[data-theme="light"] .channel-option-url {
  color: #666666;
}

/* Footer Link Button Styles */
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-link-btn:hover {
  color: var(--accent-orange);
  text-decoration: none;
}

.footer-link-btn:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

[data-theme="light"] .footer-link-btn:hover {
  color: var(--accent-orange);
}

/* Responsive for Channel Modal */
@media (max-width: 768px) {
  .channel-modal {
    padding: 30px 20px;
    max-width: 95%;
  }

  .channel-modal-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .channel-option {
    padding: 25px 20px;
  }

  .channel-option-image {
    width: 100px;
    height: 100px;
  }

  .channel-option-title {
    font-size: 18px;
  }

  .channel-option-url {
    font-size: 12px;
  }
}

/* Footer */
.footer {
  background: #1f2229;
  padding: 60px 0 40px;
  color: #999999;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

/* subtle gray top border */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(128, 133, 143, 0.22);
}

.footer .container {
  max-width: 1776px;
}

[data-theme="dark"] .footer {
  background: #1f2229;
  color: #888888;
}

[data-theme="light"] .footer {
  background: #1f2229;
  color: #999999;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 75px;
}

.footer-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 45%;
  position: relative;
  z-index: 100000;
}

.footer-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 40px;
  margin-left: auto;
  margin-right: 0;
  position: relative;
  z-index: 100000;
}

/* См. style.css: без правой колонки - убираем искусственный зазор (max-width: 45% у .footer-left). */
.footer-right.footer-right--off {
  display: none !important;
}

.footer-section.footer-section--off {
  display: none !important;
}

.footer-content:not(:has(> .footer-right)) .footer-left,
.footer-content:has(> .footer-right[hidden]) .footer-left,
.footer-content:has(> .footer-right.footer-right--off) .footer-left,
.footer-content.footer-content--without-right .footer-left {
  max-width: none;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.footer-logo:hover,
.footer-logo:active,
.footer-logo:focus {
  opacity: 1;
}

.footer-logo:active {
  -webkit-tap-highlight-color: transparent;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: none;
}

.footer-description {
  font-size: 14px;
  line-height: 1.7;
  color: #999999;
  margin: 0;
}

[data-theme="light"] .footer-description {
  color: #666666;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .footer-heading {
  color: var(--text-black);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: #999999;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-white);
}

[data-theme="light"] .footer-link {
  color: #666666;
}

[data-theme="light"] .footer-link:hover {
  color: var(--text-black);
}

.footer-language-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Обводка как верхняя линия футера (::before): тот же цвет и толщина 1px */
.footer-language-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(128, 133, 143, 0.22);
  border-radius: 6px;
  padding: 2px 6px;
  box-sizing: border-box;
}

.footer-language-switch .header-language-switch__current {
  min-width: 74px;
  height: 38px;
}

.footer-language-switch .header-language-switch__label {
  color: #e7ebff;
}

[data-theme="light"] .footer-language-switch .header-language-switch__label {
  color: #2a315a;
}

.header-language-switch--dropup .header-language-switch__dropdown {
  top: auto;
  bottom: calc(100% + 8px);
  transform-origin: bottom right;
  transform: translateY(8px) scale(0.98);
}

.header-language-switch--dropup.is-open > .header-language-switch__dropdown {
  transform: translateY(0) scale(1);
}

.footer-language-switch .header-language-switch__dropdown {
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.language-select {
  background: #252526;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  max-width: 200px;
}

.language-select:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.language-select:focus {
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

[data-theme="light"] .language-select {
  background: #f5f5f5;
  color: var(--text-black);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.footer-theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #8ea5ff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.footer-theme-toggle i {
  font-size: 18px;
  color: #8ea5ff;
  transition: none;
}

.footer-theme-toggle:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

[data-theme="light"] .footer-theme-toggle {
  background: transparent;
  border: 2px solid #8ea5ff;
}

[data-theme="light"] .footer-theme-toggle i {
  color: #8ea5ff;
}

/* Header Navigation Responsive */
@media (max-width: 1024px) {
  .header-nav {
    gap: 16px;
  }

  .header-nav-link {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* Главная: переключатель языка не прячем на ≤968px (в общем лендинге он скрыт, на index остаётся справа) */
@media (max-width: 968px) {
  body.index-page .header-menu-wrapper .header-language-switch {
    display: flex !important;
    align-items: center;
  }
}

/* Главная (index.html): переключатель светлой/тёмной темы скрыт */
body.index-page .header-menu-wrapper .theme-toggle-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mobile Menu - скрыто по умолчанию на больших экранах */
.mobile-menu-overlay,
.mobile-menu {
  display: none;
}

@media (max-width: 1440px) {
  /* Burger Menu для 1440px */
  .header-nav {
    display: none;
  }

  /* Разрешаем мобильное меню (оверлей и панель) */
  .mobile-menu-overlay {
    display: block !important;
  }

  .mobile-menu {
    display: flex !important;
  }

  .header-menu-wrapper {
    justify-content: flex-end;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .header-inner {
    justify-content: space-between;
    position: relative;
  }

  /* Делаем бургер видимым во всём диапазоне до 1440px */
  .header-menu-wrapper .header-burger-wrapper,
  .header-menu-wrapper .header-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Порядок элементов и цвет бургера: донат, тема, бургер справа, бургер белый */
  .header-menu-wrapper .header-donate-btn {
    order: 1;
  }

  .header-menu-wrapper .theme-toggle-btn {
    order: 2;
  }

  .header-menu-wrapper .header-burger-wrapper {
    order: 3;
  }

  [data-theme="dark"] .header-menu-wrapper .menu-icon {
    background: #ffffff;
  }

  [data-theme="light"] .header-menu-wrapper .menu-icon {
    background: #000000;
  }

  /* Полные стили мобильного меню для всех ширин до 1440px,
     чтобы бургер открывался одинаково и на 1140px, и на 1024px */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 100002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  [data-theme="light"] .mobile-menu {
    background: #000000;
  }

  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header-menu-wrapper .header-burger-wrapper {
    position: relative;
    z-index: 1001;
    cursor: pointer;
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
  }

  /* Небольшой отступ перед NEW в бургер-меню */
  .mobile-menu-nav .header-nav-badge {
    margin-left: 6px;
  }

  .mobile-menu-nav a {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    padding: 16px 32px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    width: 100%;
    text-align: center;
  }

  /* Кнопка "Поддержать проект" в бургере - жёлтый фон и обводка как в хедере */
  .mobile-menu-nav a[href="donate.html"],
  .mobile-menu-nav a[href*="donate.html"],
  .mobile-menu-nav .header-donate-btn {
    padding: 14px 20px !important;
    background: var(--accent-orange) !important;
    color: #333 !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--accent-orange);
    width: auto !important;
  }

  .mobile-menu-nav a[href="donate.html"]:hover,
  .mobile-menu-nav a[href*="donate.html"]:hover,
  .mobile-menu-nav .header-donate-btn:hover {
    background: var(--accent-orange-hover) !important;
    border-color: var(--accent-orange-hover);
    color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
  }

  .mobile-menu-nav a[href="donate.html"]:active,
  .mobile-menu-nav a[href*="donate.html"]:active,
  .mobile-menu-nav .header-donate-btn:active {
    transform: translateY(0);
  }

  [data-theme="light"] .mobile-menu-nav a {
    color: #ffffff;
  }

  [data-theme="light"] .mobile-menu-nav a[href="donate.html"],
  [data-theme="light"] .mobile-menu-nav a[href*="donate.html"],
  [data-theme="light"] .mobile-menu-nav .header-donate-btn {
    color: #333 !important;
  }

  .mobile-menu-nav a:hover {
    color: var(--accent-orange);
    background: transparent;
    transform: none;
  }

  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
  }

  .mobile-menu-close:hover {
    color: var(--accent-orange);
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-close i {
    pointer-events: none;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  /* Mobile Menu - показываем на 768px */
  .mobile-menu-overlay {
    display: block !important;
  }

  .mobile-menu {
    display: flex !important;
  }

  .header-menu-wrapper {
    justify-content: flex-end;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .header-inner {
    justify-content: space-between;
    position: relative;
  }

  .header-logo {
    position: relative;
    left: auto;
  }

  /* Порядок элементов: кнопка поддержать проект, переключатель темы, бургер */
  .header-menu-wrapper .header-donate-btn {
    display: flex;
    order: 1;
  }

  .header-menu-wrapper .theme-toggle-btn {
    display: flex;
    order: 2;
  }

  /* Скрываем переключатель языка на 768px */
  .header-menu-wrapper .header-language-switch {
    display: none !important;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Menu */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 45, 45, 0.95);
    z-index: 100002;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  }

  [data-theme="light"] .mobile-menu {
    background: rgba(245, 245, 245, 0.95);
  }

  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    position: relative;
  }

  .mobile-menu-nav a {
    color: var(--text-white);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  [data-theme="light"] .mobile-menu-nav a {
    color: var(--text-black);
  }

  .mobile-menu-nav a:hover {
    color: var(--accent-orange);
  }

  .mobile-menu-nav a[href="donate.html"],
  .mobile-menu-nav a[href*="donate.html"],
  .mobile-menu-nav .header-donate-btn {
    padding: 14px 20px;
    background: var(--accent-orange) !important;
    color: #333 !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--accent-orange);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: auto !important;
  }

  .mobile-menu-nav a[href="donate.html"]::before,
  .mobile-menu-nav a[href*="donate.html"]::before,
  .mobile-menu-nav .header-donate-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    top: 0;
    bottom: 0;
    z-index: -1;
  }

  .mobile-menu-nav a[href="donate.html"]:hover,
  .mobile-menu-nav a[href*="donate.html"]:hover,
  .mobile-menu-nav .header-donate-btn:hover {
    background: var(--accent-orange-hover) !important;
    border-color: var(--accent-orange-hover);
    color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
  }

  .mobile-menu-nav a[href="donate.html"]:active,
  .mobile-menu-nav a[href*="donate.html"]:active,
  .mobile-menu-nav .header-donate-btn:active {
    transform: translateY(0);
  }

  [data-theme="light"] .mobile-menu-nav a[href="donate.html"],
  [data-theme="light"] .mobile-menu-nav a[href*="donate.html"],
  [data-theme="light"] .mobile-menu-nav .header-donate-btn {
    color: #333 !important;
  }

  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  [data-theme="light"] .mobile-menu-close {
    color: var(--text-black);
  }
}


@media (max-width: 1540px) {
  .footer-content {
    flex-wrap: wrap;
    gap: 36px;
  }

  .footer-left {
    max-width: 100%;
    flex: 1 1 100%;
  }

  .footer-right {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 24px;
  }
}

/* Footer Responsive */
@media (min-width: 971px) and (max-width: 1250px) {
  .footer-right {
    justify-content: center;
    gap: 30px;
  }
}

@media (max-width: 970px) {
  .footer-content {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }

  .footer-left {
    flex: 1;
    text-align: center;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-language-controls {
    justify-content: center;
  }

  .footer-right {
    justify-content: center;
    gap: 30px;
    width: 100%;
    margin: 0;
  }

  .footer-section {
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 40px 0 30px;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-left {
    text-align: center;
  }

  .footer-logo {
    display: flex;
    justify-content: center;
  }

  .footer-logo-img {
    width: 50px;
    height: 50px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-right {
    justify-content: center;
    gap: 30px;
  }

  .footer-section {
    text-align: center;
  }

  .footer-links {
    align-items: center;
  }

  .language-select {
    max-width: 200px;
    margin: 0 auto;
  }
}

/* Scroll to Top - плавное появление: fade + сдвиг + лёгкий scale */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(108, 124, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    box-shadow 0.55s ease,
    visibility 0s linear 0.55s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.scroll-to-top:focus {
  outline: none;
}

.scroll-to-top.visible {
  opacity: 0.88;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.4s ease,
    visibility 0s linear 0s;
}

.scroll-to-top:hover {
  background: var(--accent-orange-hover);
  box-shadow: 0 6px 16px rgba(108, 124, 255, 0.45);
}

.scroll-to-top:active {
  transform: translate3d(0, 2px, 0) scale(0.96);
  transition:
    opacity 2.4s ease-in-out,
    transform 0.12s ease,
    box-shadow 0.12s ease,
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-to-top {
    transform: translate3d(0, 12px, 0);
    transition: opacity 2.4s ease-in-out, transform 2.4s ease-in-out, visibility 0s linear 2.4s;
  }

  .scroll-to-top.visible {
    transform: translate3d(0, 0, 0);
    transition: opacity 2.4s ease-in-out, transform 2.4s ease-in-out, visibility 0s linear 0s;
  }

  .scroll-to-top:active {
    transform: translate3d(0, 1px, 0);
    transition: opacity 2.4s ease-in-out, transform 0.15s ease, visibility 0s linear 0s;
  }
}

.scroll-to-top i {
  transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
  transform: none;
}

/* Адаптивность для кнопки */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 471px) {
  /* Убираем любые визуальные артефакты в code-editor */
  .code-content-wrapper,
  .code-content-wrapper pre,
  .code-content-wrapper code,
  .code-content-wrapper code span,
  .code-content-wrapper code .code-keyword {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .code-content-wrapper code::after,
  .code-content-wrapper code::before,
  .code-content-wrapper code span::after,
  .code-content-wrapper code span::before,
  .code-content-wrapper code .code-keyword::after,
  .code-content-wrapper code .code-keyword::before {
    content: none !important;
    display: none !important;
  }

  /* Убеждаемся, что скрытая кнопка не создает визуальных артефактов */
  .header-menu-wrapper .header-donate-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Кнопка "Начать обучение" и hero-блок на узких экранах */
@media (max-width: 425px) {
  .hero {
    justify-items: stretch;
  }

  .hero-left {
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-description {
    max-width: 100%;
    margin: 0 auto;
  }

  .start-learning-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }

  .hero-right {
    justify-content: center;
    width: 100%;
  }

  .hero-right .code-editor {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 580px) {
  /* Скрываем кнопку переключения темы на 580px и меньше */
  .header-menu-wrapper .theme-toggle-btn {
    display: none !important;
  }

  /* Скрываем кнопку "Поддержать проект" в header на 580px и меньше */
  .header-menu-wrapper .header-donate-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  /* Хедер: бургер и кнопки прижаты вправо */
  .header-menu-wrapper {
    justify-content: flex-end;
    margin-left: auto;
  }

  /* Показываем бургер на 580px и меньше */
  .header-menu-wrapper .header-burger-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .header-menu-wrapper .header-menu-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  [data-theme="dark"] .header-menu-wrapper .menu-icon {
    background: #ffffff !important;
  }

  [data-theme="light"] .header-menu-wrapper .menu-icon {
    background: #000000 !important;
  }

  .header-menu-wrapper .header-menu-btn:hover .menu-icon {
    background: var(--accent-orange) !important;
  }

  /* Показываем ссылку "Поддержать проект" в мобильном меню на 580px и меньше */
  .mobile-menu-nav a[href="donate.html"],
  .mobile-menu-nav a[href*="donate.html"],
  .mobile-menu-nav .header-donate-btn {
    display: inline-flex !important;
    padding: 14px 20px;
    background: var(--accent-orange);
    color: #333 !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid var(--accent-orange);
    transition: all 0.3s ease;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .mobile-menu-nav a[href="donate.html"]::before,
  .mobile-menu-nav a[href*="donate.html"]::before,
  .mobile-menu-nav .header-donate-btn::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    top: 0;
    bottom: 0;
    z-index: -1;
  }

  .mobile-menu-nav a[href="donate.html"]:hover,
  .mobile-menu-nav a[href*="donate.html"]:hover,
  .mobile-menu-nav .header-donate-btn:hover {
    background: var(--accent-orange-hover) !important;
    border-color: var(--accent-orange-hover);
    color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 124, 255, 0.3);
  }

  .mobile-menu-nav a[href="donate.html"]:active,
  .mobile-menu-nav a[href*="donate.html"]:active,
  .mobile-menu-nav .header-donate-btn:active {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .header-donate-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .header-donate-btn i {
    font-size: 12px;
  }

  .start-learning-btn {
    padding: 14px 24px;
    font-size: 14px;
  }

  .start-learning-btn i {
    font-size: 14px;
  }

  .subscribe-return-btn {
    padding: 14px 28px;
    font-size: 16px;
  }

  .subscribe-return-btn i {
    font-size: 16px;
  }

  .code-action-btn {
    padding: 4px 6px;
  }

  .code-action-btn i {
    font-size: 12px;
  }

  .task-attempt-btn {
    padding: 5px 10px;
    font-size: 11px;
  }

  .task-attempt-btn i {
    font-size: 10px;
  }
}

@media (max-width: 440px) {
  .container {
    padding: 0 12px;
  }

  .header {
    padding: 12px 0;
  }

  .header-logo-text {
    font-size: 12px;
  }

  .header-logo-img {
    width: 32px;
    height: 32px;
  }

  .hero-title-line {
    font-size: 38px;
  }

  .hero-title-line-small {
    font-size: 32px;
  }

  .hero-description {
    font-size: 14px;
    padding: 0 8px;
  }

  .start-learning-btn {
    padding: 12px 20px;
    font-size: 13px;
    width: 100%;
    max-width: 100%;
  }

  .courses-section-title {
    font-size: 24px;
  }

  .courses-section-subtitle {
    font-size: 14px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-question {
    padding: 16px 12px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 48px;
    align-items: flex-start;
  }

  .faq-question span:first-child {
    padding-right: 10px;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    max-width: none;
  }

  .faq-item.active .faq-question span:first-child {
    white-space: normal;
    max-width: none;
  }

  .faq-icon {
    width: 22px;
    height: 22px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
  }

  .faq-item.active .faq-answer {
    padding: 0 12px 16px 12px;
    max-height: 500px;
  }

  .faq-answer p {
    font-size: 13px;
  }

  .learning-process-title {
    font-size: 24px;
  }

  .learning-process-heading {
    font-size: 18px;
  }

  .learning-process-description {
    font-size: 13px;
  }

  .subscribe-title {
    font-size: 24px;
  }

  .subscribe-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .footer {
    padding: 30px 0 20px;
  }

  .footer-description {
    font-size: 12px;
  }

  .footer-right {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .code-editor {
    max-width: 100%;
  }

  .code-content {
    font-size: 11px;
  }

  .code-line-numbers {
    font-size: 11px;
    padding: 8px 4px;
  }

  .hero-stats {
    gap: 4px;
    padding: 20px 0 32px;
  }

  .hero-stats__item {
    padding: 6px 12px;
    min-width: 0;
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
  }

  .hero-stats__num {
    font-size: 22px;
  }

  .hero-stats__label {
    font-size: 10px;
    white-space: normal;
    text-align: center;
    word-break: break-word;
  }

  .hero-stats__sep {
    display: none;
  }
}

@media (max-width: 375px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 360px) {
  .header-donate-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  .header-donate-btn i {
    font-size: 11px;
  }

  .start-learning-btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  .start-learning-btn i {
    font-size: 13px;
  }

  .subscribe-return-btn {
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
  }

  .subscribe-return-btn i {
    font-size: 15px;
  }

  .hero-title-line {
    font-size: 36px;
  }

  .hero-title-line-small {
    font-size: 30px;
  }

  .hero-description {
    font-size: 14px;
  }

  .courses-section-title {
    font-size: 28px;
  }

  .faq-title {
    font-size: 28px;
  }

  .faq-question {
    padding: 24px 12px 18px 12px;
    font-size: 14px;
    gap: 12px;
  }

  .faq-icon {
    width: 24px;
    height: 24px;
    font-size: 20px;
  }

  .learning-process-title {
    font-size: 24px;
  }

  .learning-process-number {
    font-size: 22px;
    width: 44px;
    height: 44px;
  }

  .learning-process-heading {
    font-size: 16px;
  }

  .learning-process-description {
    font-size: 13px;
  }

  .subscribe-title {
    font-size: 24px;
  }

  .subscribe-btn {
    padding: 16px 18px;
    min-height: 50px;
    font-size: 14px;
  }

  .subscribe-btn svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 0 10px;
  }

  .header-donate-btn {
    padding: 6px 10px;
    font-size: 10px;
  }

  .header-donate-btn i {
    font-size: 10px;
  }

  .start-learning-btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .start-learning-btn i {
    font-size: 12px;
  }

  .hero-title-line {
    font-size: 32px;
  }

  .hero-title-line-small {
    font-size: 26px;
  }

  .courses-section-title {
    font-size: 24px;
  }

  .faq-title {
    font-size: 24px;
  }

  .subscribe-title {
    font-size: 20px;
  }

  .subscribe-btn {
    padding: 14px 16px;
    min-height: 46px;
    font-size: 13px;
  }

  /* Дополнительная адаптация hero и курсов под 320px */
  .hero-right .code-editor {
    max-width: 100%;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .course-card {
    max-width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 3;
  }

  .course-img {
    width: 100%;
    max-width: 100%;
    object-fit: contain;
  }

  /* FAQ: делаем текст в вопросах удобочитаемым на 2+ строках */
  .faq-question {
    align-items: flex-start;
  }

  .faq-question span:first-child {
    flex: 1;
    margin-right: 12px;
    word-break: break-word;
  }

  /* Чуть меньший отступ перед NEW в бургер-меню на 320px */
  .mobile-menu-nav .header-nav-badge {
    margin-left: 2px;
  }
}

/* Terminal Line Numbers */
.terminal-line-numbers {
  display: flex;
  flex-direction: column;
  padding: 20px 18px 20px 20px;
  background: linear-gradient(180deg, #131416 0%, #1e1e1e 100%);
  color: #6a6a6a;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
  min-width: 64px;
  width: 64px;
  position: relative;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
  align-items: stretch;
  justify-content: flex-start;
}

/* Вертикальная линия справа от нумерации */
.terminal-line-numbers::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(79, 195, 247, 0.3) 10%,
    rgba(79, 195, 247, 0.4) 50%,
    rgba(79, 195, 247, 0.3) 90%,
    transparent 100%
  );
  opacity: 0.7;
  box-shadow: 0 0 4px rgba(79, 195, 247, 0.2);
}

.terminal-line-numbers span {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: calc(14px * 1.7);
  height: calc(14px * 1.7);
  padding-right: 8px;
  color: #6a6a6a;
  font-weight: 400;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

/* Подсветка активной строки при наведении */
.terminal-line-numbers span:hover {
  color: #9cdcfe;
  text-shadow: 0 0 6px rgba(156, 220, 254, 0.3);
}

/* Декоративная точка для каждой строки */
.terminal-line-numbers span::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: rgba(79, 195, 247, 0.4);
  border-radius: 1px;
  transition: height 0.2s ease;
  opacity: 0;
}

.terminal-line-numbers span:hover::before {
  height: 60%;
  opacity: 1;
}

.animated-terminal__body {
  display: flex;
  flex-direction: row;
  background: #1e1e1e;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  position: relative;
  align-items: stretch;
  min-height: 280px;
}

.animated-terminal__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 195, 247, 0.2),
    transparent
  );
  z-index: 1;
}

/* Terminal Code Block - 1C Syntax Highlighting */
.terminal-code {
  flex: 1;
  display: block;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  color: #e0e0e0;
  white-space: pre;
  margin: 0;
  padding: 20px 24px;
  overflow-x: auto;
  width: 100%;
  background: #1e1e1e;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  min-height: 100%;
  box-sizing: border-box;
}

.terminal-code::-webkit-scrollbar {
  height: 8px;
}

.terminal-code::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.terminal-code::-webkit-scrollbar-thumb {
  background: rgba(79, 195, 247, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.terminal-code::-webkit-scrollbar-thumb:hover {
  background: rgba(79, 195, 247, 0.5);
}

/* 1C Syntax Colors - улучшенная версия */
.terminal-code .code-comment {
  color: #6a9955;
  font-style: italic;
  opacity: 0.9;
}

.terminal-code .code-keyword {
  color: #569cd6;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(86, 156, 214, 0.3);
}

.terminal-code .code-function {
  color: #dcdcaa;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(220, 220, 170, 0.2);
}

.terminal-code .code-string {
  color: #ce9178;
  text-shadow: 0 0 6px rgba(206, 145, 120, 0.2);
}

.terminal-code .code-builtin {
  color: #4ec9b0;
  font-weight: 500;
  text-shadow: 0 0 8px rgba(78, 201, 176, 0.3);
}

.terminal-code .code-variable {
  color: #9cdcfe;
  text-shadow: 0 0 6px rgba(156, 220, 254, 0.2);
}

.terminal-code .code-type {
  color: #4ec9b0;
}

.terminal-code .code-method {
  color: #dcdcaa;
}

.terminal-code .code-property {
  color: #9cdcfe;
}

.terminal-code .code-number {
  color: #b5cea8;
}

/* Terminal Code Cursor */
.terminal-code .terminal-cursor {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, #4ec9b0 0%, #81d4fa 100%);
  animation: cursorBlink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 3px;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(78, 201, 176, 0.6), 0 0 12px rgba(78, 201, 176, 0.4);
}

/* Light theme adjustments for terminal code */
[data-theme="light"] .terminal-code {
  color: #333333;
}

[data-theme="light"] .terminal-code .code-comment {
  color: #008000;
}

[data-theme="light"] .terminal-code .code-keyword {
  color: #0000ff;
}

[data-theme="light"] .terminal-code .code-function {
  color: #795e26;
}

[data-theme="light"] .terminal-code .code-string {
  color: #a31515;
}

[data-theme="light"] .terminal-code .code-builtin {
  color: #267f99;
}

[data-theme="light"] .terminal-code .code-variable {
  color: #001080;
}

[data-theme="light"] .terminal-code .code-type {
  color: #267f99;
}

[data-theme="light"] .terminal-code .code-method {
  color: #795e26;
}

[data-theme="light"] .terminal-code .code-property {
  color: #001080;
}

[data-theme="light"] .terminal-code .code-number {
  color: #098658;
}

[data-theme="light"] .terminal-code .terminal-cursor {
  background: #007acc;
}

/* Responsive terminal code */
@media (max-width: 1200px) {
  .terminal-code {
    font-size: 12px;
  }
}

@media (max-width: 968px) {
  .terminal-code {
    font-size: 11px;
    line-height: 1.5;
  }
}

@media (max-width: 640px) {
  .terminal-code {
    font-size: 10px;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .terminal-code {
    font-size: 9px;
  }
}

/* Channel Modal - Inline Options */
.channel-modal-options-inline {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.channel-modal-options-inline .channel-option {
  flex: 1 1 200px;
  max-width: 250px;
  padding: 24px 20px;
}

.channel-modal-options-inline .channel-option-image {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}

.channel-modal-options-inline .channel-option-title {
  font-size: 16px;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .channel-modal-options-inline {
    flex-direction: column;
    align-items: center;
  }

  .channel-modal-options-inline .channel-option {
    max-width: 100%;
    width: 100%;
  }
}

/* Channel Option - Frontend (gray border) */
.channel-option-frontend {
  border-color: #32353e;
}

.channel-option-frontend:hover {
  border-color: #32353e;
  box-shadow: 0 8px 24px rgba(50, 53, 62, 0.3);
}

/* Channel Option - 1C (orange border - default) */
.channel-option-1c {
  border-color: var(--accent-orange);
}

.channel-option-1c:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 8px 24px rgba(108, 124, 255, 0.2);
}

[data-theme="light"] .channel-option-frontend {
  border-color: #32353e;
}

[data-theme="light"] .channel-option-frontend:hover {
  border-color: #32353e;
}

/* ==============================================
   HERO STATS BAND
   ============================================== */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 28px 0 44px;
  position: relative;
  z-index: 1;
}

.hero-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

.hero-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
}

.hero-stats__num {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-orange);
  line-height: 1;
  letter-spacing: -0.5px;
}

.hero-stats__label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  max-width: 100%;
}

[data-theme="light"] .hero-stats__label {
  color: var(--text-black);
}

.hero-stats__sep {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ==============================================
   COURSES SECTION TAG
   ============================================== */
.courses-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(108, 124, 255, 0.1);
  border: 1px solid rgba(108, 124, 255, 0.26);
  color: var(--accent-orange);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

/* ==============================================
   FEATURES SECTION
   ============================================== */
/* ==============================================
   FEATURES SECTION - SCOPE.GG STYLE (5 cards)
   ============================================== */
.features-section {
  padding: 80px 0;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .features-section {
  background: #131416;
}

[data-theme="light"] .features-section {
  background: #f5f5f5;
}

.features-section__container {
  max-width: 1400px;
}

.features-header {
  margin-bottom: 40px;
}

.features-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(108, 124, 255, 0.1);
  border: 1px solid rgba(108, 124, 255, 0.26);
  color: var(--accent-orange);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

.features-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

[data-theme="dark"] .features-title {
  color: #ffffff;
}

[data-theme="light"] .features-title {
  color: #111111;
}

/* ===== CARDS ROW ===== */
.features-cards {
  display: flex;
  gap: 14px;
}

/* ===== FEATURE CARD (fc) ===== */
.fc {
  flex: 1;
  min-width: 0;
  min-height: 370px;
  border-radius: 16px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.62s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  position: relative;
  will-change: transform, box-shadow;
}

/* Карточка целиком как ссылка (YouTube): без подчёркивания, с фокусом для клавиатуры */
a.fc {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.fc:visited {
  color: inherit;
}

a.fc:focus-visible {
  outline: 2px solid rgba(108, 124, 255, 0.7);
  outline-offset: 3px;
}

[data-theme="dark"] .fc {
  background: #1e1e22;
}

[data-theme="light"] .fc {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.fc:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(108, 124, 255, 0.14);
  border-color: rgba(108, 124, 255, 0.28) !important;
}

.fc__top {
  flex-shrink: 0;
}

.fc__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 8px;
}

[data-theme="dark"] .fc__label {
  color: #666;
}

[data-theme="light"] .fc__label {
  color: #999;
}

.fc__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

[data-theme="dark"] .fc__title {
  color: #f0f0f0;
}

[data-theme="light"] .fc__title {
  color: #111;
}

.fc__media {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

/* ===== YouTube card visual ===== */
.fc-yt {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  padding-bottom: 6px;
}

[data-theme="dark"] .fc-yt {
  background: #141420;
}

[data-theme="light"] .fc-yt {
  background: #f0f0f8;
}

.fc-yt__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 60%, #24243e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fc-yt__play {
  width: 42px;
  height: 42px;
  background: #ff0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  box-shadow: 0 4px 18px rgba(255, 0, 0, 0.45);
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc--video:hover .fc-yt__play {
  transform: scale(1.06);
}

.fc-yt__progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
}

.fc-yt__progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 62%;
  height: 100%;
  background: #ff0000;
}

.fc-yt__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.fc-yt__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  flex-shrink: 0;
}

.fc-yt__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fc-yt__comments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px;
}

.fc-yt-comment {
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

[data-theme="dark"] .fc-yt-comment {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .fc-yt-comment {
  background: rgba(0, 0, 0, 0.05);
}

.fc-yt-comment__name {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-orange);
}

.fc-yt-comment__text {
  font-size: 10px;
  line-height: 1.35;
}

[data-theme="dark"] .fc-yt-comment__text {
  color: #ddd;
}

[data-theme="light"] .fc-yt-comment__text {
  color: #444;
}

/* ===== Code editor visual ===== */
.fc-editor {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.fc-editor__tabs {
  display: flex;
  padding: 0 8px;
}

[data-theme="dark"] .fc-editor__tabs {
  background: #2a2a2a;
}

[data-theme="light"] .fc-editor__tabs {
  background: #e0e0e0;
}

.fc-tab {
  padding: 5px 10px;
  font-size: 11px;
  border-bottom: 2px solid transparent;
  color: #888;
}

.fc-tab--active {
  color: #ccc;
  border-bottom-color: var(--accent-orange);
}

[data-theme="light"] .fc-tab--active {
  color: #333;
}

.fc-editor__body {
  padding: 10px 12px;
  line-height: 1.63;
  flex: 1;
}

[data-theme="dark"] .fc-editor__body {
  background: #1e1e1e;
  color: #ccc;
}

[data-theme="light"] .fc-editor__body {
  background: #f8f8f8;
  color: #333;
}

.fc-kw { color: #ff9800; }
.fc-attr { color: #9cdcfe; }
.fc-str { color: #ce9178; }
.fc-txt { color: #d4d4d4; }

[data-theme="light"] .fc-kw { color: #b05800; }
[data-theme="light"] .fc-attr { color: #0070d1; }
[data-theme="light"] .fc-str { color: #a31515; }
[data-theme="light"] .fc-txt { color: #444; }

/* ===== Chat visual ===== */
.fc__media--chat {
  align-self: stretch;
  min-height: 0;
}

.fc-chat {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 2px 0 6px;
  max-height: 212px;
  overflow: hidden;
  justify-content: flex-end;
}

.fc-msg__body {
  min-width: 0;
  word-break: break-word;
}

.fc-msg__body--code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  line-height: 1.42;
}

.fc-msg {
  max-width: 90%;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.45;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
}

.fc-msg--in {
  border-radius: 10px 10px 10px 2px;
  align-self: flex-start;
}

.fc-msg--out {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  border-radius: 10px 10px 2px 10px;
  align-self: flex-end;
  color: #fff;
}

[data-theme="dark"] .fc-msg--in {
  background: #2a2d3e;
  color: #e0e0e0;
}

[data-theme="light"] .fc-msg--in {
  background: #f0f2f5;
  color: #333;
}

.fc-time {
  font-size: 9px;
  opacity: 0.55;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 4px;
}

@keyframes fc-msg-leave {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes fc-msg-arrive {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fc-msg--leaving {
  animation: fc-msg-leave 0.38s ease forwards;
  pointer-events: none;
}

.fc-msg--arriving {
  animation: fc-msg-arrive 0.42s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .fc-msg--leaving,
  .fc-msg--arriving {
    animation: none !important;
  }
}

/* ===== Jobs visual ===== */
.fc-jobs {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-job {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

[data-theme="dark"] .fc-job {
  background: #28282e;
}

[data-theme="light"] .fc-job {
  background: #f4f4f8;
}

.fc-job--muted {
  opacity: 0.45;
}

.fc-job__icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(108, 124, 255, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.fc-job__icon--muted {
  background: rgba(255, 255, 255, 0.05);
  color: #555;
}

.fc-job__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(108, 124, 255, 0.15);
  color: var(--accent-orange);
  flex-shrink: 0;
}

.fc-badge--mid {
  background: rgba(157, 78, 221, 0.15);
  color: #c77dff;
}

/* ===== Progress visual ===== */
.fc-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-bottom: 6px;
}

/* Карточка «Прогресс»: список уроков растягивается по высоте блока */
.features-section .fc--progress .fc__media {
  align-items: stretch;
}

.features-section .fc--progress .fc-progress {
  flex: 1;
  min-height: 0;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 4px;
}

.features-section .fc--progress .fc-prog__label {
  width: 82px;
}

.fc-prog {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-prog__label {
  font-size: 11px;
  width: 72px;
  flex-shrink: 0;
}

[data-theme="dark"] .fc-prog__label {
  color: #aaa;
}

[data-theme="light"] .fc-prog__label {
  color: #666;
}

.fc-prog__track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

[data-theme="dark"] .fc-prog__track {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .fc-prog__track {
  background: rgba(0, 0, 0, 0.08);
}

.fc-prog__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-purple-light));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fc-prog__fill--dim {
  background: rgba(108, 124, 255, 0.35);
}

.fc-prog__val {
  font-size: 11px;
  font-weight: 700;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
  color: var(--accent-orange);
}

.features-section .fc--progress {
  transition:
    transform 1.25s cubic-bezier(0.05, 0.82, 0.1, 1),
    box-shadow 1.25s cubic-bezier(0.05, 0.82, 0.1, 1),
    border-color 1.25s cubic-bezier(0.05, 0.82, 0.1, 1) !important;
}

.features-section .fc--progress .fc-prog__fill {
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ===== Generic bars ===== */
.fc-bar {
  height: 5px;
  border-radius: 3px;
}

[data-theme="dark"] .fc-bar {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .fc-bar {
  background: rgba(0, 0, 0, 0.1);
}

.fc-bar--w80 { width: 80%; }
.fc-bar--w70 { width: 70%; }
.fc-bar--w60 { width: 60%; }
.fc-bar--w55 { width: 55%; }
.fc-bar--w50 { width: 50%; }
.fc-bar--w45 { width: 45%; }
.fc-bar--w40 { width: 40%; }
.fc-bar--w35 { width: 35%; }

.fc-bar--white {
  background: rgba(255, 255, 255, 0.25) !important;
}

.fc-bar--dim {
  background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="light"] .fc-bar--white {
  background: rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .fc-bar--dim {
  background: rgba(0, 0, 0, 0.05) !important;
}

/* ==============================================
   SUBSCRIBE CTA (REDESIGNED)
   ============================================== */
.subscribe-cta {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 56px 60px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #12101e 0%, #1a1630 40%, #0e1a2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

/* ===== CTA payment wall (left side) ===== */
.subscribe-cta__payments {
  position: relative;
  height: 252px;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-radius: 18px;
  overflow: hidden;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

@media (min-width: 900px) {
  .subscribe-cta__payments {
    display: grid;
  }
}

.subscribe-cta__payments-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.subscribe-cta__payments-track--down {
  animation: ctaPaymentsDown 12.5s linear infinite;
}

.subscribe-cta__payments-track--up {
  animation: ctaPaymentsUp 13.8s linear infinite;
}

.subscribe-cta__payments-track--delay {
  animation-delay: -4.2s;
}

.subscribe-cta__payments-track--delay-mid {
  animation-delay: -2.1s;
}

.subscribe-cta__payment-card {
  height: 72px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
  user-select: none;
  white-space: nowrap;
  text-align: center;
  margin-bottom: 12px;
}

.subscribe-cta__payment-name {
  line-height: 1;
  font-size: 15px;
}

.subscribe-cta__payment-icon {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.subscribe-cta__payment-icon i {
  font-size: 14px;
  line-height: 1;
  display: block;
}

.subscribe-cta__payment-card--vk .subscribe-cta__payment-icon i {
  transform: translateY(0.5px);
}

.subscribe-cta__payment-card--paypal { background: linear-gradient(135deg, #0070ba 0%, #003087 100%); }
.subscribe-cta__payment-card--visa { background: linear-gradient(135deg, #1a1fce 0%, #2a42ff 100%); }
.subscribe-cta__payment-card--ltc { background: linear-gradient(135deg, #a6a9af 0%, #ced2d9 100%); color: #1f2937; }
.subscribe-cta__payment-card--blik { background: linear-gradient(135deg, #0b0b0d 0%, #1b1d22 100%); }
.subscribe-cta__payment-card--klarna { background: linear-gradient(135deg, #f7c4d9 0%, #f1acc9 100%); color: #1f1f1f; }
.subscribe-cta__payment-card--boleto { background: linear-gradient(135deg, #090a0f 0%, #191b22 100%); font-size: 17px; }
.subscribe-cta__payment-card--btc { background: linear-gradient(135deg, #f7931a 0%, #ffac3f 100%); }
.subscribe-cta__payment-card--eth { background: linear-gradient(135deg, #5c5f6f 0%, #8a8fa3 100%); }
.subscribe-cta__payment-card--doge { background: linear-gradient(135deg, #c2a633 0%, #d8bc53 100%); color: #1f1f1f; }
.subscribe-cta__payment-card--mastercard { background: linear-gradient(135deg, #111827 0%, #1f2937 100%); }
.subscribe-cta__payment-card--paysafe { background: linear-gradient(135deg, #2f2f38 0%, #444452 100%); }
.subscribe-cta__payment-card--trustly { background: linear-gradient(135deg, #00a882 0%, #0cc39b 100%); font-size: 16px; }
.subscribe-cta__payment-card--youtube { background: linear-gradient(135deg, #ff1f3d 0%, #b2061f 100%); }
.subscribe-cta__payment-card--telegram { background: linear-gradient(135deg, #33a7e8 0%, #1f7fc2 100%); }
.subscribe-cta__payment-card--vk { background: linear-gradient(135deg, #2787f5 0%, #1f5fc9 100%); }
.subscribe-cta__payment-card--rutube {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
  color: #ffffff;
}

@keyframes ctaPaymentsDown {
  from { transform: translate3d(0, -50%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes ctaPaymentsUp {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .subscribe-cta__payments-track--down,
  .subscribe-cta__payments-track--up {
    animation-duration: 18s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
}

/* Keep this block scrolling even when site animations are disabled */
.animations-disabled .subscribe-cta__payments-track--down {
  animation: ctaPaymentsDown 12.5s linear infinite !important;
  animation-play-state: running !important;
}

.animations-disabled .subscribe-cta__payments-track--up {
  animation: ctaPaymentsUp 13.8s linear infinite !important;
  animation-play-state: running !important;
}

.animations-disabled .subscribe-cta__payments-track--delay {
  animation-delay: -4.2s !important;
}

.animations-disabled .subscribe-cta__payments-track--delay-mid {
  animation-delay: -2.1s !important;
}

/* Content right side */
.subscribe-cta__content {
  flex: 1;
  max-width: 640px;
  margin: 0 0 0 auto;
  text-align: left;
  position: relative;
  z-index: 1;
}

/* purple glow top */
.subscribe-cta::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(157, 78, 221, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

/* orange glow bottom-right */
.subscribe-cta::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(108, 124, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.subscribe-cta__glow {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.subscribe-cta__content {
  position: relative;
  z-index: 1;
}

.subscribe-cta__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(157, 78, 221, 0.15);
  border: 1px solid rgba(157, 78, 221, 0.3);
  color: #c77dff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.subscribe-cta__title {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.subscribe-cta__desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.48);
  margin: 0 0 36px;
  max-width: 620px;
  line-height: 1.65;
}

.subscribe-cta__buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.subscribe-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.22s ease, box-shadow 0.22s ease;
  border: 1px solid transparent;
  font-family: inherit;
  color: #ffffff;
}

.subscribe-cta__btn i {
  color: #ffffff;
}

/* Фирменные заливки, подписи и иконки - белые */
.subscribe-cta__btn--youtube {
  background: #ff0000;
  border-color: rgba(0, 0, 0, 0.12);
}

.subscribe-cta__btn--youtube:hover {
  background: #e60000;
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 0, 0, 0.35);
}

.subscribe-cta__btn--telegram {
  background: #229ed9;
  border-color: rgba(0, 0, 0, 0.1);
}

.subscribe-cta__btn--telegram:hover {
  background: #1d8fc7;
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(34, 158, 217, 0.4);
}

.subscribe-cta__btn--vk {
  background: #0077ff;
  border-color: rgba(0, 0, 0, 0.1);
}

.subscribe-cta__btn--vk:hover {
  background: #0066dd;
  border-color: rgba(0, 0, 0, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 119, 255, 0.38);
}

.subscribe-cta__btn--rutube {
  background: #0d0d0d;
  border-color: rgba(255, 255, 255, 0.12);
}

.subscribe-cta__btn--rutube:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

/* Index page: чуть меньше внешний отступ у секции курсов
   и белый фон только для внутреннего контента */
.index-page .courses-section {
  padding: 0 0 60px 0;
  margin-top: -24px;
}

.index-page .courses-section .container {
  position: relative;
  border-radius: 24px;
  padding: 32px 32px 42px;
}

[data-theme="light"] .index-page .courses-section .container {
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .index-page .courses-section .container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  pointer-events: none;
}

@media (max-width: 960px) {
  .index-page .courses-section {
    padding: 32px 0 48px 0;
    margin-top: -20px;
  }

  .index-page .courses-section .container {
    border-radius: 20px;
    padding: 24px 20px 34px;
  }
}

@media (max-width: 640px) {
  .index-page .courses-section {
    padding: 28px 0 40px 0;
    margin-top: -16px;
  }

  .index-page .courses-section .container {
    border-radius: 18px;
    padding: 20px 16px 28px;
  }
}

/* Subscribe CTA on white background in light theme */

[data-theme="light"] .index-page .subscribe-cta {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .index-page .subscribe-cta::before,
[data-theme="light"] .index-page .subscribe-cta::after,
[data-theme="light"] .index-page .subscribe-cta__glow {
  background: none;
}

[data-theme="light"] .index-page .subscribe-cta__tag {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.5);
  color: #4b5563;
}

[data-theme="light"] .index-page .subscribe-cta__title {
  color: #0f172a;
}

[data-theme="light"] .index-page .subscribe-cta__desc {
  color: #4b5563;
}

[data-theme="light"] .index-page .subscribe-cta__btn {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}


/* ==============================================
   RESPONSIVE вЂ” РќРћР’Р«Р• РЎР•РљР¦РР
   ============================================== */
@media (max-width: 1100px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .features-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .fc {
    min-height: 280px;
  }
}

@media (max-width: 800px) {
  .features-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .features-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 899px) {
  .subscribe-cta {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 40px 28px 36px;
  }

  .subscribe-cta__payments {
    display: none !important;
  }

  .subscribe-cta__content {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .subscribe-cta__tag {
    margin-left: auto;
    margin-right: auto;
  }

  .subscribe-cta__desc {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .subscribe-cta__buttons {
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .course-card {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    max-width: 100%;
    overflow: hidden;
  }

  .course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    padding: 0;
    transform: none !important;
  }

  .course-card:not(.course-card-disabled):hover .course-card-image {
    transform: none !important;
  }

  .course-card[data-category="frontend"] .course-card-image,
  .course-card[data-category="1c"] .course-card-image {
    object-fit: cover;
    object-position: center center;
    padding: 0;
  }

  .course-card-badge {
    top: 12px;
    right: 12px;
    left: auto;
    font-size: 11px;
    padding: 7px 12px;
    white-space: nowrap;
    text-align: left;
    max-width: calc(100% - 24px);
  }

  .course-card-content-center {
    padding: 16px;
  }

  .course-card-title-center {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .hero-stats {
    padding: 20px 0 36px;
  }

  .hero-stats__item {
    padding: 0 20px;
  }

  .hero-stats__num {
    font-size: 22px;
  }

  .features-section {
    padding: 60px 0;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .subscribe-cta {
    padding: 44px 24px 40px;
  }

  .subscribe-cta__buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin: 0 auto;
  }

  .subscribe-cta__btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .course-card {
    aspect-ratio: 4 / 3;
  }

  .course-card-title-center {
    font-size: 18px;
  }

  .course-card-badge {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 6px 10px;
  }

  .hero-stats {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-stats__sep {
    display: none;
  }

  .hero-stats__item {
    padding: 8px 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .subscribe-cta {
    padding: 36px 20px 32px;
    border-radius: 16px;
  }

  .subscribe-cta__title {
    font-size: 24px;
  }

  .subscribe-cta__desc {
    font-size: 14px;
    margin-bottom: 28px;
  }

  .subscribe-cta__buttons {
    max-width: 100%;
  }

  .subscribe-cta__btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* ==============================================
   COOKIE CONSENT BANNER
   ============================================== */
.cookie-consent {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 20px 24px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.cookie-consent[hidden] {
  display: none !important;
}

/* Отступ у футера, когда плашка cookie видна - текст не перекрывается */
.cookie-consent-visible .footer {
  padding-bottom: 120px;
}

.cookie-consent.is-visible {
  display: flex;
}

.cookie-consent__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  flex: 1;
}

.cookie-consent__link {
  color: var(--accent-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.cookie-consent__link:hover {
  color: var(--accent-hover);
}

.cookie-consent__link:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
  border-radius: 2px;
}

.cookie-consent__btn {
  flex-shrink: 0;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  background: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-consent__btn:active {
  transform: translateY(0);
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .cookie-consent {
    flex-direction: column;
    align-items: stretch;
    left: 8px;
    right: 8px;
    bottom: 12px;
    transform: none;
    width: auto;
    max-width: none;
    padding: 16px 18px;
    gap: 14px;
  }

  .cookie-consent__text {
    font-size: 13px;
  }

  .cookie-consent__btn {
    width: 100%;
    padding: 14px;
  }

  .cookie-consent-visible .footer {
    padding-bottom: 180px;
  }
}

@media (max-width: 380px) {
  .cookie-consent {
    left: 6px;
    right: 6px;
    bottom: 10px;
    padding: 14px 16px;
  }

  .cookie-consent__text {
    font-size: 13px;
    line-height: 1.45;
  }
}

/* Donate buttons: dedicated accent requested by user */
.header-donate-btn,
.mobile-menu-nav .header-donate-btn,
.mobile-menu-nav a[href="donate.html"],
.mobile-menu-nav a[href*="donate.html"] {
  background: #c5ef81 !important;
  border-color: #c5ef81 !important;
  color: #1f2229 !important;
}

/* Force-enable scrolling animation for subscribe social wall */
.subscribe-cta__payments-track--down {
  animation-name: ctaPaymentsDown !important;
  animation-duration: 12.5s !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
  animation-play-state: running !important;
}

.subscribe-cta__payments-track--up {
  animation-name: ctaPaymentsUp !important;
  animation-duration: 13.8s !important;
  animation-timing-function: linear !important;
  animation-iteration-count: infinite !important;
  animation-play-state: running !important;
}

.subscribe-cta__payments-track--delay {
  animation-delay: -4.2s !important;
}

.subscribe-cta__payments-track--delay-mid {
  animation-delay: -2.1s !important;
}

/* Restore smooth FAQ open/close animation */
.faq-answer {
  transition:
    grid-template-rows 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.62s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.faq-answer > * {
  transition:
    opacity 0.5s ease 0.08s,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.08s !important;
}

.faq-icon {
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.62s cubic-bezier(0.22, 1, 0.36, 1), color 0.62s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Restore smooth hover for features cards */
.features-section .fc {
  transition:
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.62s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.features-section .fc:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(108, 124, 255, 0.14);
  border-color: rgba(108, 124, 255, 0.28) !important;
}

.features-section .fc-yt__play {
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Перебивает общее правило .features-section .fc: только карточка «Прогресс» - дольше hover */
.features-section .fc.fc--progress {
  transition:
    transform 1.25s cubic-bezier(0.05, 0.82, 0.1, 1),
    box-shadow 1.25s cubic-bezier(0.05, 0.82, 0.1, 1),
    border-color 1.25s cubic-bezier(0.05, 0.82, 0.1, 1) !important;
}

.header-donate-btn,
.header-donate-btn:hover,
.header-donate-btn:focus,
.header-donate-btn:active {
  transition: none !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Disable all animations and keep one dark background */
*,
*::before,
*::after {
  animation: none !important;
  transition: none !important;
}

/* Демо-чат: «печатает» - снова включаем анимацию точек (перебивает правило * выше) */
.feedback-chat .feedback-typing__dot:nth-child(1) {
  animation: feedback-typing-bounce 1s ease-in-out 0s infinite both !important;
}

.feedback-chat .feedback-typing__dot:nth-child(2) {
  animation: feedback-typing-bounce 1s ease-in-out 0.12s infinite both !important;
}

.feedback-chat .feedback-typing__dot:nth-child(3) {
  animation: feedback-typing-bounce 1s ease-in-out 0.24s infinite both !important;
}

@media (prefers-reduced-motion: reduce) {
  .feedback-chat .feedback-typing__dot:nth-child(1),
  .feedback-chat .feedback-typing__dot:nth-child(2),
  .feedback-chat .feedback-typing__dot:nth-child(3) {
    animation: none !important;
    opacity: 0.65 !important;
  }
}

/* Features: micro-motion (перебивает глобальное отключение анимаций) */
@keyframes featuresTagBoltPulse {
  0%,
  100% {
    transform: scale(1) rotate(-4deg);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.14) rotate(4deg);
    filter: brightness(1.2);
  }
}

@keyframes featuresTitleAccentShimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes featuresFcYtProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

@keyframes featuresFcPlayPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 18px rgba(255, 0, 0, 0.45);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 26px rgba(255, 0, 0, 0.58);
  }
}

@keyframes featuresFcJobIconBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes featuresFcProgGlow {
  0%,
  100% {
    filter: brightness(1);
    opacity: 1;
  }
  50% {
    filter: brightness(1.12);
    opacity: 0.95;
  }
}

.features-section .features-tag i {
  display: inline-block;
  animation: featuresTagBoltPulse 2.4s ease-in-out infinite !important;
}

.features-title__accent {
  display: inline-block;
  padding: 0 0.04em;
  background: linear-gradient(
    90deg,
    var(--accent-orange),
    #ffffff,
    var(--accent-purple-light),
    var(--accent-orange)
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: featuresTitleAccentShimmer 5s linear infinite !important;
}

[data-theme="light"] .features-title__accent {
  background: linear-gradient(
    90deg,
    #c2410c,
    #111111,
    #6c7cff,
    #c2410c
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
}

.features-section .fc-yt__progress-bar::after {
  width: 0%;
  animation: featuresFcYtProgress 32s linear infinite !important;
}

.features-section .fc-yt__play {
  animation: featuresFcPlayPulse 2.4s ease-in-out infinite !important;
}

.features-section .fc--video:hover .fc-yt__play {
  animation-play-state: paused !important;
  transform: scale(1.08) !important;
}

.features-section .fc-job__icon {
  animation: featuresFcJobIconBob 2.8s ease-in-out infinite !important;
}

.features-section .fc-job:nth-child(1) .fc-job__icon {
  animation-delay: 0s !important;
}

.features-section .fc-job:nth-child(2) .fc-job__icon {
  animation-delay: 0.35s !important;
}

.features-section .fc-job:nth-child(3) .fc-job__icon {
  animation-delay: 0.7s !important;
}

.features-section .fc-job:nth-child(4) .fc-job__icon {
  animation-delay: 1.05s !important;
}

.features-section .fc-prog__fill {
  animation: featuresFcProgGlow 2.6s ease-in-out infinite !important;
}

.features-section .fc-prog:nth-child(1) .fc-prog__fill {
  animation-delay: 0s !important;
}

.features-section .fc-prog:nth-child(2) .fc-prog__fill {
  animation-delay: 0.25s !important;
}

.features-section .fc-prog:nth-child(3) .fc-prog__fill {
  animation-delay: 0.5s !important;
}

.features-section .fc-prog:nth-child(4) .fc-prog__fill {
  animation-delay: 0.75s !important;
}

.features-section .fc-prog:nth-child(5) .fc-prog__fill {
  animation-delay: 1s !important;
}

.features-section .fc-prog:nth-child(6) .fc-prog__fill {
  animation-delay: 1.25s !important;
}

.features-section .fc-prog:nth-child(7) .fc-prog__fill {
  animation-delay: 1.5s !important;
}

.features-section .fc-prog:nth-child(8) .fc-prog__fill {
  animation-delay: 1.75s !important;
}

.features-section .fc-prog:nth-child(9) .fc-prog__fill {
  animation-delay: 2s !important;
}

.features-section .fc-prog:nth-child(10) .fc-prog__fill {
  animation-delay: 2.25s !important;
}

@media (prefers-reduced-motion: reduce) {
  .features-section .features-tag i,
  .features-title__accent,
  .features-section .fc-yt__progress-bar::after,
  .features-section .fc-yt__play,
  .features-section .fc-job__icon,
  .features-section .fc-prog__fill {
    animation: none !important;
  }

  .features-title__accent {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--accent-orange) !important;
  }

  .features-section .fc-yt__progress-bar::after {
    width: 62% !important;
  }
}

html,
body,
.main,
.hero-section-wrapper,
.courses-section,
.features-section,
.subscribe-section,
.footer {
  background: #1f2229 !important;
}

/* Code markers similar to cs.money labels */
.code-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
}

.code-annotation {
  position: absolute;
  color: #dce3f5;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.code-annotation__label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.code-annotation__title {
  color: #8ea5ff;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.code-annotation__subtitle {
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
}

.code-annotation__line {
  position: absolute;
  top: 50%;
  height: 1px;
  background: rgba(156, 172, 214, 0.72);
  transform-origin: left center;
}

.code-annotation__dot {
  display: none;
}

.code-annotation__line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8ea5ff;
  box-shadow: 0 0 0 5px rgba(142, 165, 255, 0.18);
}

.code-annotation--vars {
  left: -186px;
  top: -52px;
  text-align: left;
}

.code-annotation--vars .code-annotation__label {
  position: absolute;
  left: 20px;
  top: -16px;
}

.code-annotation--vars .code-annotation__line {
  display: none;
}

.code-annotation--vars .code-annotation__line::after {
  display: none;
}

.code-annotation--vars .code-annotation__dot {
  display: none;
}

.code-annotation--vars .code-annotation__title {
  font-size: 26px;
}

.code-annotation--vars .code-annotation__subtitle {
  font-size: 34px;
}

.code-annotation--result {
  right: -44px;
  top: 316px;
  text-align: left;
}

.code-annotation--result .code-annotation__line {
  right: 192px;
  width: 130px;
  transform: rotate(20deg);
  transform-origin: right center;
}

.code-annotation--result .code-annotation__line::after {
  left: -4px;
  transform: translate(-50%, -50%);
}

@media (max-width: 1635px) {
  .code-annotations {
    display: none;
  }
}

.code-editor {
  overflow: hidden;
}

.code-action-btn {
  position: relative;
  overflow: visible;
  z-index: 35;
}

.code-action-btn::before {
  display: none;
}

.code-action-btn::after {
  display: none;
}

.code-action-btn__hint {
  display: none;
}

.code-action-btn__hint::before {
  display: none;
}

.hero-right .code-editor {
  overflow: hidden !important;
}

.hero-right .code-editor-header {
  overflow: hidden;
}

.index-page .hero {
  overflow: visible !important;
}

.index-page .hero-right {
  overflow: visible !important;
}

.index-page .hero-right .code-annotations {
  overflow: visible !important;
}

.code-annotation--run {
  right: -5px;
  top: 16px;
  text-align: left;
}

.code-annotation--run .code-annotation__label {
  position: absolute;
  left: 58px;
  top: 72px;
  transform: none;
}

.code-annotation--run .code-annotation__title {
  font-family: inherit;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #8ea5ff;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

/* Зпусти меня */
.code-annotation--run .code-annotation__subtitle {
  margin-top: 0;
  font-family: inherit;
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.code-annotation--run .code-annotation__line {
  left: 24px;
  top: 7px;
  width: 88px;
  height: 54px;
  background: transparent;
  border-top: 2px solid rgba(198, 213, 255, 0.95);
  border-right: 2px solid rgba(198, 213, 255, 0.95);
  transform: none;
}

.code-annotation--run .code-annotation__line::after {
  display: none;
}

.code-annotation--run .code-annotation__dot {
  position: absolute;
  display: block;
  left: 9px;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c2d3ff;
  box-shadow: 0 0 0 6px rgba(142, 165, 255, 0.28);
}

/* Requested quick tweaks */
.header-nav-badge {
  background: #c5ec7f !important;
  color: #1f2229 !important;
  position: relative;
  top: 0;
  margin-left: -0.15em;
  padding: 1px 5px;
  font-size: 9px;
  border-radius: 3px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  vertical-align: baseline;
  transform: rotate(-8deg);
  transform-origin: left center;
}

.start-learning-btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.hero-stats__num {
  color: #ffffff !important;
}

.header-donate-btn:hover,
.mobile-menu-nav .header-donate-btn:hover,
.mobile-menu-nav a[href="donate.html"]:hover,
.mobile-menu-nav a[href*="donate.html"]:hover {
  background: #b4e56b !important;
  border-color: #b4e56b !important;
  color: #1f2229 !important;
}

.header-donate-btn i,
.mobile-menu-nav .header-donate-btn i {
  color: #1f2229 !important;
}

/* ==============================================
   Scope-like visual skin (UI only)
   ============================================== */
body,
[data-theme="dark"] body {
  background: #1f2229;
  color: #e8edf7;
}

.header.scrolled {
  background: rgba(31, 34, 41, 0.96) !important;
  border-bottom: 1px solid #2f3542;
}

.header-nav-link,
.footer-link {
  color: #aeb7c8;
}

.header-nav-link {
  background-color: transparent !important;
  transition: background-color 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.34s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.header-nav-link:hover,
[data-theme="light"] .header-nav-link:hover,
[data-theme="dark"] .header-nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
}

.footer-link:hover {
  color: #ffffff;
  background: rgba(78, 90, 116, 0.2);
}

.hero-title,
.courses-section-title,
.features-title,
.learning-process-heading,
.footer-heading,
.subscribe-cta__title {
  color: #f3f6ff;
}

.hero-description,
.courses-section-subtitle,
.features-subtitle,
.learning-process-description,
.footer-description,
.subscribe-cta__desc {
  color: #a7b1c4;
}

.course-card,
.feature-card,
.learning-process-visual:not(.learning-process-visual--video),
.job-vacancies,
.subscribe-cta,
.code-editor,
.footer {
  background: #1f2229 !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

/* Только CTA «Начать обучение» / возврат: синий. Кнопки соцсетей - модификаторы .subscribe-cta__btn--* выше. */
.start-learning-btn,
.subscribe-return-btn {
  background: #4b62d8 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.start-learning-btn:hover,
.subscribe-return-btn:hover {
  background: #5d73e3 !important;
  border-color: #8799f2 !important;
  transform: translateY(-1px);
}

/* Hide course CTA "Начать" button */
.course-card-cta {
  display: none !important;
}

/* Smoother hover for live course cards (Frontend, 1C) */
.course-card[data-category="frontend"],
.course-card[data-category="1c"] {
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.course-card[data-category="frontend"] .course-card-image,
.course-card[data-category="1c"] .course-card-image {
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.course-card[data-category="frontend"] .course-card-content-center,
.course-card[data-category="1c"] .course-card-content-center {
  transition: background 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.course-card[data-category="frontend"] .course-card-title-center,
.course-card[data-category="1c"] .course-card-title-center {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Preserve requested donate accent */
.header-donate-btn,
.mobile-menu-nav .header-donate-btn,
.mobile-menu-nav a[href="donate.html"],
.mobile-menu-nav a[href*="donate.html"] {
  background: #c5ef81 !important;
  border-color: #c5ef81 !important;
  color: #1f2229 !important;
}

/* Skip link: visually hidden until keyboard focus (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100002;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #1f2229);
  color: var(--text-primary, #fff);
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 1rem;
  outline: 2px solid var(--accent-orange, #6c7cff);
  outline-offset: 2px;
}
