/* Общие стили для всех страниц */
:root {
  --primary-color: #4285f4;
  --secondary-color: #34a853;
  --error-color: #ea4335;
  --text-color: #333;
  --light-gray: #f5f5f5;
  --dark-gray: #757575;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f9f9f9;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Основной контейнер для центрирования */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

/* Остальные стили остаются без изменений */
h1, h2 {
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 25px;
  font-weight: 500;
}

/* Кнопки */
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.btn:hover {
  background-color: #3367d6;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--light-gray);
}

.btn-back {
  position: absolute;
  top: 20px;
  left: 20px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  width: auto;
  padding: 8px 12px;
  background: none;
  box-shadow: none;
}

.btn-back:hover {
  text-decoration: underline;
  background: none;
  transform: none;
}

/* Формы */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-gray);
}

input, select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border 0.3s;
  box-sizing: border-box;
}

input:focus, select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

/* Ссылки */
.link {
  text-align: center;
  margin-top: 20px;
  color: var(--dark-gray);
}

.link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.link a:hover {
  text-decoration: underline;
}

/* Главная страница */
.main-description {
  color: var(--dark-gray);
  margin-bottom: 30px;
  line-height: 1.6;
  text-align: center;
}

.buttons-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

/* Профиль */
@media (min-width: 768px) {
  .profile-body {
    grid-template-columns: 1fr 1fr;
  }
}

.info-card {
  background: var(--light-gray);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.stat-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.profile-actions {
  text-align: center;
  margin-top: 30px;
}

.leaderboard {
  margin: 20px auto;
  max-width: 800px;
}

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

.leaderboard th, .leaderboard td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.leaderboard tr:nth-child(even) {
  background-color: #f2f2f2;
}

.current-user {
  background-color: #e8f4fe;
  font-weight: bold;
}

.country-flag {
  margin-left: 5px;
  font-size: 1.2em;
}