/* Общие стили */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  overflow-x: hidden;
}

.white-text {
  color: white;
}

#main-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Стили меню */
.menu-icon {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 1000;
  background-color: #2d5016;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-line {
  width: 70%;
  height: 6px;
  background-color: #629d69;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.sidebar {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 0;
  height: 0;
  background: rgba(45, 80, 22, 0.9);
  backdrop-filter: blur(10px);
  color: white;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 2px 0 10px #0000004d;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  padding-top: 50px;
}

.sidebar.active {
  width: 250px;
  height: max-content;
  opacity: 1;
  visibility: visible;
  padding-bottom: 10px;
}

.menu-item {
  display: block;
  color: white;
  text-decoration: none;
  padding: 15px 25px;
  font-size: 18px;
  transition: 0.3s;
  opacity: 0;
  transform: translateY(-10px);
}

.sidebar.active .menu-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
}

.menu-item:hover {
  background-color: rgba(45, 80, 22, 0.7);
  text-decoration: none;
  color: white;
}

/* Главная страница */
#mainPage {
  display: block;
}

.bg-fon-main1 {
  height: 100vh;
  background-image: url(img/fonproject.webp);
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  align-content: center;
  position: relative;
}

.bg-fon-main2 {
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4));
  align-content: center;
  display: flex;
  align-items: center;
}

