/* ===== ОБЩИЕ СБРОСЫ ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== ШРИФТ ===== */
body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #2d3748;
  transition:
    background 0.3s ease,
    color 0.3s ease;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

body.dark-theme {
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1a1a2e);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #d4d4e0;
}

/* ===== КОНТЕЙНЕР ===== */
.container {
  max-width: 1000px;
  width: 100%;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 2rem 2.5rem;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}
body.dark-theme .container {
  background: #1e1e2e;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

/* ===== ШАПКА ===== */
header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInDown 0.8s ease forwards;
}
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.header-left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.header-left h1 {
  font-size: 2.2rem;
  margin: 0;
  color: #2d3748;
  transition: color 0.3s ease;
}
body.dark-theme .header-left h1 {
  color: #f0f0ff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.8rem; /* расстояние между элементами */
  margin-left: auto; /* прижимает к правому краю */
}
.header-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.header-left #time-display {
  font-size: 1.3rem;
  color: #4a5568;
  margin: 0;
}
body.dark-theme #time-display {
  color: #b0b0c8;
}

/* ===== КНОПКИ (общие) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  font-size: 1.6rem;
  font-weight: 400;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
  width: 3.2rem;
  height: 3.2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  line-height: 1;
}
.btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

/* Кнопка переключения темы */
#theme-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
#theme-toggle:hover {
  transform: scale(1.1) rotate(10deg);
}
body.dark-theme #theme-toggle {
  background: linear-gradient(135deg, #4a4a6a 0%, #2d2d44 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
}
body.dark-theme #lang-toggle {
  background: linear-gradient(135deg, #4a4a6a 0%, #2d2d44 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  color: #e0e0e0;
}

/* Кнопка "Нажми меня!" */
.btn-magic {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  border-radius: 10px;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  width: auto;
  height: auto;
  margin: 0;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: pulse 2s infinite;
}
.btn-magic:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}
body.dark-theme .btn-magic {
  background: linear-gradient(135deg, #4a4a6a 0%, #2d2d44 100%);
  color: #f0f0f0;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

/* ===== КНОПКИ-ЗНАЧКИ (язык и тема) ===== */
#lang-toggle,
#theme-toggle {
  background: transparent !important; /* убрать фон */
  border: none !important; /* убрать рамку */
  box-shadow: none !important; /* убрать тень */
  padding: 0.2rem 0.4rem; /* минимальные отступы */
  font-size: 1.6rem; /* размер иконок */
  width: auto; /* автоширина */
  height: auto; /* авто-высота */
  border-radius: 0; /* убрать скругление */
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  line-height: 1;
}

/* Эффект при наведении */
#lang-toggle:hover,
#theme-toggle:hover {
  transform: scale(1.2);
  opacity: 0.7;
}

/* Чтобы не было конфликтов с общими стилями .btn */
#lang-toggle.btn,
#theme-toggle.btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0.2rem 0.4rem !important;
}

/* ===== ТАЙМЕР ===== */
.countdown-container {
  background: #f0f4ff;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  text-align: center;
  margin: 0;
  border: 1px solid #e2e8f0;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
  flex: 1;
}
body.dark-theme .countdown-container {
  background: #2a2a42;
  border-color: #4a4a6a;
}
#countdown {
  font-size: 2.2rem;
  font-weight: 700;
  color: #667eea;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}
body.dark-theme #countdown {
  color: #89b4fa;
}

/* ===== ПРОГРЕСС-БАР (внутри таймера) ===== */
.progress-container {
  width: 100%;
  background: #e2e8f0;
  border-radius: 10px;
  height: 8px;
  margin-top: 0.8rem;
  overflow: hidden;
  transition: background 0.3s ease;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  border-radius: 10px;
  width: 100%;
  transition: width 0.5s ease;
}
body.dark-theme .progress-container {
  background: #3a3a52;
}
body.dark-theme .progress-bar {
  background: linear-gradient(90deg, #89b4fa, #667eea);
}

/* ===== КОНТЕНТ (секции) ===== */
.content {
  margin: 2rem 0;
}
.section {
  background: #f7fafc;
  border-left: 4px solid #667eea;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
body.dark-theme .section {
  background: #25253a;
  border-left-color: #667eea;
}
.section h2 {
  color: #2d3748;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  transition: color 0.3s ease;
}
body.dark-theme .section h2 {
  color: #c8c8f0;
}
.section p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 90%;
  margin: 0.8rem auto;
  color: #2d3748;
  transition: color 0.3s ease;
}
body.dark-theme .section p,
body.dark-theme .section ul,
body.dark-theme .section ol {
  color: #d0d0e8;
}
.section ul,
.section ol {
  font-size: 1.15rem;
  line-height: 1.8;
  padding-left: 2rem;
  color: #2d3748;
  transition: color 0.3s ease;
}
.section li {
  margin-bottom: 0.4rem;
}
.section a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}
.section a:hover {
  text-decoration: underline;
}
body.dark-theme .section a {
  color: #89b4fa;
}

