:root {
  --index: calc(1vw + 1vh);
  --primary: #6C8EBF;
  --secondary: #5B7A9D;
  --background: #1A1A1A;
  --text: #E0E0E0;
  --accent: #ff5247;
  --success: #7AA874;
}

[data-theme="light"] {
  --primary: #3F6797;
  --secondary: #5B7A9D;
  --background: #F5F5F5;
  --text: #2A2A2A;
  --accent: #1A5FB4;
  --success: #5D9C59;
}

body {
  /*overflow-x: hidden;*/
  background: var(--background);
  color: var(--text);
  transition: all 0.3s ease;
  line-height: 1.7;
}

::-webkit-scrollbar {
  background-color: var(--body);
  width: 4px;
  background-color: #262626;
}

::-webkit-scrollbar:hover {
  background-color: #262626;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #ff7b36;
}

::-webkit-scrollbar-thumb:hover {
  background: #515151;
}

/* Навигация */

.navbar {
  background: rgba(var(--primary-rgb), 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #6c6b6b;
}

/* Герой-секция */

.hero-section {
  padding: 120px 0 80px;
  background: linear-gradient(45deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.05) );
}

/* Карточки */

/* Анимации */

[data-aos] {
  transition: opacity 0.6s, transform 0.6s;
}

.aos-fade {
  opacity: 0;
  transform: translateY(20px);
}

.aos-fade.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Временная шкала */

.timeline {
  position: relative;
  padding-left: 40px;
  margin-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--primary);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--background);
  border: 2px solid var(--primary);
  border-radius: 50%;
}

/* Дополнительные стили */

.member-card {
  position: relative;
  overflow: visible;
}

.member-card:hover .avatar-wrapper img {
  transform: rotateY(180deg);
}

.avatar-wrapper img {
  width: 96px;
  height: 96px;
  border-radius: 70px;
  transition: transform 0.6s;
}

.rank-badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.grid-item {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border: 2px solid var(--primary);
  min-height: 100px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.grid-item:hover {
  background: rgba(var(--primary-rgb), 0.1);
}

.grid-item.captured {
  border-color: var(--success);
}

.grid-item.contested {
  border-color: rgba(255,255,255,0.1);
  animation: pulse 1.5s infinite;
}

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

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.medal-icon {
  font-size: 2.5rem;
  text-align: center;
}

.leaflet-container {
  background: #1a1a1a !important;
  border-radius: 8px;
}

.leaflet-control-attribution {
  background: rgba(0,0,0,0.7) !important;
  color: #fff !important;
}

.stat-item {
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
}

.event-feed {
  max-height: 300px;
  overflow-y: auto;
}

.event-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.war-status-card {
}

.war-status-item {
  text-align: center;
  padding: 1.5rem;
}

.status-label {
  color: #a0aec0;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.status-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #cbd5e0;
}

.state-badge {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.timeline-bar {
  height: 4px;
  background: #696969;
  margin: 1rem 0;
  position: relative;
}

.timeline-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  height: 10px;
  width: 10px;
  background: #48bb78;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
  }
}

.timeline-date {
  display: block;
  color: #718096;
  font-size: 0.9rem;
}

.events-list {
  max-height: 400px;
  overflow-y: auto;
  background: #1e1e1e;
  border-radius: 5px;
  margin-top: 10px;
}

.event-item {
  padding: 10px;
  border-bottom: 1px solid #333;
  cursor: pointer;
  transition: background 0.3s;
}

.event-item:hover {
  background: #2a2a2a;
}

.event-faction {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-warden {
  color: #c43e3e;
}

.event-colonial {
  color: #3e6dc4;
}

.event-time {
  font-size: 0.8em;
  color: #888;
  margin-top: 4px;
}

.event-type {
  font-size: 0.9em;
  color: #aaa;
}

.event-highlight {
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background: rgba(255,215,0,0.3);
  }
  100% {
    background: transparent;
  }
}

.card-custom {
  min-height: 230px;
  background: rgba(26,29,36,0.18);
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: 5px;
  transition: transform 0.3s;
}

.avatar-wrapper {
  position: relative;
  width: 100px;
  margin: 0 auto;
}

.rank-badge {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: #3a3f4b;
  color: #fff;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: bold;
}

.member-card h5 {
  color: #e0e0e0;
  margin: 15px 0;
  font-family: 'Arial', sans-serif;
}

.text-muted {
  color: #6c757d !important;
}

.skills .badge {
  margin: 3px;
  color: #212529;
  font-weight: bold;
}

.badge {
  font-size: 11px;
}

#fullscreenVideo {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  z-index: -1;
  width: 100dvw;
}

html {
  /*width: 100dvw;*/
}

.progress, .progress-stacked {
  --bs-progress-height: 1rem;
  --bs-progress-font-size: 0.75rem;
  --bs-progress-bg: var(--bs-secondary-bg);
  --bs-progress-border-radius: var(--bs-border-radius);
  --bs-progress-box-shadow: var(--bs-box-shadow-inset);
  --bs-progress-bar-color: #fff;
  --bs-progress-bar-bg: #0d6efd;
  --bs-progress-bar-transition: width 0.6s ease;
  display: flex;
  height: var(--bs-progress-height);
  overflow: hidden;
  font-size: var(--bs-progress-font-size);
  background-color: var(--bs-progress-bg);
  border-radius: var(--bs-progress-border-radius);
}

section {
  overflow: hidden;
  outline: none;
}


.war-timeline {
    position: relative;
    height: 20px;
    background-color: #262626;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.timeline-fill {
    height: 100%;
    width: 0%;
    background-color: var(--success); /* зеленый по умолчанию */
    border-radius: 10px;
    transition: width 1s ease, background-color 0.5s ease;
}

.war-timeline-dates {
    font-size: 0.9rem;
    color: #718096;
    display: flex;
    justify-content: space-between;
}

.news-card {
    background-color: #252525b0;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
.news-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.news-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.news-content {
    white-space: pre-wrap;
    font-size: 0.95rem;
}
.news-date {
    color: #888;
    font-size: 0.8rem;
    margin-top: 10px;
    text-align: right;
}

.rank-img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}