:root {
  --bg: #0d1117;
  --text: #a8b2c1;
  --primary: #58a6ff;
  --accent: #79c0ff;
  --primary-rgb: 88, 166, 255;
  --accent-rgb: 121, 192, 255;
  --ascii-rgb: 121, 192, 255;
  --border: #30363d;
  --highlight: #1f2937;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace; /* Было: 'IBM Plex Mono' */
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ASCII Background */
.ascii-vines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  line-height: 1.2;
  color: rgba(var(--ascii-rgb), 0.3);
  text-shadow: 0 0 8px rgba(var(--ascii-rgb), 0.5);
  white-space: pre;
  overflow: hidden;
  opacity: 0.45;
}

@media (max-width: 640px) {
  .ascii-vines {
    font-size: clamp(1.2rem, 2vw, 1.8rem) !important;
    opacity: 0.2;
    text-shadow: 0 0 5px rgba(var(--ascii-rgb), 0.3) !important;
  }
}

/* Scan Overlay */
.scan-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 4px;
  opacity: 0.3;
}

/* Pulse Noise */
.pulse-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.2; }
}

/* Page Container */
.page {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
.project-header {
  text-align: left;
  margin-bottom: 0.5rem;
  /* Уменьшен нижний отступ с 3rem до 1.5rem, чтобы подтянуть кнопки ближе */
  padding: 2rem 0 0.5rem 0; 
  /* Убрана линия border-bottom */
  position: relative;
}

.project-header h1 {
  font-family: "Rubik 80s Fade", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: #f0f6fc;
  
  /* Запускаем анимацию glowPulse */
  animation: glowPulse 3s ease-in-out infinite alternate;
  
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-align: left;
}

/* Ключевые кадры для плавного изменения интенсивности свечения */
@keyframes glowPulse {
  0% {
    text-shadow: 
      0 0 10px rgba(240, 246, 252, 0.6),
      0 0 25px rgba(88, 166, 255, 0.4),
      0 0 50px rgba(88, 166, 255, 0.2);
  }
  100% {
    text-shadow: 
      0 0 15px rgba(240, 246, 252, 1),
      0 0 40px rgba(88, 166, 255, 0.7),
      0 0 80px rgba(88, 166, 255, 0.4),
      0 0 120px rgba(88, 166, 255, 0.15);
  }
}

.project-header .subtitle {
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
  /* Добавлен небольшой отступ снизу от подзаголовка до кнопок */
  margin-bottom: 0.5rem; 
}

/* Tabs Navigation */
.tabs {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  padding-left: 0;
}

.tab {
  background: rgba(13, 17, 23, 0.65) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--border) !important;
  color: var(--text);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
}

.tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

.tab.active {
  background: rgba(88, 166, 255, 0.1) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  text-shadow: 0 0 12px rgba(var(--primary-rgb), 0.6);
}

/* Sub-tabs */
.logs-sub-tabs,
.music-sub-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding-left: 0;
}

.music-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.music-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

.music-tab.active {
  background: rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
}

.log-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.log-tab-content.active {
  display: block;
}

/* Soundtrack Category Dropdown */
.soundtrack-dropdown {
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.soundtrack-dropdown.visible {
  opacity: 1;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.dropdown-header:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dropdown-header.active {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-content.open {
  max-height: 2500px;
}

.dropdown-content-inner {
  padding: 0.75rem;
  border-left: 2px solid var(--border);
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Status Line - Единый стиль для ПК и Mobile */
.status-wrap {
  position: sticky; /* На ПК липкий, на мобильном станет фиксированным */
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  
  /* Прозрачность как у .panel (rgba(13, 17, 23, 0.85)) */
  background: rgba(13, 17, 23, 0.85); 
  backdrop-filter: blur(5px); /* Размытие как у .panel */
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4); /* Тень как у .panel */
}

.status-line {
  font-size: 0.85rem;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
  letter-spacing: 0.05em;
  margin: 0;
}

/* Audio Controls */
.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sfx-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.sfx-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sfx-toggle[aria-pressed="true"] {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

.master-volume-shell {
  position: relative;
  display: inline-block;
  min-width: 90px;
}

.master-volume-btn {
  margin-right: 0;
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  text-transform: uppercase;
  white-space: nowrap;
}

.master-volume-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.master-volume-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 100%;
  background: rgba(13, 17, 23, 0.98);
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.master-volume-pop::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  width: 100%;
  height: 6px;
}

.master-volume-pop.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Volume Slider */
.volume-range {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 85% !important;
  height: 2px !important;
  background: var(--border) !important;
  cursor: pointer !important;
  outline: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  display: block !important;
}

.volume-range::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 10px !important;
  height: 10px !important;
  background: var(--primary) !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.8) !important;
  margin-top: -4px !important;
}

.volume-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px rgba(var(--primary-rgb), 1) !important;
}