/* ===== БЛОКИ КОДА ===== */
pre {
  background: #f0f4f8;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  border: 1px solid #e2e8f0;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
code {
  font-family: "Courier New", monospace;
  background: #edf2f7;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.3s ease;
}
body.dark-theme pre {
  background: #2a2a42;
  border-color: #4a4a6a;
}
body.dark-theme code {
  background: #3a3a52;
  color: #d4d4e0;
}

/* ===== ВИДЖЕТ ПОГОДЫ ===== */
.weather-widget {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  padding: 0.3rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: background 0.3s ease;
}

.weather-widget #weather-icon {
  font-size: 1.4rem;
}
body.dark-theme .weather-widget {
  background: rgba(30, 30, 46, 0.8);
  color: #d4d4e0;
}

/* ===== ФУТЕР ===== */
footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #4a5568;
  transition:
    border-color 0.3s ease,
    color 0.3s ease;
  font-size: 1.1rem;
}
body.dark-theme footer {
  border-top-color: #3a3a52;
  color: #a0a0b8;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 640px) {
  .container {
    padding: 1.5rem;
  }
  .header-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .header-left {
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  .header-bottom {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.4rem;
    align-self: flex-end;
  }
  .btn-magic {
    width: 100%;
    text-align: center;
    border-radius: 10px;
  }
  #countdown {
    font-size: 1.6rem;
  }
  .section p {
    font-size: 1.1rem;
    max-width: 100%;
  }
  .section ul,
  .section ol {
    font-size: 1rem;
  }
  .weather-widget {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    width: fit-content;
    justify-content: left;
  }
}

/* ===== TOAST-УВЕДОМЛЕНИЯ ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #2d3748;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  transform: translateX(120%);
  opacity: 0;
  animation:
    slideIn 0.5s forwards,
    fadeOut 0.5s 3s forwards;
  max-width: 350px;
  word-wrap: break-word;
}
body.dark-theme .toast {
  background: #2a2a42;
  color: #f0f0f0;
}
@keyframes slideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s;
}

/* ===== СНЕГ ===== */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* чтобы не мешать кликам */
  z-index: 1;
  /* над фоном, но под контентом (container имеет z-index: auto) */
  opacity: 0.9;
}

/* ===== КАСТОМНЫЙ КУРСОР ===== */
#cursor-dot {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #667eea, #764ba2);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s,
    height 0.2s,
    background 0.2s;
}

#cursor-dot.hover {
  width: 34px;
  height: 34px;
  background: radial-gradient(circle, #f093fb, #f5576c);
  box-shadow: 0 0 30px rgba(245, 87, 108, 0.6);
}

#cursor-trail {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.3);
  transform: translate(-50%, -50%);
  transition: none;
}

