/* Основной стиль для страницы */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #eceff1;
  color: #333;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Заголовок */
header {
  background-color: #1e88e5;
  color: white;
  padding: 15px 20px;
  text-align: center;
  font-size: 2em;
  position: relative;
}

#weather-container {
  margin-bottom: 10px;
  background-color: white;
  color: #333;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Навигационное меню */
.navbar {
  background-color: #1e88e5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  padding: 10px;
  margin-bottom: 20px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  margin: 0 10px;
  padding: 8px 16px;
  transition: background-color 0.3s ease-in-out;
}

.navbar a:hover {
  background-color: #1565c0;
  border-radius: 5px;
}

/* Контейнер для геометрических объектов на фоне */
.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: вidden;
  z-index: -1;
}

.background-circle {
  position: absolute;
  background: rgba(30, 136, 229, 0.4);
  border-radius: 50%; 
  width: 400px;
  height: 400px;
  animation: colorRotate 10s linear infinite, float 6s ease-in-out infinite;
}

.background-circle.small {
  width: 200px;
  height: 200px;
}

.background-circle:nth-child(1) {
  top: 10%;
  left: 80%;
}

.background-circle:nth-child(2) {
  top: 50%;
  left: 20%;
}

.background-circle:nth-child(3) {
  top: 80%;
  left: 50%;
}

@keyframes colorRotate {
  0%, 100% {
      background: rgba(30, 136, 229, 0.4);
  }
  50% {
      background: rgba(30, 136, 229, 0.6);
  }
}

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

/* Основной контейнер для секций */
.main-content {
  flex: 1 0 auto;
  padding: 40px 20px;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  text-align: center;
  font-size: 1.75em;
  margin-bottom: 20px;
}

/* Общий стиль карточек */
.card {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Стиль для блока Занятий */
.lesson-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.lesson .lesson-logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

.lesson .lesson-logo img {
  border-radius: 50%;
  margin-bottom: 15px;
}

.lesson .lesson-title {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.lesson .lesson-info {
  width: 100%;
  text-align: left;
}

.lesson .lesson-info td {
  padding: 5px;
}

.lesson .lesson-info a {
  color: #1e88e5;
  text-decoration: none;
  font-weight: bold;
}

.lesson .lesson-info a:hover {
  text-decoration: underline;
}

.knn-visualize-button,
.matrix-visualize-button,
.gradient-descent-visualize-button {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #1e88e5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.knn-visualize-button:hover,
.matrix-visualize-button:hover,
.gradient-descent-visualize-button:hover {
  background-color: #1565c0;
}

/* Преподаватели */
.teachers-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.teacher-card {
  width: 250px;
  text-align: center;
}

.teacher-card img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
}

.teacher-card a {
  display: block;
  margin-top: 5px;
  color: #1e88e5;
  text-decoration: none;
  font-weight: bold;
}

.teacher-card a:hover {
  text-decoration: underline;
}

/* k-NN Modal */
.knn-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.knn-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 85%;
    max-width: 600px;
    text-align: center;
}

.knn-close-button {
    float: right;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

.hidden {
    display: none;
}

.knn-modal #knn-canvas {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

/* matrix Modal */
.matrix-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 85%;
    max-width: 600px;
    text-align: center;
}

.matrix-close-button {
    float: right;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

.matrix-modal #matrix-inputs-container {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.matrix-modal #matrix-inputs-container input {
    width: 50px;
    height: 30px;
    text-align: center;
}

#calculate-matrix-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#calculate-matrix-button:hover {
    background-color: #1565c0;
}

#matrix-result {
    margin-top: 20px;
}

.matrix-table {
    margin: 0 auto;
    border-collapse: collapse;
}

.matrix-table td {
    border: 1px solid #ddd;
    padding: 5px 10px;
    text-align: center;
    background: #f9f9f9;
}

/* Футер */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 12px;
    flex-shrink: 0;
}

.rainbow {
    animation: colorRotateRainbow 5s linear infinite;
}

@keyframes colorRotateRainbow {
    0% { color: #6666ff; }
    10% { color: #0099ff; }
    50% { color: #00ff00; }
    75% { color: #ff3399; }
    100% { color: #6666ff; }
}

.scorpion-button-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

#scorpion-button {
  background-image: url('scorp.png');
  background-size: cover;
  background-position: center;
  width: 60px;
  height: 80px;
  border: none;
  cursor: pointer;
}

/* Стили для модального окна */
.scorpion-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scorpion-modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 85%;
  max-width: 600px;
  text-align: center;
  position: relative;
}

.scorpion-modal-content .scorpion-image-container {
  margin-bottom: 20px;
}

.scorpion-modal-content .scorpion-image {
  max-width: 100%;
  height: auto;
}

.scorpion-text-container {
  border: 2px solid #333;
  padding: 10px;
  border-radius: 5px;
  background: #fff;
}

#scorpion-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  cursor: pointer;
  color: #333;
}

.hidden {
  display: none;
}

/* gradient Modal */
.gradient-descent-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-descent-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 85%;
    max-width: 600px;
    text-align: center;
}

.gradient-descent-close-button {
    float: right;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

.gradient-descent-modal #gradient-descent-canvas {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

/* linear regression Modal */
.linear-regression-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.linear-regression-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 85%;
    max-width: 600px;
    text-align: center;
}

.linear-regression-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

.linear-regression-modal #linear-regression-canvas {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

/* Общий стиль для всех кнопок визуализации */
.knn-visualize-button,
.matrix-visualize-button,
.linear-regression-visualize-button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.knn-visualize-button:hover,
.matrix-visualize-button:hover,
.linear-regression-visualize-button:hover {
    background-color: #1565c0;
}














.clicker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#clicker-image {
    width: 150px;
    height: 150px;
    cursor: pointer;
}

#clicker-upgrade-button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#clicker-upgrade-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.clicker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

#clicker-image {
  width: 150px;
  height: 150px;
  cursor: pointer;
}

#clicker-upgrade-button {
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #1e88e5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#clicker-upgrade-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}


/* Existing styles */

.passive-source img,
.skin-item img,
#clicker-image {
  width: 100px;
  height: 100px;
}

#clicker-image.active,
.skin-item img.active {
  width: 200px;
  height: 200px;
}

