/* 
   GPAGES.CSS
   Стили для внутренних страниц
   
    */

/* Активный пункт меню */
.sidebar-link.active {
  color: var(--cyan);
  border-color: var(--border-blue);
  background: rgba(0,229,255,0.05);
}

/*  ШАПКА СТРАНИЦЫ  */
.page-hero {
  position: relative;
  padding: 60px 24px 40px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-blue);
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,58,107,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,58,107,0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; }

.breadcrumb {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--cyan); }
.breadcrumb a:hover { text-decoration: underline; }

.page-title {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 4vw, 32px);
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(0,229,255,0.4);
}
.page-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: 1px;
  max-width: 500px;
  margin: 0 auto;
}

/*  КОНТЕНТ  */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 24px 80px;
  position: relative;
  z-index: 1;
  flex: 1;
}

/*  БЛОКИ КОНТЕНТА  */
.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  padding: 32px 28px;
  margin-bottom: 24px;
  position: relative;
  animation: fadeInUp 0.5s ease both;
}
.content-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 2px;
}
.content-block.green-accent::before  { background: var(--green); }
.content-block.yellow-accent::before { background: var(--yellow); }
.content-block.cyan-accent::before   { background: var(--cyan); }
.content-block.pink-accent::before   { background: var(--pink); }
.content-block.purple-accent::before { background: var(--accent); }

.block-title {
  font-family: var(--font-pixel);
  font-size: clamp(10px, 2vw, 13px);
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.block-text {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--text-main);
  line-height: 2.2;
}

/*  ШАГИ  */
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.step-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.step-num {
  font-family: var(--font-pixel);
  font-size: 18px;
  min-width: 36px;
  line-height: 1;
  margin-top: 2px;
}
.step-body { flex: 1; }
.step-title {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  line-height: 1.8;
}
.step-desc {
  font-family: var(--font-pixel);
  font-size: 15px;
  color: var(--text-dim);
  line-height: 2;
}

/*  УПРАВЛЕНИЕ  */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.control-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-blue);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.control-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: rgba(42,95,191,0.12);
}
.control-card kbd {
  font-family: var(--font-pixel);
  font-size: 9px;
  padding: 6px 10px;
  border: 1px solid var(--border-glow);
  background: rgba(42,95,191,0.2);
  color: var(--text-bright);
  white-space: nowrap;
  flex-shrink: 0;
}
.control-card span {
  font-family: var(--font-pixel);
  font-size: clamp(6px, 0.55vw, 8px);
  color: var(--text-main);
  white-space: nowrap;
  min-width: 0;
}

/*  КАРТОЧКИ ТЕМ (Теория)  */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.topic-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-blue);
  padding: 20px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.topic-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic-emoji { font-size: 28px; margin-bottom: 10px; }
.topic-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.topic-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.topic-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-pixel);
  font-size: 7px;
  padding: 3px 6px;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  letter-spacing: 0.5px;
}

/*  КЛИКАБЕЛЬНЫЕ КАРТОЧКИ ТЕМ  */
.topic-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
}
.topic-card-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.topic-card-link .topic-name { transition: color 0.2s; }
.topic-card-link:hover .topic-name { color: var(--cyan); }

.topic-arrow {
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 16px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.topic-card-link:hover .topic-arrow {
  opacity: 1;
  transform: translateX(0);
}


.wip-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid var(--yellow);
  background: rgba(245,216,0,0.05);
  margin-bottom: 28px;
}
.wip-banner-icon { font-size: 24px; flex-shrink: 0; }
.wip-banner-text { font-size: 14px; color: var(--text-main); line-height: 1.6; }
.wip-banner-text strong {
  color: var(--yellow);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
}

/*  КОМАНДА (О нас)  */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
  justify-items: center;
}
/* Если 3 карточки и третья переносится - центрируем её */
.team-card:nth-child(3):last-child {
  grid-column: 1 / -1;
  max-width: 320px;
  justify-self: center;
}
.team-card {
  background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(26,58,107,0.3) 100%);
  border: 2px solid var(--border-blue);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 
    0 8px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Пиксельные уголки */
.team-card::before, .team-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-style: solid;
  border-width: 2px;
  transition: all 0.3s ease;
}
.team-card::before {
  top: 12px;
  left: 12px;
  border-color: var(--cyan) transparent transparent var(--cyan);
}
.team-card::after {
  bottom: 12px;
  right: 12px;
  border-color: transparent var(--accent) var(--accent) transparent;
}