/* Скрыть стандартный курсор на всех элементах */
* {
  cursor: none !important;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

body.dark-theme .section:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Матовый контейнер */
.container {
  background: #f0f2f5;
  /* светлый матовый серый */
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  /* мягкая тень, без блеска */
  padding: 2rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  /* лёгкая светлая кайма */
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

body.dark-theme .container {
  background: #2a2a3a;
  /* тёмный матовый */
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.section {
  background: #ffffff;
  /* светлая матовая белизна */
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-left: 4px solid #667eea;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

body.dark-theme .section {
  background: #32324a;
  /* тёмный матовый */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-left-color: #667eea;
}

.section:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

body.dark-theme .section:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

i {
  margin-right: 0.3rem;
  color: inherit;
  /* сохраняет цвет текста */
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: #2d3748;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.8;
}

body.dark-theme {
  color: #e0e0e8;
}

:root {
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.btn {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleAnim 0.8s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

:root {
  /* Цветовая палитра (брендовые цвета) */
  --color-primary: #667eea;
  /* основной синий */
  --color-primary-dark: #5a67d8;
  --color-secondary: #764ba2;
  /* фиолетовый акцент */
  --color-accent: #f093fb;
  /* розовый для кнопок (можно заменить) */
  --color-bg-light: #f8fafc;
  --color-bg-dark: #12121a;
  --color-text-light: #1a202c;
  --color-text-dark: #e2e8f0;

  /* Отступы (spacing scale) */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Радиусы скруглений */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Тени */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

  /* Шрифты */
  --font-primary: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* Анимации */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quint: cubic-bezier(0.83, 0, 0.17, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  font-family: var(--font-primary);
}
.container {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}
.section {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
}
.btn {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
}

/* Плавное появление */
.section {
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.btn {
  transition:
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s var(--ease-out-expo);
}

.btn:hover {
  transform: scale(1.05);
}

/* Анимация появления шапки */
header {
  animation: fadeInDown 0.8s var(--ease-out-expo) forwards;
}

.holographic {
  background: linear-gradient(
    135deg,
    #667eea,
    #764ba2,
    #f093fb,
    #f5576c,
    #667eea,
    #764ba2
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: holographicShine 6s var(--ease-in-out-quint) infinite;
  filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.2));
}

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

/* Переопределяем форму для двух кнопок */
#lang-toggle,
#theme-toggle {
  border-radius: 8px; /* небольшое скругление – квадратные с мягкими углами */
  /* Можно также задать свои размеры, если нужно */
  /* width: 3.2rem; height: 3.2rem;  уже есть, оставляем */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  justify-content: flex-end;
}

/* Порядок элементов: погода → кнопка языка → кнопка темы */
.weather-widget {
  order: 0;
}
#lang-toggle {
  order: 1;
}
#theme-toggle {
  order: 2;
}

.header-bottom {
  display: flex;
  flex-direction: column; /* таймер сверху, кнопка снизу */
  align-items: center;
  gap: 1.5rem;
}

.magic-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-magic {
  padding: 1rem 3rem;
  font-size: 1.4rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1px;
  font-weight: 600;
  width: auto;
  min-width: 220px;
}

.btn-magic:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.7);
}

.btn-magic:active {
  transform: scale(0.96);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.6);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}
.btn-magic {
  animation: pulse 2s infinite;
}

@media (max-width: 640px) {
  .btn-magic {
    width: 100%;
    min-width: unset;
    padding: 1rem;
    font-size: 1.2rem;
  }
  .header-bottom {
    gap: 1rem;
  }
}

/* ===== БЕЙДЖИ ТЕХНОЛОГИЙ ===== */
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 500;
  background: #eef2f6;
  color: #2d3748;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.tech-badge:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tech-badge.html {
  background: #e34f26;
  color: #fff;
}
.tech-badge.css {
  background: #264de4;
  color: #fff;
}
.tech-badge.js {
  background: #f7df1e;
  color: #2d3748;
}
.tech-badge.github {
  background: #333;
  color: #fff;
}

.tech-icon {
  font-size: 1.3rem;
  width: 1.5rem;
  text-align: center;
}

/* Тёмная тема */
body.dark-theme .tech-badge {
  background: #2d2d44;
  color: #d0d0e8;
  border-color: #4a4a6a;
}
body.dark-theme .tech-badge.html {
  background: #e34f26;
  color: #fff;
}
body.dark-theme .tech-badge.css {
  background: #264de4;
  color: #fff;
}
body.dark-theme .tech-badge.js {
  background: #f7df1e;
  color: #1a1a2e;
}
body.dark-theme .tech-badge.github {
  background: #555;
  color: #fff;
}

@media (max-width: 640px) {
  .tech-badge {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 30px;
  }
  .tech-icon {
    font-size: 1rem;
  }
}

.tech-badge {
  margin: 0.4rem 0.6rem; /* вертикаль | горизонталь */
}

@media (max-width: 640px) {
  .tech-list {
    gap: 0.5rem;
  }
}