.volume-range::-webkit-slider-runnable-track {
  width: 100% !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--primary) 0%, var(--border) 0%) !important;
  background-size: var(--progress, 60%) 100% !important;
  background-repeat: no-repeat !important;
  border: none !important;
}

.volume-range::-moz-range-thumb {
  width: 10px !important;
  height: 10px !important;
  background: var(--primary) !important;
  cursor: pointer !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.8) !important;
  margin-top: -4px !important;
}

.volume-range::-moz-range-track {
  width: 100% !important;
  height: 2px !important;
  background: var(--border) !important;
}

/* Panels */
.panel {
  display: none;
  min-height: 300px;
  padding: 2rem;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Terminal Text */
.terminal-text {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--text);
  /* Базовое свечение текста */
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.4), 0 0 12px rgba(var(--accent-rgb), 0.2);
  /* Анимация мерцания: 4 секунды, бесконечно, плавная синусоида */
  animation: textFlicker 4s ease-in-out infinite alternate;
}

@keyframes textFlicker {
  0% {
    opacity: 0.95;
    text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.4), 0 0 12px rgba(var(--accent-rgb), 0.2);
  }
  25% {
    opacity: 0.85;
    text-shadow: 0 0 6px rgba(var(--primary-rgb), 0.3), 0 0 10px rgba(var(--accent-rgb), 0.15);
  }
  50% {
    opacity: 0.98;
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5), 0 0 14px rgba(var(--accent-rgb), 0.25);
  }
  75% {
    opacity: 0.9;
    text-shadow: 0 0 7px rgba(var(--primary-rgb), 0.35), 0 0 11px rgba(var(--accent-rgb), 0.18);
  }
  100% {
    opacity: 0.96;
    text-shadow: 0 0 9px rgba(var(--primary-rgb), 0.45), 0 0 13px rgba(var(--accent-rgb), 0.22);
  }
}

.cursor {
  display: inline-block;
  width: 6px; /* В 2 раза тоньше */
  height: 1.1rem;
  background: var(--primary);
  margin-left: 2px;
  opacity: 0.8; /* Полупрозрачный */
  animation: blink 1s step-end infinite; /* В 2 раза быстрее */
  vertical-align: text-bottom;
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.8);
}

@keyframes blink {
  0%, 50% { opacity: 0.7; }
  51%, 100% { opacity: 0; }
}

/* Links */
.inline-link {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
  transition: all 0.2s ease;
}

.inline-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
}

/* Copy Buttons */
.copy-mention {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  transition: all 0.2s ease;
}

.copy-mention:hover {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.6);
}

/* Music List */
.music-list {
  display: grid;
  gap: 1rem;
}

.track {
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.track:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.2);
}

.track-title {
  color: var(--primary);
  font-size: 0.75rem;
  margin: 0;
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.track-btns {
  display: flex;
  gap: 0.35rem;
}

.track-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.65rem;
  transition: all 0.2s ease;
  text-transform: uppercase;
  width: 36px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.play-btn.is-playing {
  background: rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* Принудительное текстовое отображение иконок на всех устройствах */
.play-btn::before,
.play-btn.is-playing::before,
.stop-btn::before {
  /* Явно указываем моноширинный шрифт сайта, чтобы избежать системных эмодзи-шрифтов */
  font-family: 'IBM Plex Mono', monospace !important; 
  
  /* Сбрасываем нативную раскраску эмодзи в WebKit-браузерах (iOS/Android Chrome) */
  -webkit-text-fill-color: var(--text) !important;
  color: var(--text) !important;
  
  /* Фиксируем размер в px для стабильности рендеринга */
  font-size: 0.65rem !important;
  font-weight: bold;
}

/* Специфичные символы с встроенным модификатором текста */
.play-btn::before {
  content: '▶︎' !important; /* U+25B6 + U+FE0E */
}

.play-btn.is-playing::before {
  content: '' !important;
  display: inline-block;
  
/* Чуть-чуть уменьшили габариты (было 0.8em на 1em) */
  width: 0.65em !important;
  height: 0.85em !important;
  
  /* Толщина палочек тоже высчитывается пропорционально */
  border-left: 0.25em solid currentColor !important;
  border-right: 0.25em solid currentColor !important;
  
  background: transparent !important;
  box-sizing: border-box !important;
  
  /* Выравнивание по центру относительно текста */
  vertical-align: middle; 
}

.stop-btn::before {
  content: '■︎' !important; /* U+25A0 + U+FE0E */
}

.seek-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  /* Вот здесь мы меняем статический фон на динамический градиент */
  background: linear-gradient(to right, var(--primary) var(--progress, 0%), var(--border) var(--progress, 0%));
  cursor: pointer;
  outline: none;
  border: none;
  padding: 0;
  margin: 0;
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  background: var(--primary);
  cursor: pointer;
  border: none;
  border-radius: 0;
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.8);
  margin-top: -3px;
}

