:root {
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --text-main: #1a1a1a;
  --text-muted: #666666;

  --accent-purple: #6c5ce7;
  --accent-pink: #fd79a8;
  --accent-blue: #0984e3;
  --accent-green: #00b894;
  --accent-orange: #fdcb6e;

  --border: 2px solid #1a1a1a;
  --shadow: 6px 6px 0px #1a1a1a;
  --shadow-hover: 8px 8px 0px #1a1a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(108, 92, 231, 0.1) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(253, 121, 168, 0.1) 0%,
      transparent 40%
    );
}

.top-bar {
  background: #fff;
  color: var(--text-main);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: "JetBrains Mono";
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.panel {
  background: var(--card-bg);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 25px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  transform-style: preserve-3d;
}

.panel:hover {
  box-shadow: var(--shadow-hover);
  transform: translate(-2px, -2px);
}

/* --- Заголовки с иконками --- */
h3 {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: "JetBrains Mono";
  align-self: flex-start;
  color: var(--text-main);
}

.icon {
  width: 20px;
  height: 20px;
  color: var(--accent-purple);
  stroke-width: 2.5;
}

/* --- Hero & Glitch Fix --- */
.panel-hero {
  grid-column: span 2;
  justify-content: center;
  min-height: 250px;
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
}

.glitch-name {
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 10px;
  font-family: "JetBrains Mono", monospace;
  white-space: nowrap;
}

.subtitle {
  font-family: "JetBrains Mono";
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- MBTI Stats --- */
.panel-mbti {
  grid-column: span 2;
}
.mbti-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-row {
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-info {
  flex: 1;
  font-weight: 700;
  font-size: 0.85rem;
}
.stat-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eee;
  height: 10px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}
.stat-bar {
  height: 100%;
  border-radius: 5px;
}
.stat-value {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #333;
}

/* --- NEW: Physique Block Styles (With Image & Outline) --- */
.panel-physique {
  grid-column: span 1;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.physique-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Стилизация картинки: Делаем её черной с обводкой */
.human-img {
  height: 220px; /* Высота человечка */
  width: auto;
  object-fit: contain;

  /* Фильтры: */
  /* invert(1) - делает белый цвет черным */
  /* drop-shadow - создает черную тень вокруг всех краев, имитируя обводку */
  filter: invert(1) drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.8));

  opacity: 0.9;
  transition: all 0.3s ease;
}

.panel-physique:hover .human-img {
  opacity: 1;
  transform: scale(1.05);
  /* При наведении делаем обводку чуть жирнее через тень */
  filter: invert(1) drop-shadow(0px 0px 4px rgba(0, 0, 0, 1));
}

.physique-data {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.data-item {
  position: absolute;
  font-family: "JetBrains Mono";
  font-weight: 700;
  text-align: center;
  transition: transform 0.3s ease;
}

.data-item.height {
  top: 5%; /* Рядом с головой */
  left: 5%;
  color: var(--accent-purple);
}

.data-item.weight {
  bottom: 30%; /* Рядом с поясом */
  right: 5%;
  color: var(--accent-blue);
}

.data-item .label {
  display: block;
  font-size: 0.6rem;
  opacity: 0.7;
  margin-bottom: 2px;
}

.data-item .value {
  display: block;
  font-size: 1.1rem;
}

.panel-physique:hover .data-item {
  transform: scale(1.1);
}

/* --- Preferences Grid --- */
.panel-preferences {
  grid-column: span 1;
  grid-row: span 2;
}
.pref-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.pref-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 6px;
}
.pref-label {
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.pref-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- Soft Skills --- */
.panel-skills {
  grid-column: span 2;
}
.skill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-list li {
  padding: 8px 15px;
  background: white;
  border: 2px solid #1a1a1a;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: "JetBrains Mono";
}
.skill-list li span {
  color: var(--accent-purple);
  margin-right: 5px;
}

/* --- Motto --- */
.panel-motto {
  grid-column: span 2;
  justify-content: center;
  text-align: center;
  background: #fffbe6;
}
.motto-text {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
  font-style: italic;
  color: #333;
}

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-hero,
  .panel-mbti,
  .panel-skills,
  .panel-motto {
    grid-column: span 2;
  }
  .panel-physique,
  .panel-preferences {
    grid-column: span 1;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
  }
  .panel {
    grid-column: span 1 !important;
    grid-row: auto !important;
  }
  .glitch-name {
    font-size: 2.2rem;
  }
}