/* ===== ГРАДИЕНТНЫЕ СЕКЦИИ ===== */
.section {
  background: linear-gradient(145deg, #ffffff, #f0f4f8) !important;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.15);
}

/* Тёмная тема */
body.dark-theme .section {
  background: linear-gradient(145deg, #2a2a42, #1a1a2e) !important;
  border-left-color: #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-theme .section:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* ===== ГРАДИЕНТНЫЕ БЕЙДЖИ ТЕХНОЛОГИЙ ===== */
.tech-badge {
  transition: all 0.3s ease;
}

.tech-badge.html {
  background: linear-gradient(135deg, #e44d26, #f16529);
  color: #fff;
}
.tech-badge.css {
  background: linear-gradient(135deg, #264de4, #2965f1);
  color: #fff;
}
.tech-badge.js {
  background: linear-gradient(135deg, #f7df1e, #f0c000);
  color: #2d3748;
}
.tech-badge.github {
  background: linear-gradient(135deg, #333, #6e6e6e);
  color: #fff;
}

.tech-badge:hover {
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Тёмная тема – слегка приглушаем */
body.dark-theme .tech-badge.html {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}
body.dark-theme .tech-badge.css {
  background: linear-gradient(135deg, #1a3a8a, #2161c4);
}
body.dark-theme .tech-badge.js {
  background: linear-gradient(135deg, #d4a900, #f0c000);
  color: #1a1a2e;
}
body.dark-theme .tech-badge.github {
  background: linear-gradient(135deg, #222, #555);
}

body {
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
}

body.dark-theme ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
  .tech-list {
    gap: 0.5rem;
    justify-content: center;
  }
  .tech-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  .container {
    padding: 1rem;
  }
}

/* ===== ПЛАВНЫЙ АККОРДЕОН ===== */
.section-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 0.5rem;
  transition:
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    padding 0.3s ease;
}

.section-content.open {
  max-height: 2000px; /* достаточно большое значение, чтобы вместить весь контент */
  opacity: 1;
  padding: 1rem 0.5rem 0.5rem;
}

/* Секция about всегда открыта */
#about .section-content {
  max-height: 2000px;
  opacity: 1;
  padding: 1rem 0.5rem 0.5rem;
}

.section h2 {
  transition: color 0.2s;
}
.section h2:hover {
  color: #667eea;
}
body.dark-theme .section h2:hover {
  color: #89b4fa;
}

@media (max-width: 640px) {
  .section-content {
    transition:
      max-height 0.3s ease,
      opacity 0.2s ease;
  }
}

/* ===== ИКОНКА GITHUB В ФУТЕРЕ ===== */
#footer-repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #2d3748; /* цвет иконки (как у текста) */
  text-decoration: none; /* убираем подчёркивание */
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

#footer-repo-link:hover {
  color: #667eea;
  transform: scale(1.1) rotate(4deg);
  text-decoration: none; /* чтобы и при наведении не было подчёркивания */
}

body.dark-theme #footer-repo-link {
  color: #b0b0c8;
}
body.dark-theme #footer-repo-link:hover {
  color: #89b4fa;
}

/* ===== МАТОВЫЙ ЭФФЕКТ ДЛЯ ВКЛАДОК ===== */

/* Сами кнопки вкладок */
.tab-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-bottom: none !important;
  border-radius: 12px 12px 0 0 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  transition: all 0.3s ease !important;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: rgba(118, 75, 162, 0.35) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-color: rgba(118, 75, 162, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 -4px 20px rgba(118, 75, 162, 0.25) !important;
}

/* Панели вкладок (содержимое) */
.tab-panel {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 0 16px 16px !important;
  padding: 1.5rem !important;
  box-shadow: inset 0 0 30px rgba(118, 75, 162, 0.05) !important;
}

/* ===== АДАПТАЦИЯ МАТОВОГО ЭФФЕКТА ДЛЯ ТЁМНОЙ ТЕМЫ ===== */

body.dark-theme .tab-btn {
  /* Усиливаем прозрачность и размытие */
  background: rgba(20, 20, 40, 0.55) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
  color: rgba(220, 220, 255, 0.7) !important;
}

body.dark-theme .tab-btn:hover {
  background: rgba(40, 40, 80, 0.7) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px);
}

body.dark-theme .tab-btn.active {
  background: rgba(118, 75, 162, 0.45) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-color: rgba(118, 75, 162, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 -4px 30px rgba(118, 75, 162, 0.4) !important;
}

body.dark-theme .tab-panel {
  background: rgba(10, 10, 25, 0.6) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-top: none !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: inset 0 0 40px rgba(118, 75, 162, 0.1) !important;
}

/* Усиливаем фиолетовое свечение для тёмной темы */
body.dark-theme .tabs-container {
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(118, 75, 162, 0.3),
    0 0 160px rgba(102, 126, 234, 0.12) !important;
}

body.dark-theme .tabs-container::before {
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.25) 0%,
    rgba(102, 126, 234, 0.08) 50%,
    transparent 70%
  );
  filter: blur(30px);
  opacity: 0.8;
}

/* Текст внутри панелей в тёмной теме */
body.dark-theme .tab-panel p,
body.dark-theme .tab-panel li,
body.dark-theme .tab-panel code,
body.dark-theme .tab-panel pre {
  color: #e0e0f0 !important;
}

body.dark-theme .tab-panel a {
  color: #a78bfa !important;
}

body.dark-theme .tab-panel a:hover {
  color: #c4b5fd !important;
}

body.dark-theme .tab-panel code {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f0e6ff !important;
}

/* ===== ФИОЛЕТОВОЕ СВЕЧЕНИЕ ДЛЯ ВКЛАДОК В ТЁМНОЙ ТЕМЕ ===== */

/* Активная вкладка — внешнее свечение */
body.dark-theme .tab-btn.active {
  box-shadow:
    0 0 30px rgba(118, 75, 162, 0.6),
    0 0 60px rgba(118, 75, 162, 0.25) !important;
}

/* Панель вкладки — внутреннее и внешнее свечение */
body.dark-theme .tab-panel {
  box-shadow:
    inset 0 0 50px rgba(118, 75, 162, 0.12),
    0 0 40px rgba(118, 75, 162, 0.08) !important;
}

/* Контейнер вкладок — общее свечение (пульсирующее) */
body.dark-theme .tabs-container {
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(118, 75, 162, 0.25),
    0 0 160px rgba(102, 126, 234, 0.1) !important;
  animation: glowPulseDark 4s ease-in-out infinite alternate;
}

@keyframes glowPulseDark {
  0% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 80px rgba(118, 75, 162, 0.2),
      0 0 160px rgba(102, 126, 234, 0.08);
  }
  100% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 100px rgba(118, 75, 162, 0.35),
      0 0 200px rgba(102, 126, 234, 0.15);
  }
}

/* При наведении на неактивную вкладку — лёгкое свечение */
body.dark-theme .tab-btn:hover:not(.active) {
  box-shadow: 0 0 20px rgba(118, 75, 162, 0.2);
}

/* ===== ФИОЛЕТОВОЕ СВЕЧЕНИЕ ДЛЯ ОСНОВНОЙ СТРАНИЦЫ (ТЁМНАЯ ТЕМА) ===== */

/* Внешнее свечение вокруг главного контейнера */
body.dark-theme .container {
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(118, 75, 162, 0.3),
    0 0 160px rgba(102, 126, 234, 0.15) !important;
  animation: containerGlow 5s ease-in-out infinite alternate;
}

@keyframes containerGlow {
  0% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 80px rgba(118, 75, 162, 0.2),
      0 0 160px rgba(102, 126, 234, 0.1);
  }
  100% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 120px rgba(118, 75, 162, 0.45),
      0 0 200px rgba(102, 126, 234, 0.2);
  }
}