.seek::-moz-range-thumb {
  width: 8px;
  height: 8px;
  background: var(--primary);
  cursor: pointer;
  border: none;
  border-radius: 0;
  box-shadow: 0 0 6px rgba(var(--primary-rgb), 0.8);
}

.track-time {
  font-size: 0.6rem;
  color: var(--accent);
  min-width: 65px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.empty {
  text-align: center;
  color: var(--text);
  opacity: 0.6;
  padding: 3rem;
}

/* Visual Grid */
.visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.visual-item {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  aspect-ratio: 1;
}

.visual-item:hover {
  border-color: var(--primary);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

.visual-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.load-more-visuals {
  width: 100%;
  margin-top: 1rem;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}

.load-more-visuals:hover {
  background: rgba(var(--primary-rgb), 0.1);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;            /* Включаем флекс */
  flex-direction: column;   /* Вертикальное направление */
  height: 100%;             /* Занимаем всю высоту ячейки сетки */
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.25);
}

.project-card-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--highlight);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-cover img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.25rem;
  flex: 1;                  /* Растягиваем блок информации, толкая кнопку вниз */
  display: flex;
  flex-direction: column;
}

.project-title {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
  font-weight: 600;
}

.project-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.9;
}

.project-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-links {
  margin-top: auto;         /* Дополнительная страховка для прижатия к низу */
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 0;
}

.project-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

/* Own Music Grid */
.own-music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.own-music-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.own-music-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.25);
}

.own-music-cover {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--highlight);
}

.own-music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.own-music-card:hover .own-music-cover img {
  transform: scale(1.05);
}

.own-music-info {
  padding: 1.25rem;
  flex: 1;                  /* Растягиваем контент */
  display: flex;
  flex-direction: column;
}

.own-music-title {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
  font-weight: 600;
}

.release-link {
  margin-top: auto;         /* Прижимаем кнопку к низу */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
  width: 100%;
}

.release-link:hover {
  background: rgba(var(--primary-rgb), 0.15);
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.6);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.4);
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  z-index: 1001;
}

.close-lightbox:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .page { padding: 1rem; }

  /* Фиксация статус-бара строго вверху */
  .status-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    background: rgba(13, 17, 23, 0.95) !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }

  .status-line {
    font-size: 0.68rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  .audio-controls {
    display: flex;
    justify-content: flex-end !important; /* ВАЖНО: выстраиваем кнопки слева направо */
    gap: 0.5rem;
    width: 100%;
  }

  /* Отключаем тяжелые эффекты ТОЛЬКО для тяжелых элементов */
  .panel, .track, .own-music-card, .project-card {
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  /* Вкладки в 2 ряда по 2 кнопки */
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0rem;
    width: 100%;
  }
  
  .tab {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    min-height: 3.4em;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logs-sub-tabs,
  .music-sub-tabs { gap: 0.25rem; margin-bottom: 0.75rem; justify-content: flex-start; }
  .music-tab { padding: 0.4rem 0.75rem; font-size: 0.7rem; }
  .dropdown-header { padding: 0.6rem 0.85rem; font-size: 0.75rem; }
  
  .sfx-toggle, .master-volume-btn { padding: 0.4rem 0.75rem; font-size: 0.7rem; }
  .master-volume-shell { min-width: 75px; }
  
  .panel { padding: 1rem; margin-top: 1rem !important; }
  .visual-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .projects-grid { grid-template-columns: 1fr; }
  .own-music-grid { grid-template-columns: 1fr; }
  .project-header { padding: 4.5rem 0 1rem 0 !important; }
  
  /* Оптимизации производительности (без убийства стилей текста) */
  .scan-overlay, .pulse-noise { animation: none !important; }
  .tab, .music-tab, .play-btn { transition: none !important; }
  .project-card:hover, .own-music-card:hover, .visual-item:hover { transform: none !important; }
  .project-card-cover img, .own-music-cover img { transform: none !important; }
  .cursor { display: none !important; }

  /* ВАЖНО: Исключаем .copy-mention из глобального сброса теней и анимаций */
  h1, .subtitle, .terminal-text, .interactive, p, span {
    animation-name: none !important;
    text-shadow: 0 0 8px rgba(121, 192, 255, 0.4) !important;
  }
  
  /* Возвращаем кнопкам копирования их родные стили */
  .copy-mention {
    animation-name: inherit !important;
    text-shadow: none !important; /* Убираем навязанное серое свечение */
    color: var(--accent) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    transition: color 0.2s ease, text-shadow 0.2s ease !important;
  }

  .copy-mention:hover {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.6) !important;
  }
  
  .project-header h1 {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.9), 
                 0 0 25px rgba(88, 166, 255, 0.7), 
                 0 0 45px rgba(88, 166, 255, 0.4) !important;
  }
}

/* Защита для панели контактов (оставляем как было) */
#contactsPanel, 
#contactsTypewriter {
  position: relative !important;
  z-index: 100 !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

