* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
  min-height: 100vh;
  color: #1e1e2f;
  padding-bottom: 40px;
}

.glass {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0,0,0,0.02);
}

nav {
  position: sticky;
  top: 20px;
  z-index: 100;
  margin: 20px auto;
  width: fit-content;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 12px 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.logo {
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: 1px;
  color: #2a2a3c;
  text-shadow: 0 1px 4px rgba(255,255,255,0.8);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: #444;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 14px;
  transition: all 0.3s ease;
  background: transparent;
}

nav a.active,
nav a:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

.card {
  padding: 28px;
  margin-bottom: 25px;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-2px);
}

h1, h2, h3 {
  margin-bottom: 18px;
  font-weight: 600;
  color: #1a1a2e;
}

.page-title {
  text-align: center;
  padding: 18px 28px;
  margin-bottom: 35px;
  font-size: 2em;
  color: #1a1a2e;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.member {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  font-weight: 600;
  color: #2a2a3c;
  border: 1px solid rgba(255,255,255,0.9);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.territory-card .card-img {
  width: 100%;
  height: 160px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 16px;
  margin-bottom: 15px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9em;
  border: 1px dashed rgba(0,0,0,0.1);
}

.territory-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.territory-card p {
  margin: 8px 0;
  font-size: 0.95em;
  color: #2d2d3a;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.player-card h3 {
  margin-bottom: 12px;
  color: #1e2746;
  font-weight: 700;
  font-size: 1.3em;
}

.player-card p {
  margin-bottom: 12px;
  color: #333;
}

.player-note {
  font-size: 0.85em;
  color: #555;
  margin-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 8px;
  font-style: italic;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.update-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.date {
  background: rgba(0, 0, 0, 0.04);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  color: #444;
  white-space: nowrap;
  font-weight: 500;
}

.editable,
[contenteditable="true"] {
  display: inline-block;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
  min-width: 80px;
  padding: 2px 8px;
  border-radius: 6px;
  color: #1e1e2f;
  transition: background 0.2s;
}

.editable:focus,
[contenteditable="true"]:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.05);
  border-bottom-color: #555;
}

@media (max-width: 600px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  .cards-grid, .meta-grid {
    grid-template-columns: 1fr;
  }
}

.members-big-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 10px;
}

.member-card h3 {
  margin-bottom: 15px;
  font-size: 1.5em;
  color: #1a1a2e;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-bottom: 8px;
}

.member-card p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #2d2d3a;
}

.member-photo {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.member-photo img:hover {
  transform: scale(1.03);
}

.danger-card {
  position: relative;
  border: 2px solid rgba(255, 80, 0, 0.7);
  animation: firePulse 1.8s infinite ease-in-out;
  box-shadow: 0 0 18px rgba(255, 60, 0, 0.55), 0 0 40px rgba(255, 30, 0, 0.35);
}

@keyframes firePulse {
  0% {
    border-color: rgba(255, 80, 0, 0.7);
    box-shadow: 0 0 18px rgba(255, 60, 0, 0.55), 0 0 40px rgba(255, 30, 0, 0.35);
  }
  50% {
    border-color: rgba(255, 160, 0, 0.95);
    box-shadow: 0 0 28px rgba(255, 100, 0, 0.8), 0 0 60px rgba(255, 50, 0, 0.6);
  }
  100% {
    border-color: rgba(255, 80, 0, 0.7);
    box-shadow: 0 0 18px rgba(255, 60, 0, 0.55), 0 0 40px rgba(255, 30, 0, 0.35);
  }
}

.danger-card .card-img {
  border: 1px solid rgba(255, 100, 0, 0.6);
}

.danger-low {
  color: #2e7d32;
  font-weight: bold;
}
.danger-medium {
  color: #f57f17;
  font-weight: bold;
}
.danger-high {
  color: #d84315;
  font-weight: bold;
}
.danger-extreme {
  color: #b71c1c;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255,0,0,0.5);
}

a.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, filter 0.2s;
}
a.card-link:hover {
  transform: translateY(-4px);
  filter: brightness(1.02);
}
a.card-link .card {
  height: 100%;
}

.meta-section {
  margin-top: 30px;
}
.meta-list {
  padding-left: 20px;
  line-height: 1.8;
}
.meta-list li {
  margin-bottom: 6px;
}

.site-footer {
  text-align: center;
  padding: 20px;
  margin: 40px auto 20px auto;
  max-width: 1100px;
  font-size: 0.9em;
  color: #555;
  border-radius: 20px;
}
.site-footer p {
  margin: 5px 0;
}

/* Цвета для стиля бега (только цвет текста, без background) */
.run-legendary {
  color: #cc0000;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(255,0,0,0.4);
}
.run-high {
  color: #e65100;
  font-weight: bold;
}
.run-medium {
  color: #f57f17;
  font-weight: bold;
}
.run-low {
  color: #827717;
  font-weight: bold;
}
.run-verylow {
  color: #33691e;
  font-weight: bold;
}

/* Цвета для умения прятаться (только цвет текста) */
.hide-legendary {
  color: #6a1b9a;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(106,27,154,0.5);
}
.hide-high {
  color: #283593;
  font-weight: bold;
}
.hide-low {
  color: #b71c1c;
  font-weight: bold;
}

/* Индикатор уведомлений для кнопки Чата */
#chatLink.has-notifications {
    position: relative;
}
#chatLink.has-notifications::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e53935;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 6px rgba(229,57,53,0.6);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0% { box-shadow: 0 0 6px rgba(229,57,53,0.6); }
    50% { box-shadow: 0 0 14px rgba(229,57,53,0.9); }
    100% { box-shadow: 0 0 6px rgba(229,57,53,0.6); }
}

#chatLink.has-notifications {
    position: relative;
}

#chatLink.has-notifications {
    position: relative;
}
#chatLink.has-notifications::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -12px;
    background: #e53935;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0% { box-shadow: 0 0 6px rgba(229,57,53,0.6); }
    50% { box-shadow: 0 0 14px rgba(229,57,53,0.9); }
    100% { box-shadow: 0 0 6px rgba(229,57,53,0.6); }
}

a.raid-btn {
  display: inline-block;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(12px);
  border: 2px solid #b71c1c;
  color: #b71c1c;
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.3s;
}
a.raid-btn:hover {
  background: #b71c1c;
  color: white;
}