/* Кнопка мероприятия */
.bg-tab {
  background: #43671a;
  width: 100%;
  max-width: 400px;
  height: 100px;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 40px auto;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bg-tab:hover {
  background: #689f38;
  text-decoration: none;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Блоки контента */
.bg-grey {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: #333;
  padding: 80px 0;
}

.bg-fon-green {
  background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
  padding: 80px 0;
}

.bg-black {
  background: linear-gradient(135deg, #080808, #14290f);
  color: #ccc;
  padding: 60px 0;
  text-align: center;
}

/* Рейтинг активности */
#rating-title {
  color: #2d5016;
  margin-bottom: 60px;
}

.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 5px;
}

.podium-place {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-platform {
  border-radius: 15px 15px 0 0;
  padding: 40px 15px;
  text-align: center;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  position: relative;
  transition: transform 0.3s ease;
}

.podium-platform:hover {
  transform: translateY(-10px);
}

/* Первое место */
.first-place .podium-platform {
  height: 350px;
  background: linear-gradient(135deg, #318d38, #f8ff4e);
}

/* Второе место */
.second-place .podium-platform {
  height: 280px;
  background: linear-gradient(135deg, #33a00c, #c6c5c5);
}

/* Третье место */
.third-place .podium-platform {
  height: 240px;
  background: linear-gradient(135deg, #6ae03f, #ff9400);
}

.position-badge {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  background: #2a8316;
  border: 3px solid #5fa447;
}

.user-avatar {
  font-size: 50px;
  margin-bottom: 15px;
}

.user-name {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 6px;
  color: #1d1b1b;
}

.user-stats {
  font-size: 13px;
  color: #363636;
  margin-bottom: 8px;
}

.user-score {
  font-size: 24px;
  font-weight: bold;
  color: #112b00;
}

/* Таблица рейтинга */
.rating-table-container {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
}

.rating-table thead {
  background: linear-gradient(135deg, #2d5016, #43671a);
  color: white;
}

.rating-table th {
  padding: 20px 15px;
  text-align: center;
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-table th:last-child {
  border-right: none;
}

.rating-table tbody tr {
  border-bottom: 1px solid #e1e5ec;
  transition: background 0.3s ease;
}

.rating-table tbody tr:hover {
  background: #f8f9fa;
}

.rating-table tbody tr:nth-child(odd) {
  background: #fafafa;
}

.rating-table tbody tr:nth-child(odd):hover {
  background: #f0f0f0;
}

.rating-table td {
  padding: 18px 15px;
  text-align: center;
  color: #333;
}

.rating-table .position-cell {
  font-weight: bold;
  font-size: 18px;
  color: #2d5016;
  width: 70px;
}

.rating-table .position-1 {
  background: linear-gradient(135deg, #318d38, #f8ff4e);
  color: #112b00;
}

.rating-table .position-2 {
  background: linear-gradient(135deg, #33a00c, #c6c5c5);
  color: #112b00;
}

.rating-table .position-3 {
  background: linear-gradient(135deg, #6ae03f, #ff9400);
  color: #112b00;
}

.rating-table .user-cell {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 15px;
}

.rating-table .user-avatar-small {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f5e8;
  border-radius: 50%;
}

.rating-table .user-name {
  font-weight: 500;
  color: #333;
  margin: 0;
}

.rating-table .stats-cell {
  font-weight: 500;
  color: #2d5016;
}

.rating-table .hours-cell {
  font-weight: bold;
  color: #112b00;
}

/* Адаптивность для рейтинга */
@media (max-width: 768px) {
  .podium-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 5px;
    position: relative;
  }

  .podium-place {
    width: 90%;
    position: relative;
    z-index: 1;
  }

  .podium-platform {
    border-radius: 15px;
    height: auto !important;
    padding: 25px 15px;
    position: relative;
    margin-bottom: 10px;
    transition: all 0.3s ease;
  }

  .podium-place.first-place {
    order: 1;
    margin-top: 0;
  }

  .podium-place.second-place {
    order: 2;
    margin-top: -15px;
  }

  .podium-place.third-place {
    order: 3;
    margin-top: -15px;
  }

  .podium-place.first-place .podium-platform {
    height: 220px !important;
    background: linear-gradient(135deg, #ffd700, #fff8c4);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
  }

  .podium-place.second-place .podium-platform {
    /* height: 190px !important; */
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    box-shadow: 0 8px 20px rgba(192, 192, 192, 0.3);
    /* margin-left: -20px; */
    /* margin-right: 20px; */
  }

  .podium-place.third-place .podium-platform {
    /* height: 160px !important; */
    background: linear-gradient(135deg, #cd7f32, #e8b886);
    box-shadow: 0 6px 15px rgba(205, 127, 50, 0.3);
    /* margin-left: 20px;
    margin-right: -20px; */
  }

  #rating-title {
    margin-bottom: 20px;
  }

  .position-badge {
    top: -15px;
    width: 35px;
    height: 35px;
    font-size: 18px;
    z-index: 2;
  }

  .user-avatar {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .user-name {
    font-size: 16px;
  }

  .user-stats {
    font-size: 12px;
  }

  .user-score {
    font-size: 20px;
  }

  .rating-table-container {
    margin: 20px 10px;
    overflow-x: auto;
  }

  .rating-table {
    min-width: 600px;
    font-size: 14px;
  }

  .rating-table th {
    padding: 15px 10px;
    font-size: 14px;
  }

  .rating-table td {
    padding: 15px 10px;
  }

  .rating-table .user-avatar-small {
    font-size: 20px;
    width: 35px;
    height: 35px;
  }

  .bg-fon-green h1 {
    font-size: 28px;
    margin-bottom: 30px;
  }
}

/* Страница профиля */
.profile-page {
  display: none;
  background: #f8f9fa;
}

.parks-page {
  background: #f8f9fa;
}

.park-history-page {
  background: #f8f9fa;
}

.stats-card,
.events-card,
.bonuses-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  border: 2px solid #e8f5e8;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e1e5ec;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-value {
  color: #112b00;
  font-size: 18px;
}

.upcoming-event {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  border-left: 4px solid #8bc34a;
}

.event-date {
  color: #8bc34a;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
}

.event-title {
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
}

.event-location {
  color: #666;
  font-size: 14px;
}

/* Бонусы */
.bonus-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.bonus-stat-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #5d8e24;
  transition: transform 0.3s ease;
}

.bonus-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bonus-stat-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.bonus-stat-icon {
  font-size: 32px;
  margin-right: 15px;
}

.bonus-stat-info {
  flex-grow: 1;
}

.bonus-stat-title {
  font-weight: 600;
  color: #2d5016;
  font-size: 16px;
  margin-bottom: 5px;
}

.bonus-stat-count {
  font-size: 20px;
  font-weight: bold;
  color: #1d1b1b;
}

.bonus-progress {
  height: 8px;
  background: #e1e5ec;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #8bc34a, #689f38);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.bonus-stat-desc {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.bonus-stat-available {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.available-badge {
  background: #5d8e24;
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: bold;
}

.bonus-details {
  background: #2a6c2738;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.bonus-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bonus-detail-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #5d8e24;
}

.bonus-detail-icon {
  font-size: 20px;
  margin-right: 15px;
  width: 30px;
  text-align: center;
}

.bonus-detail-text {
  flex-grow: 1;
}

.bonus-detail-text strong {
  display: block;
  color: #2d5016;
  font-size: 14px;
  margin-bottom: 3px;
}

.bonus-detail-text small {
  color: #666;
  font-size: 12px;
}

/* Парки */
.park-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  height: 100%;
}

.park-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.park-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.park-info {
  padding: 20px;
}

.park-info h5 {
  color: #112b00;
  margin-bottom: 8px;
  font-weight: 600;
}

.park-location {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.park-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
}

/* История парка */
.park-history-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.history-header {
  text-align: center;
  margin-bottom: 30px;
}

.history-header h2 {
  color: #2d5016;
  margin-bottom: 10px;
}

.history-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  margin-bottom: 25px;
  position: relative;
}

.history-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  border-left: 4px solid #5f882f;
}

.info-card h4 {
  color: #2d5016;
  margin-bottom: 10px;
  font-size: 18px;
}

.history-text {
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.history-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #2a6c2738;
  border-radius: 8px;
}

/* Аудиогид и AR-камера */
.audioguide-section {
  margin-top: 40px;
  background: linear-gradient(135deg, #2d5016, #43671a);
  border-radius: 15px;
  padding: 30px;
  color: white;
}

.audioguide-header {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.audioguide-icon {
  font-size: 40px;
  margin-right: 15px;
}

.ar-camera-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.camera-preview {
  width: 100%;
  height: 300px;
  background: #1a1a1a;
  border-radius: 10px;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewfinder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  border: 2px dashed #8bc34a;
  border-radius: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    border-color: #8bc34a;
  }
  50% {
    border-color: #689f38;
  }
  100% {
    border-color: #8bc34a;
  }
}

.object-marker {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(139, 195, 74, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.object-marker:nth-child(1) {
  top: 30%;
  left: 25%;
}
.object-marker:nth-child(2) {
  top: 60%;
  left: 40%;
}
.object-marker:nth-child(3) {
  top: 40%;
  left: 70%;
}
.object-marker:nth-child(4) {
  top: 70%;
  left: 60%;
}

.camera-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.camera-btn {
  background: #8bc34a;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.camera-btn:hover {
  background: #689f38;
  transform: translateY(-2px);
}

.camera-btn.secondary {
  background: rgba(255, 255, 255, 0.2);
}

.camera-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.audioguide-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.route-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.route-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.route-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.route-icon {
  font-size: 24px;
  margin-right: 10px;
}

.route-stats {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
}

.route-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.route-points {
  margin-top: 15px;
}

.route-point {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.route-point:last-child {
  border-bottom: none;
}

.point-number {
  width: 24px;
  height: 24px;
  background: #8bc34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.detected-objects {
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.object-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease;
}

.object-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.object-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.object-name {
  font-weight: 500;
  margin-bottom: 5px;
}

.object-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

/* Навигационная панель */
.navbar {
  background: #2a6726ce !important;
}

/* Анимации */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Общая адаптивность */
@media (max-width: 768px) {
  .sidebar.active {
    width: 180px;
    height: 200px;
  }

  .menu-item {
    padding: 12px 20px;
    font-size: 16px;
  }

  .audioguide-routes {
    grid-template-columns: 1fr;
  }

  .objects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .camera-preview {
    height: 250px;
  }

  .camera-viewfinder {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 576px) {
  .history-info {
    grid-template-columns: 1fr;
  }

  .history-features {
    grid-template-columns: 1fr;
  }

  .objects-grid {
    grid-template-columns: 1fr;
  }

  .camera-controls {
    flex-direction: column;
  }

  .camera-btn {
    width: 100%;
    justify-content: center;
  }
}