/* Hover эффект — парение */
.team-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--cyan);
  box-shadow: 
    0 16px 40px rgba(0,229,255,0.25),
    0 0 30px rgba(0,229,255,0.15),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.team-card:hover::before {
  border-color: var(--yellow) transparent transparent var(--yellow);
  transform: translate(-2px, -2px);
}
.team-card:hover::after {
  border-color: transparent var(--pink) var(--pink) transparent;
  transform: translate(2px, 2px);
}

/* Изображение */
.team-card img {
  display: block;
  margin: 0 auto 20px;
  border: 3px solid var(--border-blue);
  box-shadow: 
    0 4px 12px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.05);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.team-card:hover img {
  transform: scale(1.05);
  border-color: var(--cyan);
  box-shadow: 
    0 8px 24px rgba(0,229,255,0.4),
    inset 0 0 0 1px rgba(0,229,255,0.2);
}

/* Имя */
.team-name {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  position: relative;
  text-shadow: 0 0 10px rgba(0,229,255,0.5);
  transition: color 0.3s ease;
}
.team-card:hover .team-name {
  color: var(--cyan);
  text-shadow: 0 0 15px rgba(0,229,255,0.8);
}

/* Роль */
.team-role {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.team-card:hover .team-role {
  opacity: 1;
  color: var(--yellow);
}

/*  СТАТИСТИКА  */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.stat-box {
  flex: 1;
  min-width: 110px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-blue);
  padding: 20px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-pixel);
  font-size: 22px;
  display: block;
  margin-bottom: 8px;
}
.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }

/*  PROFILE PROGRESS CHART  */
.profile-progress {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-progress-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-progress-text {
  font-size: 10px;
  color: var(--text-main);
  line-height: 1.8;
}

.profile-progress-chip {
  font-size: 8px;
  color: var(--green);
  border: 1px solid rgba(57,255,20,0.4);
  background: rgba(57,255,20,0.08);
  padding: 8px 10px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.profile-progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.profile-progress-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  color: var(--text-main);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.profile-progress-legend-item.is-dimmed {
  opacity: 0.4;
  filter: grayscale(0.2);
}

.profile-progress-swatch {
  width: 12px;
  height: 12px;
  background: var(--swatch);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.profile-progress-stage {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(0,229,255,0.18);
  background:
    radial-gradient(circle at top, rgba(0,229,255,0.12), transparent 34%),
    linear-gradient(180deg, rgba(10, 25, 47, 0.72), rgba(8, 12, 20, 0.94)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.02) 0 1px,
      transparent 1px 18px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.02) 0 1px,
      transparent 1px 18px
    );
  overflow: hidden;
}

.profile-progress-stage::before,
.profile-progress-stage::after,
.profile-progress-stage > .profile-progress-tooltip::before {
  content: '';
  position: absolute;
  pointer-events: none;
}

.profile-progress-stage::before,
.profile-progress-stage::after {
  width: 12px;
  height: 12px;
  border: 2px solid var(--green);
  pointer-events: none;
}

.profile-progress-stage::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.profile-progress-stage::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}

.profile-progress-stage > .profile-progress-tooltip::before {
  inset: -2px -2px auto -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.7), transparent);
}

