/* Общие стили */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #f0f0f0;
  transition: all 0.3s ease-in-out;
  animation: fadeIn 1s ease-out;
}

h1,
h2,
h3,
h4,
p {
  opacity: 0;
  animation: fadeInText 1.5s ease-out forwards;
}

h1,
h2,
h3 {
  font-family: 'Montserrat', sans-serif;
}

a {
  text-decoration: none;
  color: #f0f0f0;
  opacity: 0;
  animation: fadeInText 2s ease-out forwards;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Анимация для текста */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeInText {
  0% {
    opacity: 0;
    transform: translateY(20px);
    /* Начальная позиция текста */
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    /* Конечная позиция */
  }
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #121212;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

header .logo h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 2px;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

header nav ul li {
  margin-right: 20px;
  position: relative;
}

header nav ul li a {
  font-weight: 500;
  font-size: 18px;
  opacity: 0;
  animation: fadeInText 1.5s ease-out forwards;
}

header nav ul li a:hover {
  color: #ff6f61;
  transform: scale(1.1);
  /* Увеличение при наведении */
}

/* Main Content */
.main-content {
  padding: 60px 20px;
  text-align: center;
}

.main-content h2 {
  font-size: 36px;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 20px;
}

.main-content p {
  font-size: 18px;
  max-width: 700px;
  margin: 20px auto;
  line-height: 1.5;
  opacity: 0;
  animation: fadeInText 2s ease-out forwards;
}

/* Portfolio Section */
.portfolio {
  padding: 60px 20px;
  background-color: #121212;
  text-align: center;
}

.portfolio h3 {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInText 1.5s ease-out forwards;
}

.portfolio p {
  font-size: 18px;
  max-width: 700px;
  margin: 20px auto;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInText 2s ease-out forwards;
}

.portfolio-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.portfolio-item {
  width: 300px;
  background-color: #292929;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.portfolio-item h4 {
  font-size: 20px;
  margin-top: 15px;
  color: #ff6f61;
  opacity: 0;
  animation: fadeInText 2s ease-out forwards;
}

.portfolio-item p {
  font-size: 16px;
  color: #b0b0b0;
  margin-top: 10px;
  opacity: 0;
  animation: fadeInText 2.5s ease-out forwards;
}

/* Social Links */
.social-links {
  text-align: center;
  margin: 40px 0;
}

.social-links h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInText 2s ease-out forwards;
}

.social-icons a {
  margin: 0 15px;
  display: inline-block;
  opacity: 0;
  animation: fadeInText 2.5s ease-out forwards;
}

.social-icons img {
  width: 40px;
  height: 40px;
}

.social-icons a:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Footer */
footer {
  background-color: #121212;
  color: #f0f0f0;
  padding: 40px 20px;
  text-align: center;
  font-size: 22px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  border-top: 1px solid #333;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin: 0px 0;
  font-family: 'Roboto', sans-serif;
  color: #f0f0f0;
}

.footer-note {
  font-size: 20px;
  color: #b0b0b0;
  margin-top: 10px;
  font-style: italic;
  opacity: 0;
  animation: fadeInText 3s ease-out forwards;
}

footer a {
  color: #ff6f61;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

html,
body {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 0px;
  height: 0px;
}

::-webkit-scrollbar-thumb {
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* Стили для снежинок */
.snowflake {
  position: absolute;
  top: -10px;
  /* Начальная позиция выше экрана */
  z-index: 1000;
  color: #ffffff;
  font-size: 24px;
  user-select: none;
  animation: snowfall linear infinite;
  pointer-events: none;
  /* Чтобы снежинки не мешали кликам */
}

/* Анимация падения снега */
@keyframes snowfall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    /* Начинается чуть выше экрана */
  }

  100% {
    transform: translateY(100vh) rotate(360deg);
    /* Падает до нижней части экрана */
  }
}

/* Чтобы снег выглядел как точки или мелкие снежинки */
.snowflake {
  font-size: 18px;
  opacity: 0.8;
}


/* Контейнер выпадающего списка */
.language-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 20px;
}

/* Стили для <select> */
.language-dropdown select {
  appearance: none; /* Убираем стандартный вид */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1e1e1e;
  color: #ffffff;
  border: 2px solid #ff6f61;
  border-radius: 20px; /* Увеличено закругление */
  padding: 10px 20px;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 10;
}

/* Стили при наведении */
.language-dropdown select:hover {
  background-color: #292929;
  border-color: #ff856f;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

/* Стили при фокусе */
.language-dropdown select:focus {
  outline: none;
  border-color: #ff6f61;
  box-shadow: 0 0 8px #ff6f61;
}

/* Стили опций */
.language-dropdown select option {
  background-color: #1e1e1e; /* Цвет фона */
  color: #ffffff; /* Цвет текста */
  padding: 10px;
  border-radius: 5px; /* Закругление углов опций */
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  margin: 2px 0;
}

/* Убираем стандартное выделение синего цвета */
.language-dropdown select option:checked {
  background-color: #ff6f61;
  color: #ffffff;
}

/* При наведении на опцию */
.language-dropdown select option:hover {
  background-color: #383838;
  color: #ff6f61;
  transition: all 0.3s ease;
}

/* Добавляем стрелочку */
.language-dropdown::after {
  content: '▼';
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  font-size: 14px;
  color: #ffffff;
  pointer-events: none;
  transition: transform 0.3s ease;
}

/* Эффект вращения стрелки при наведении */
.language-dropdown select:hover + .language-dropdown::after {
  transform: translateY(-50%) rotate(180deg);
}


/* Адаптация для телефонов (до 768px ширины) */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header {
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }

  header .logo h1 {
    font-size: 20px;
  }

  header nav ul {
    flex-direction: column;
  }

  header nav ul li {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .main-content h2 {
    font-size: 28px;
  }

  .main-content p {
    font-size: 16px;
    padding: 0 10px;
  }

  .portfolio-items {
    flex-direction: column;
    gap: 20px;
  }

  .portfolio-item {
    width: 100%;
    padding: 15px;
  }

  .social-icons a {
    margin: 0 10px;
  }

  footer {
    font-size: 18px;
  }

  .language-dropdown select {
    width: 100%;
    padding: 10px;
  }
}

/* Дополнительная адаптация для очень узких экранов (до 480px ширины) */
@media (max-width: 480px) {
  .main-content h2 {
    font-size: 24px;
  }

  .main-content p {
    font-size: 14px;
  }

  .portfolio-item img {
    width: 100%;
    height: auto;
  }

  footer p {
    font-size: 16px;
  }

  .footer-note {
    font-size: 14px;
  }

  .language-dropdown select {
    font-size: 14px;
    padding: 8px;
  }
}
