* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #222;
  padding: 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* HEADER */

header {
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  width: 140px;
  height: auto;
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 38px;
  margin-bottom: 10px;
  color: #111827;
}

.header-text p {
  color: #666;
  font-size: 18px;
}

/* SEARCH */

#searchInput {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
}

/* CARDS */

.card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card h2 {
  margin-bottom: 16px;
}

/* TABLES */

.table-wrapper {
  overflow-x: auto;
}

.schedule-wrapper {
  max-height: 430px;
  overflow: auto;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: #1e3a8a;
  color: white;
  padding: 12px;
  text-align: center;
}

td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: center;
  background: white;
}

td:first-child {
  text-align: left;
}

tr:hover td {
  background: #f9fafb;
}

/* Закрепление заголовка только у таблицы секций */

.schedule-wrapper,
.spartakiada-wrapper {
  max-height: 430px;
  overflow: auto;
  border-radius: 12px;
}

/* Спортивные секции */

.schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Спартакиада */

.spartakiada-table thead tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 30;
}

.spartakiada-table thead tr:nth-child(2) th {
  position: sticky;
  top: 42px;
  z-index: 29;
}

.spartakiada-table thead th {
  background: #1e3a8a;
}

.today {
  background: #f59e0b !important;
}

/* LINKS */

.links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.links a {
  text-decoration: none;
  background: #f3f4f6;
  padding: 14px 18px;
  border-radius: 12px;
  color: #1e3a8a;
  font-weight: 600;
  transition: 0.2s;
}

.links a:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

/* TOP BUTTON */

#topButton {
  position: fixed;
  right: 20px;
  bottom: 20px;

  width: 52px;
  height: 52px;

  border: none;
  border-radius: 50%;

  background: #1e3a8a;
  color: white;

  font-size: 24px;
  cursor: pointer;

  display: none;
  align-items: center;
  justify-content: center;

  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transition: 0.2s;
}

#topButton:hover {
  transform: scale(1.08);
  background: #172554;
}

/* MOBILE */

@media (max-width: 700px) {
  body {
    padding: 14px;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .logo {
    width: 110px;
  }

  .header-text h1 {
    font-size: 28px;
  }

  .header-text p {
    font-size: 15px;
  }

  th,
  td {
    font-size: 14px;
    padding: 10px;
  }
}
