/* Reset и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fdfdfd;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5em;
  color: #222;
}

header h2 {
  font-weight: 300;
  font-size: 1.2em;
  color: #666;
}

nav {
  margin-top: 15px;
}

nav a {
  color: #007bff;
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* Основной контент */
main {
  max-width: 1200px;
  margin: 0 auto;
}

section {
  margin-bottom: 40px;
}

/* Контейнеры соревнований */
#public-competitions-container > div {
  background-color: #fff;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin: 20px auto;
  width: 90%;
  max-width: 600px;
  padding: 20px;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

#public-competitions-container > div:hover {
  transform: translateY(-4px);
}

h2 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

/* Баннеры */
img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

/* Результаты */
#results-section {
  margin-top: 30px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background-color: #f8f8f8;
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

th {
  font-weight: 600;
  color: #444;
}

tr:hover {
  background-color: #f9f9f9;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 50px;
  border-top: 1px solid #ddd;
  color: #aaa;
  font-size: 0.9em;
}

/* Кнопка "Назад" */
button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  margin: 15px auto;
  display: block;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Адаптивность */
@media (max-width: 600px) {
  header h1 {
    font-size: 2em;
  }

  nav a {
    display: block;
    margin: 5px 0;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  th {
    background-color: transparent;
  }

  td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    font-weight: bold;
    color: #777;
  }

  table thead {
    display: none;
  }
}