/* Пульсирующий псевдоэлемент для дополнительного свечения */
body.dark-theme .container::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.25) 0%,
    rgba(102, 126, 234, 0.08) 50%,
    transparent 70%
  );
  filter: blur(40px);
  border-radius: 30px;
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.03);
  }
}

/* Свечение для заголовка */
body.dark-theme #greeting {
  text-shadow:
    0 0 20px rgba(118, 75, 162, 0.4),
    0 0 60px rgba(118, 75, 162, 0.2);
}

/* Свечение для таймера */
body.dark-theme #countdown {
  text-shadow:
    0 0 20px rgba(118, 75, 162, 0.3),
    0 0 40px rgba(102, 126, 234, 0.15);
}

body.dark-theme .countdown-container {
  box-shadow: 0 0 30px rgba(118, 75, 162, 0.15);
}

/* Свечение для кнопки "Нажми меня!" */
body.dark-theme .btn-magic {
  box-shadow:
    0 0 30px rgba(118, 75, 162, 0.5),
    0 0 60px rgba(118, 75, 162, 0.2) !important;
  animation: btnGlow 2s ease-in-out infinite alternate;
}

@keyframes btnGlow {
  0% {
    box-shadow:
      0 0 30px rgba(118, 75, 162, 0.4),
      0 0 60px rgba(118, 75, 162, 0.1);
  }
  100% {
    box-shadow:
      0 0 40px rgba(118, 75, 162, 0.7),
      0 0 80px rgba(118, 75, 162, 0.3);
  }
}

/* Свечение для виджета погоды */
body.dark-theme .weather-widget {
  box-shadow: 0 0 20px rgba(118, 75, 162, 0.2);
  border: 1px solid rgba(118, 75, 162, 0.2);
}