.profile-progress-svg {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.profile-progress-frame {
  fill: rgba(13,22,38,0.82);
  stroke: rgba(0,229,255,0.3);
  stroke-width: 2;
  shape-rendering: crispEdges;
}

.profile-progress-grid {
  stroke: rgba(0,229,255,0.14);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.profile-progress-grid--v {
  stroke: rgba(255,255,255,0.06);
}

.profile-progress-label,
.profile-progress-tag {
  fill: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.profile-progress-line,
.profile-progress-point {
  shape-rendering: crispEdges;
}

.profile-progress-hit {
  fill: transparent;
  pointer-events: all;
}

.profile-progress-toggle {
  display: inline-flex;
  border: 1px solid rgba(0,229,255,0.22);
  background: rgba(0,0,0,0.25);
}

.profile-progress-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  padding: 9px 12px;
  font-size: 7px;
  letter-spacing: 1px;
  cursor: pointer;
}

.profile-progress-toggle-btn.is-active {
  background: rgba(0,229,255,0.12);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,0.3);
}

.profile-progress-toggle-btn:hover {
  color: var(--text-bright);
}

.profile-progress-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.profile-progress-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.profile-progress-card {
  border: 1px solid rgba(0,229,255,0.16);
  background: rgba(0,0,0,0.28);
  padding: 14px 12px;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.profile-progress-card.is-dimmed {
  opacity: 0.42;
}

.profile-progress-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-progress-card-name {
  font-size: 8px;
  color: var(--text-main);
  line-height: 1.6;
}

.profile-progress-card-value {
  font-size: 18px;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.profile-progress-card-meta {
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.profile-progress-empty {
  border: 1px dashed rgba(0,229,255,0.2);
  padding: 18px;
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1.9;
  text-align: center;
}

.profile-progress-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 140px;
  max-width: 220px;
  border: 1px solid rgba(0,229,255,0.28);
  background: rgba(5, 12, 24, 0.94);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  padding: 10px 12px 9px;
  font-size: 7px;
  color: var(--text-main);
  line-height: 1.8;
  letter-spacing: 0.6px;
}

.profile-progress-tooltip strong,
.profile-progress-tooltip span {
  display: block;
}

.profile-progress-tooltip strong {
  color: var(--text-bright);
  margin-bottom: 2px;
}

/*  RESPONSIVE  */
@media (max-width: 600px) {
  .content-block { padding: 22px 16px; }
  .page-content { padding: 32px 16px 60px; }
  .controls-grid,
  .topics-grid,
  .team-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; }
  .page-hero { padding: 36px 14px 26px; }
  .breadcrumb { font-size: 7px; line-height: 1.8; }
  .page-title { letter-spacing: 2px; }
  .page-subtitle { font-size: 12px; line-height: 1.6; }
  .block-text { font-size: 12px; line-height: 2; }
  .step-item { gap: 12px; }
  .step-num { font-size: 13px; min-width: 26px; }
  .step-title { font-size: 11px; line-height: 1.6; }
  .step-desc { font-size: 11px; line-height: 1.8; }
  .team-card { padding: 22px 16px; width: 100%; max-width: 100%; }
  .team-card img { width: min(100%, 200px) !important; height: auto !important; aspect-ratio: 1 / 1; }
  .wip-banner { padding: 14px; gap: 10px; }
  .wip-banner-text { font-size: 12px; }
  .theory-modal-close { width: 44px; height: 44px; }
  .btn-theory-close { min-height: 44px; width: 100%; }
  .code-block pre { font-size: 12px; }
  .profile-progress-head { align-items: flex-start; }
  .profile-progress-text { font-size: 8px; }
  .profile-progress-controls { width: 100%; justify-content: space-between; }
  .profile-progress-chip { font-size: 7px; }
  .profile-progress-toggle-btn { padding: 8px 10px; }
  .profile-progress-stage { padding: 10px 8px 8px; }
  .profile-progress-label,
  .profile-progress-tag { font-size: 7px; }
  .profile-progress-axis {
    font-size: 7px;
    line-height: 1.6;
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-progress-card-value { font-size: 15px; }
  
  .types-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .type-card {
    padding: 14px 12px;
  }
}

@media (max-width: 420px) {
  .topics-grid,
  .controls-grid,
  .types-grid { grid-template-columns: 1fr; }
  .theory-modal-content { width: 98%; max-height: 96vh; }
  .theory-modal-body { padding: 14px; }
  .theory-modal-header { padding: 24px 14px 16px; }
  .theory-emoji-big { font-size: 42px; }
}

/* 
   МОДАЛЬНОЕ ОКНО ТЕОРИИ
    */
.theory-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.theory-modal.active {
  opacity: 1;
  pointer-events: all;
}

/* Тёмная подложка */
.theory-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

/* Контейнер окна */
.theory-modal-content {
  position: relative;
  z-index: 10000;
  max-width: 800px;
  max-height: 90vh;
  width: 90%;
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.95) 0%, rgba(26, 58, 107, 0.9) 100%);
  border: 2px solid var(--cyan);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(0, 229, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow-y: auto;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from { transform: translateY(-50px) scale(0.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Кнопка закрытия */
.theory-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--pink);
  color: var(--pink);
  font-family: var(--font-pixel);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.theory-modal-close:hover {
  background: var(--pink);
  color: var(--bg-dark);
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

/* Шапка модалки */
.theory-modal-header {
  padding: 40px 32px 24px;
  text-align: center;
  border-bottom: 2px solid var(--border-blue);
  position: relative;
}
.theory-modal-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 50%, transparent);
}
.theory-emoji-big {
  font-size: 64px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.theory-title {
  font-size: clamp(18px, 4vw, 28px);
  letter-spacing: 3px;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
  margin-bottom: 8px;
}
.theory-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* Тело модалки */
.theory-modal-body {
  padding: 32px;
}

/* Секции теории */
.theory-section {
  margin-bottom: 32px;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-blue);
}
.section-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 16px;
}
.section-text strong {
  color: var(--text-bright);
  font-weight: 700;
}
.section-text code {
  font-family: var(--font-pixel);
  font-size: 14px;
  padding: 2px 6px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--cyan);
}

/* Блок кода */
.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-blue);
  padding: 16px;
  margin: 16px 0;
  position: relative;
  overflow-x: auto;
}
.code-header {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 8px;
  padding: 3px 8px;
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  letter-spacing: 1px;
}
.code-block pre {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}
.code-block code {
  display: block;
}
.code-comment { color: #6c757d; font-style: italic; }
.code-var     { color: var(--cyan); }
.code-string  { color: var(--green); }
.code-num     { color: var(--yellow); }
.code-bool    { color: var(--pink); }
.code-func    { color: var(--accent); }
.code-interp  { color: var(--yellow); }

/* Информационный блок */
.info-box {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid;
  margin: 16px 0;
  background: rgba(0, 0, 0, 0.3);
}
.info-box.yellow { border-color: var(--yellow); background: rgba(245, 216, 0, 0.05); }
.info-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.info-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}
.info-text strong {
  color: var(--yellow);
  font-weight: 700;
}

