/* === Общие стили === */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #3a0057, #7d1bb3);
  color: #EAE2FF;
}

/* === Шапка === */
header {
  background: #4A007A;
  color: #DDB6FF;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

header .logo {
  font-size: 1.4em;
  font-weight: bold;
  letter-spacing: 1px;
}

nav a {
  margin-left: 15px;
  color: #E7D1FF;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #CBA2FF;
  text-shadow: 0 0 8px #CBA2FF;
}

/* === Белый (светлый) блок контента === */
.content-box {
  max-width: 900px;
  margin: 40px auto;
  background: #E9D9F2;
  border-radius: 14px;
  padding: 40px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  text-align: center;
  color: #3A0057;
}

/* === Hero-блок === */
.hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
  color: #5A007F;
}

.hero p {
  font-size: 18px;
  margin-bottom: 25px;
  color: #5f4087;
}

/* Главная кнопка */
.main-btn {
  background: #7D1BB3;
  color: #F3E8FF;
  border: none;
  padding: 14px 28px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(125, 27, 179, 0.4);
}

.main-btn:hover {
  background: #A254C4;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(162, 84, 196, 0.6);
}

/* === Категории === */
.categories {
  margin-top: 30px;
}

.category-button {
  margin: 8px;
  padding: 12px 22px;
  background: #D9C2F0;
  border: none;
  color: #3A0057;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.category-button:hover {
  background: #A254C4;
  color: #fff;
  box-shadow: 0 0 10px rgba(162,84,196,0.5);
}

/* === Подвал === */
footer {
  text-align: center;
  padding: 15px;
  background: #4A007A;
  margin-top: 40px;
  color: #E9D9F2;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}

footer a {
  color: #E9D9F2;
  text-decoration: none;
  margin: 0 8px;
  transition: 0.3s;
}

footer a:hover {
  color: #CBA2FF;
  text-shadow: 0 0 6px #CBA2FF;
}

/* === Поиск === */
.search-bar {
  text-align: center;
  margin: 20px 0;
}

.search-bar input {
  padding: 8px 12px;
  width: 220px;
  border: 2px solid #CBA2FF;
  border-radius: 6px;
  background: #F6EEFF;
  color: #3A0057;
}

.search-bar button {
  margin-left: 5px;
  padding: 8px 12px;
  border: none;
  background: #7D1BB3;
  color: #F3E8FF;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.search-bar button:hover {
  background: #A254C4;
  box-shadow: 0 0 8px rgba(162,84,196,0.6);
}

/* === Каталог игр === */
.catalog {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.game-card {
  background: #EBD9FF;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  width: 180px;
  min-height: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(125, 27, 179, 0.4);
}

.game-card h3 {
  color: #4A007A;
}

.game-card button {
  background: #7D1BB3;
  color: #F3E8FF;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.game-card button:hover {
  background: #A254C4;
  box-shadow: 0 0 10px rgba(162,84,196,0.6);
}

/* === Случайная игра === */
.random-game {
  text-align: center;
  margin: 25px 0;
}

.random-btn {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background-color: #A254C4;
  background-image: url("images/random.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
  cursor: pointer;
  transition: 0.3s;
}

.random-btn:hover {
  background-color: #CBA2FF;
}

/* === О проекте / команда === */
.about-section, .team-section, .reviews-section {
  background: #E9D9F2;
  padding: 30px;
  margin: 30px auto;
  border-radius: 12px;
  max-width: 900px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  color: #3A0057;
}

/* === Команда === */
.team {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.team-member {
  text-align: center;
  width: 200px;
}

.team-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 3px solid #A254C4;
  box-shadow: 0 0 10px rgba(162,84,196,0.4);
}

/* === Отзывы === */
.reviews-section {
  background: #c7a6ea;
}

.review-item {
  background: #fff;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #3A0057;
}

.review-item .author {
  font-weight: bold;
  color: #7D1BB3;
}

/* === Таблица рейтинга игр === */
#leaderboardTable {
  width: 90%;
  max-width: 900px;
  margin: 30px auto 50px;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: #6B21A8; /* темный фиолетовый фон всей таблицы */
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #F3E8FF; /* светлый текст по умолчанию */
}

/* Заголовок таблицы */
#leaderboardTable thead {
  background: #7D1BB3; /* светлее для заголовка */
  color: #F3E8FF;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}

/* Ячейки */
#leaderboardTable th,
#leaderboardTable td {
  padding: 14px 10px;
  text-align: center;
  font-weight: 500;
  color: #F3E8FF; /* текст всегда виден */
}

/* Строки таблицы */
#leaderboardTable tbody tr {
  background: #6B21A8; /* основной темный фон строк */
  color: #F3E8FF;       /* светлый текст */
  transition: 0.2s;
}

/* Hover эффект */
#leaderboardTable tbody tr:hover {
  background: #A254C4; /* светлее фиолетовое при наведении */
  color: #FFF;         /* текст белый для контраста */
}

/* Иконки медалей в первой колонке */
#leaderboardTable tbody tr:nth-child(1) td:first-child::before {
  content: "🥇 ";
}
#leaderboardTable tbody tr:nth-child(2) td:first-child::before {
  content: "🥈 ";
}
#leaderboardTable tbody tr:nth-child(3) td:first-child::before {
  content: "🥉 ";
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
  #leaderboardTable th,
  #leaderboardTable td {
    padding: 10px 6px;
    font-size: 12px;
  }
}

/* Стили для выбора игры и кнопки обновления */
.leaderboard-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 20px auto 10px;
  background: #B794F4;
  padding: 12px 20px;
  border-radius: 10px;
  max-width: 500px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  color: #fff;
}

.leaderboard-controls label {
  font-weight: bold;
  color: #fff;
}

.leaderboard-controls select {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #6B21A8;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}

.leaderboard-controls select:hover {
  background: #E9D5FF;
}

/* Кнопка обновления таблицы */
.refresh-btn {
  background: #7D1BB3;
  color: #F3E8FF;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  margin-top: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.refresh-btn:hover {
  background: #A254C4;
  box-shadow: 0 0 12px rgba(162,84,196,0.6);
}






/* === Кнопки входа/выход === */
#loginBtn, #logoutBtn {
  background: linear-gradient(135deg, #7D1BB3, #A254C4);
  color: #F3E8FF;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(125, 27, 179, 0.4);
}

#loginBtn:hover {
  background: linear-gradient(135deg, #A254C4, #CBA2FF);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(162, 84, 196, 0.5);
}

#logoutBtn {
  background: linear-gradient(135deg, #DB4437, #FF6B6B);
  box-shadow: 0 4px 10px rgba(219, 68, 55, 0.4);
}

#logoutBtn:hover {
  background: linear-gradient(135deg, #FF6B6B, #FF4D4D);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 77, 77, 0.5);
}

/* Стиль текста рядом с кнопками */
#userInfo {
  font-weight: bold;
  color: #F3E8FF;
  margin-right: 10px;
}

#authMessage {
  color: #E0D4FF;
  font-size: 13px;
  margin-left: 8px;
}