/* ===== УСИЛЕННОЕ ФИОЛЕТОВОЕ СВЕЧЕНИЕ ДЛЯ ОСНОВНОГО БЛОКА (ТЁМНАЯ ТЕМА) ===== */

/* Основной контейнер — яркое внешнее свечение */
body.dark-theme .container {
  position: relative;
  box-shadow:
    0 0 60px rgba(118, 75, 162, 0.6),
    0 0 120px rgba(118, 75, 162, 0.4),
    0 0 200px rgba(102, 126, 234, 0.25) !important;
  animation: glowContainer 4s ease-in-out infinite alternate;
}

@keyframes glowContainer {
  0% {
    box-shadow:
      0 0 60px rgba(118, 75, 162, 0.5),
      0 0 120px rgba(118, 75, 162, 0.3),
      0 0 200px rgba(102, 126, 234, 0.15);
  }
  100% {
    box-shadow:
      0 0 80px rgba(118, 75, 162, 0.8),
      0 0 160px rgba(118, 75, 162, 0.5),
      0 0 240px rgba(102, 126, 234, 0.35);
  }
}

/* Дополнительный слой свечения (размытый ореол) */
body.dark-theme .container::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(118, 75, 162, 0.35) 0%,
    rgba(102, 126, 234, 0.15) 40%,
    transparent 70%
  );
  filter: blur(60px);
  border-radius: 40px;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Свечение всей страницы (задний фон) */
body.dark-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
  animation: bgGlow 5s ease-in-out infinite alternate;
}

@keyframes bgGlow {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* ============================================================
   УСИЛЕННЫЙ СТЕКЛЯННЫЙ ЭФФЕКТ ДЛЯ ВКЛАДОК В ТЁМНОЙ ТЕМЕ
   ============================================================ */

/* ---------- КНОПКИ ВКЛАДОК ---------- */
body.dark-theme .tab-btn {
  /* Очень прозрачный фон, почти незаметный */
  background: rgba(255, 255, 255, 0.001) !important;
  /* Сильное размытие */
  backdrop-filter: blur(50px) !important;
  -webkit-backdrop-filter: blur(50px) !important;
  /* Яркая, но полупрозрачная граница - создаёт эффект стекла */
  border: 1px solid rgba(255, 255, 255, 0.001) !important;
  border-bottom: none !important;
  border-radius: 16px 16px 0 0 !important;
  color: rgba(255, 255, 255, 0.1) !important;
  /* Лёгкая внутренняя тень для глубины */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01) !important;
  transition: all 0.3s ease !important;
}

body.dark-theme .tab-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 8px 30px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .tab-btn.active {
  /* Активная вкладка – более плотное стекло */
  background: rgba(118, 75, 162, 0.25) !important;
  backdrop-filter: blur(50px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  border-color: rgba(118, 75, 162, 0.5) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 -4px 30px rgba(118, 75, 162, 0.35) !important;
}

/* ---------- ПАНЕЛЬ ВКЛАДКИ (содержимое) ---------- */
body.dark-theme .tab-panel {
  background: rgba(10, 10, 30, 0.35) !important;
  backdrop-filter: blur(50px) !important;
  -webkit-backdrop-filter: blur(30px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-top: none !important;
  border-radius: 0 0 20px 20px !important;
  box-shadow:
    inset 0 0 60px rgba(118, 75, 162, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.5) !important;
}

/* Стеклянный блик на панели (эффект света) */
body.dark-theme .tab-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  opacity: 0.5;
}

/* ---------- ВЕСЬ КОНТЕЙНЕР ВКЛАДОК ---------- */
body.dark-theme .tabs-container {
  /* Внешнее свечение – фиолетовое, но с усиленным стеклянным ореолом */
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(118, 75, 162, 0.15),
    0 0 160px rgba(102, 126, 234, 0.05) !important;
}

/* Дополнительный световой ореол вокруг контейнера */
body.dark-theme .tabs-container::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: -1;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(118, 75, 162, 0.1) 0%,
    transparent 70%
  );
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   СТЕКЛЯННЫЙ ЭФФЕКТ ТОЛЬКО ДЛЯ ТЁМНОЙ ТЕМЫ
   ============================================================ */