/* Сетка типов данных */
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.type-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-blue);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.type-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
}
.type-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.type-name {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 6px;
}
.type-desc {
  font-size: 10px;
  font-family: var(--font-pixel);
  color: var(--text-dim);
  margin-bottom: 8px;
}
.type-example {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--yellow);
}

/* Блок задания */
.challenge-box {
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--yellow);
  padding: 20px;
  margin-top: 16px;
}
.challenge-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.challenge-icon {
  font-size: 24px;
}
.challenge-text {
  font-size: 15px;
  font-family: var(--font-pixel);
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 12px;
}
.challenge-hint {
  margin-top: 12px;
  cursor: pointer;
}
.challenge-hint summary {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 8px 12px;
  background: rgba(155, 114, 255, 0.1);
  border: 1px solid var(--accent);
  list-style: none;
  transition: background 0.2s;
}
.challenge-hint summary:hover {
  background: rgba(155, 114, 255, 0.2);
}
.challenge-hint[open] summary {
  margin-bottom: 12px;
}

/* Футер модалки */
.theory-modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-blue);
  text-align: center;
}
.btn-theory-close {
  font-size: 11px;
  padding: 12px 32px;
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s ease;
}
.btn-theory-close:hover {
  background: var(--cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

/* Responsive */
@media (max-width: 600px) {
  .theory-modal-content { width: 95%; max-height: 95vh; }
  .theory-modal-body { padding: 20px; }
  .theory-modal-header { padding: 30px 20px 20px; }
  .types-grid { grid-template-columns: 1fr 1fr; }
}

#pixelsBgCanvas { position: fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; }

/* Profile: per-game cards */
.profile-game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.profile-game-card {
    background: rgba(0,229,255,0.04);
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 4px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-game-card--empty {
    opacity: 0.5;
}
.pgc-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.pgc-swatch {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    flex-shrink: 0;
}
.pgc-name {
    font-size: 7px;
    color: rgba(224,247,250,0.8);
    line-height: 1.5;
}
.pgc-score {
    font-size: 18px;
    line-height: 1.1;
    margin-top: 2px;
}
.pgc-score--none {
    color: rgba(0,229,255,0.3) !important;
}
.pgc-meta {
    font-size: 7px;
    color: rgba(224,247,250,0.45);
    line-height: 1.6;
}

/* Profile: history */
.profile-history {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}
.profile-history-row {
    display: grid;
    grid-template-columns: 10px 1fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(0,229,255,0.07);
}
.profile-history-row:last-child {
    border-bottom: none;
}
.ph-dot {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    flex-shrink: 0;
}
.ph-game {
    font-size: 7px;
    line-height: 1.5;
}
.ph-score {
    font-size: 8px;
    color: #e0f7fa;
    white-space: nowrap;
    text-align: right;
}
.ph-date {
    font-size: 7px;
    color: rgba(224,247,250,0.4);
    white-space: nowrap;
    text-align: right;
    min-width: 90px;
}
@media (max-width: 520px) {
    .profile-game-cards {
        grid-template-columns: 1fr 1fr;
    }
    .profile-history-row {
        grid-template-columns: 8px 1fr auto;
        grid-template-rows: auto auto;
    }
    .ph-date {
        grid-column: 2 / -1;
        text-align: left;
        min-width: 0;
    }
}