/* ---------- ОСНОВНОЙ КОНТЕЙНЕР ---------- */
body.dark-theme .container {
  /* Прозрачный фон с сильным размытием */
  background: rgba(10, 10, 30, 0.45) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;

  /* Стеклянная рамка */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 28px !important;

  /* Фиолетовое свечение (пульсирующее) */
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(118, 75, 162, 0.3),
    0 0 160px rgba(102, 126, 234, 0.12) !important;
  animation: containerGlow 5s ease-in-out infinite alternate;

  /* Внутренний световой блик */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;

  transition: all 0.4s ease;
}

/* ---------- ВСЕ СЕКЦИИ (включая вкладки) ---------- */
body.dark-theme .section,
body.dark-theme .tab-panel {
  background: rgba(10, 10, 30, 0.3) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;

  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 16px !important;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 20px rgba(0, 0, 0, 0.3) !important;

  transition: all 0.3s ease;
}

/* ---------- КНОПКИ ВКЛАДОК (если используются) ---------- */
body.dark-theme .tab-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
  border-radius: 14px 14px 0 0 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.dark-theme .tab-btn.active {
  background: rgba(118, 75, 162, 0.25) !important;
  border-color: rgba(118, 75, 162, 0.4) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 -4px 30px rgba(118, 75, 162, 0.3) !important;
  color: #fff !important;
}

/* ---------- ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ (виджет погоды, кнопка "Нажми меня!") ---------- */
body.dark-theme .weather-widget {
  background: rgba(10, 10, 30, 0.25) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 0 20px rgba(118, 75, 162, 0.15) !important;
}

body.dark-theme .btn-magic {
  box-shadow:
    0 0 30px rgba(118, 75, 162, 0.5),
    0 0 60px rgba(118, 75, 162, 0.2) !important;
}

body.dark-theme #countdown {
  text-shadow: 0 0 20px rgba(118, 75, 162, 0.4);
}

/* ---------- АНИМАЦИИ ДЛЯ СВЕЧЕНИЯ ---------- */
@keyframes containerGlow {
  0% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 80px rgba(118, 75, 162, 0.2),
      0 0 160px rgba(102, 126, 234, 0.08);
  }
  100% {
    box-shadow:
      0 8px 40px rgba(0, 0, 0, 0.6),
      0 0 120px rgba(118, 75, 162, 0.5),
      0 0 220px rgba(102, 126, 234, 0.2);
  }
}

/* Псевдоэлемент для дополнительного ореола свечения (только тёмная тема) */
body.dark-theme .container::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(118, 75, 162, 0.2) 0%,
    rgba(102, 126, 234, 0.06) 50%,
    transparent 70%
  );
  filter: blur(60px);
  border-radius: 40px;
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.04);
  }
}

.glowing-text {
  color: #00d4ff; /* Цвет текста */
  text-shadow:
    0 0 7px #00d4ff,
    0 0 10px #00d4ff,
    0 0 21px #00d4ff,
    0 0 42px #0fa9e6,
    0 0 82px #0fa9e6,
    0 0 92px #0fa9e6,
    0 0 102px #0fa9e6,
    0 0 151px #0fa9e6;
}

.glow-box {
  background: rgba(255, 255, 255, 0.05); /* Полупрозрачный фон */
  border-radius: 15px;
  box-shadow:
    0 0 20px rgba(0, 212, 255, 0.5),
    /* Внешнее свечение */ inset 0 0 20px rgba(0, 212, 255, 0.2); /* Внутреннее свечение */
  padding: 20px;
  backdrop-filter: blur(10px); /* Стеклянный эффект (опционально) */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pulse-btn {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 252, 241, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(102, 252, 241, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 252, 241, 0);
  }
}

/* Значок в шапке */
.header-logo {
  height: 40px; /* задайте нужную высоту */
  width: auto; /* ширина подстроится пропорционально */
  margin-right: 0.75rem; /* отступ справа от заголовка */
  display: inline-block;
  vertical-align: middle; /* выравнивание по вертикали */
  flex-shrink: 0; /* чтобы не сжимался на маленьких экранах */
}

/* Для тёмной темы – можно инвертировать или затемнить */
body.dark-theme .header-logo {
  filter: brightness(0.8) saturate(1.2);
  /* или filter: invert(1); если логотип тёмный */
}

.header-left {
  display: flex;
  align-items: center; /* вертикальное выравнивание по центру */
  gap: 0.5rem; /* расстояние между элементами */
}

@media (max-width: 640px) {
  .header-logo {
    height: 30px;
  }
}

/* Значок в шапке */
.header-logo {
  height: 50px; /* задайте желаемый размер */
  width: auto;
  flex-shrink: 0; /* не сжимается на узких экранах */
  display: inline-block;
}

/* Выравнивание элементов в .header-left */
.header-left {
  display: flex;
  align-items: center; /* центрируем по вертикали */
  gap: 0.75rem; /* расстояние между значком и текстом */
}

/* Адаптив для мобильных */
@media (max-width: 640px) {
  .header-logo {
    height: 30px;
  }
}

.header-logo {
  width: 50px; /* фиксированная ширина */
  height: 50px; /* такая же высота — для круга */
  border-radius: 50%; /* обрезаем по кругу */
  object-fit: cover; /* изображение заполняет круг, не искажаясь */
  flex-shrink: 0; /* не сжимается */
  display: inline-block;
}

@media (max-width: 640px) {
  .header-logo {
    width: 30px;
    height: 30px;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo {
  width: 60px; /* было 40px */
  height: 60px; /* было 40px */
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem; /* было 0.75rem – можно увеличить до 1.2rem */
}

@media (max-width: 640px) {
  .header-logo {
    width: 40px;
    height: 40px;
  }
  .header-left {
    gap: 0.6rem;
  }
}

/* Попап для иконки – появляется в левом верхнем углу */
.icon-popup {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  max-width: 300px;
  max-height: 80vh;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none; /* скрыт */
}

.icon-popup.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.popup-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  object-fit: contain;
}

/* Тёмная тема – попап темнее */
body.dark-theme .icon-popup {
  background: rgba(30, 30, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

/* Адаптив для маленьких экранов */
@media (max-width: 640px) {
  .icon-popup {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    padding: 10px;
  }
  .popup-content img {
    max-height: 60vh;
  }
}

/* Внутри попапа — обычный курсор, а не кастомный */
.icon-popup,
.icon-popup * {
  cursor: auto !important;
}

.popup-content img {
  cursor: zoom-in !important;
}

.header-logo {
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.12) rotate(6deg);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

/* === ПОПАП ДЛЯ ИКОНКИ === */
.icon-popup {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 20px 20px 16px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  max-width: 320px;
  max-height: 85vh;
  opacity: 0;
  transform: scale(0.8) translateY(-20px);
  pointer-events: none;
  transition:
    opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: auto !important;
}

.icon-popup.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Все элементы внутри попапа — обычный курсор */
.icon-popup * {
  cursor: auto !important;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.popup-content img {
  width: auto;
  height: auto;
  max-width: 280px;
  max-height: 60vh;
  border-radius: 16px;
  object-fit: contain;
  cursor: zoom-in !important;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Анимация при наведении на изображение */
.popup-content img:hover {
  transform: scale(1.04) rotate(1deg);
}

/* Подпись под картинкой */
.popup-caption {
  font-size: 1rem;
  font-weight: 500;
  color: #2d3748;
  text-align: center;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.08);
  border-radius: 40px;
  border: 1px solid rgba(102, 126, 234, 0.15);
  transition: all 0.3s ease;
  width: fit-content;
  margin: 0 auto;
}

body.dark-theme .popup-caption {
  color: #d0d0e8;
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

/* Тёмная тема */
body.dark-theme .icon-popup {
  background: rgba(30, 30, 50, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
}

/* Адаптив */
@media (max-width: 640px) {
  .icon-popup {
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
    padding: 16px;
  }
  .popup-content img {
    max-width: 100%;
    max-height: 55vh;
  }
}

/* === ОБЁРТКА ИКОНКИ === */
.icon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* === УВЕЛИЧЕННАЯ КОПИЯ === */
.icon-zoom {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  min-width: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-zoom img {
  max-width: 160px;
  max-height: 160px;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  display: block;
}

/* Показываем при наведении на обёртку */
.icon-wrapper:hover .icon-zoom {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: none; /* чтобы не мешать клику по иконке */
}

/* Стрелочка-треугольник снизу */
.icon-zoom::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.92);
}

/* Тёмная тема */
body.dark-theme .icon-zoom {
  background: rgba(30, 30, 50, 0.95);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
body.dark-theme .icon-zoom::after {
  border-top-color: rgba(30, 30, 50, 0.95);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 640px) {
  .icon-zoom {
    padding: 8px;
    min-width: 60px;
    min-height: 60px;
    bottom: calc(100% + 10px);
    border-radius: 16px;
  }
  .icon-zoom img {
    max-width: 120px;
    max-height: 120px;
  }
  .icon-zoom::after {
    border-width: 6px;
  }
}
