@import url('https://fonts.googleapis.com/css2?family=Jura:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;600&display=swap');

/* Основные стили страницы */
body {
  margin: 0;
  font-family: 'Jura', sans-serif;
  background-color: #1e1e1e;
  color: #ffffff;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.light-theme {
  background-color: #ffffff;
  color: #1e1e1e;
}

main {
  flex: 1 0 auto;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1e1e1e;
}

body.light-theme ::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #c1c1c1;
  border-radius: 10px;
  border: 2px solid #1e1e1e;
}

body.light-theme ::-webkit-scrollbar-thumb {
  border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a8a8a8;
}

/* Навигационная панель */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #2a2a2a;
  padding: 0 20px;
  height: 70px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.navbar.light-theme {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.si_logo {
  position: absolute;
  left: 20px;
  top: 10px;
  height: 50px;
  width: auto;
}

.nav-center {
  margin: 0 auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #aaa;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

.nav-links a.light-theme {
  color: #333;
}

.nav-links a.active,
body.light-theme .nav-links a.active {
  color: #ffffff;
}

body.light-theme .nav-links a.active {
  color: #000;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #CCB4E4;
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

#user-nav {
  display: flex;
  align-items: center;
}

.login-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.login-btn ion-icon {
  margin-right: 5px;
}

.login-btn:hover {
  color: #fff;
}

/* Секция кастомного блока */
.custom-section {
  margin-top: 70px;
  padding: 20px;
  text-align: center;
}

.custom-content {
  max-width: 800px;
  margin: 0 auto;
}

.custom-block {
  padding: 20px;
  min-height: 200px;
  background-color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: none;
  border-radius: 1.5rem; /* Закругление как у news-container */
}

.custom-block.light-theme {
  background-color: #ffffff;
}

/* Секция новостей */
.latest-news {
  padding: 20px;
  text-align: center;
  background-color: rgba(30, 30, 30, 0.8);
}

body.light-theme .latest-news {
  background-color: rgba(255, 255, 255, 0.8);
}

.news-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
  .news-container {
    flex-direction: row;
    align-items: center;
  }

  .news-image-wrapper {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .news-content {
    flex: 0 0 60%;
    max-width: 60%;
    text-align: left;
  }
}

.news-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1.875rem;
}

.news-image-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  filter: blur(10px);
  z-index: 0;
}

.news-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1.875rem;
}

.news-content {
  padding: 0 10px;
}

.news-label {
  font-size: 12px;
  font-weight: bold;
  color: #CCB4E4;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.news-title {
  font-size: 24px;
  color: #ffffff;
  margin: 10px 0;
  line-height: 1.2;
}

.news-description {
  font-size: 16px;
  color: #7E7E7E;
  margin: 10px 0;
  line-height: 1.5;
}

.news-btn {
  font-family: 'Jura', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #CCB4E4;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.news-btn:hover {
  transform: scale(1.05);
  background-color: #B99DD3;
}

.news-btn ion-icon {
  font-size: 16px;
}

/* Секция проектов */
#intro-top,
#intro-bottom {
  margin-top: 60px;
  text-align: center;
  padding: 20px 0;
}

.intro-content p {
  margin: 5px 0;
  font-size: 18px;
  color: #CCCCCC;
}

body.light-theme .intro-content p {
  color: #333;
}

#projects h2 {
  text-align: center;
  margin-top: 40px;
  font-size: 28px;
  color: #ffffff;
}

body.light-theme #projects h2 {
  color: #000;
}

.projects-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
}

.projects-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  transition: transform 0.5s ease-in-out;
}

.project {
  background: linear-gradient(to bottom, #2a2a2a, #4a2a6a);
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  flex: 0 0 calc((100% - 40px) / 3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.project.light-theme {
  background: linear-gradient(to bottom, #ffffff, #d8b4fe);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #aaa;
}

.project:hover {
  transform: scale(1.05);
}

.project:not(.active) {
  opacity: 0.5;
}

.image-wrapper {
  border-radius: 15px;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.project header {
  margin-top: 10px;
}

.project h3 {
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
}

body.light-theme .project h3 {
  color: #000;
}

.project a {
  text-decoration: none;
  color: inherit;
}

.year {
  display: inline-block;
  background-color: #CCB4E4;
  color: #ffffff;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 20px;
  margin-top: 5px;
}

.play-btn {
  font-family: 'Jura', sans-serif;
  display: block;
  width: 100%;
  background-color: #CCB4E4;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  margin-top: 15px;
  text-decoration: none;
}

body.light-theme .play-btn {
  background-color: #CCB4E4;
}

.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(204, 180, 228, 0.6);
}

body.light-theme .play-btn:hover {
  background-color: #B99DD3;
}

.arrow-btn {
  font-family: 'Roboto', sans-serif;
  background-color: #4a2a6a;
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  transition: background 0.3s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  text-decoration: none;
  border: 2px solid #ffffff;
}

body.light-theme .arrow-btn {
  background-color: #f47fff;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.arrow-btn:hover {
  background-color: #5a3a7a;
}

body.light-theme .arrow-btn:hover {
  background-color: #e066ff;
}

#left-arrow {
  left: calc(50% - 500px);
}

#right-arrow {
  right: calc(50% - 500px);
}

/* Футер */
.site-footer {
  background-color: #2a2a2a;
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.site-footer.light-theme {
  background-color: #f0f0f0;
  color: #1e1e1e;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  position: relative;
  flex-wrap: wrap;
  min-height: 80px;
}

.footer-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
}

.copyright {
  font-size: 14px;
  color: #aaa;
  margin: 0;
  text-align: left;
  line-height: 1.4;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: flex-end;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-btn::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 128, 128, 0.7);
  transition: background-color 0.3s ease;
  border-radius: 50%;
}

.social-btn:hover::before {
  background-color: transparent;
}

.social-btn:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transform: scale(1.1);
}

.telegram-btn {
  background-color: #0088cc;
}

.telegram-btn:hover {
  box-shadow: 0 0 10px rgba(41, 182, 246, 0.8);
}

.discord-btn {
  background-color: #7289da;
}

.discord-btn:hover {
  box-shadow: 0 0 10px rgba(114, 137, 218, 0.8);
}

.roblox-btn {
  background-color: #0074ef;
}

.roblox-btn:hover {
  box-shadow: 0 0 10px rgba(0, 162, 232, 0.8);
}

.social-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.policy-links {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: right;
}

.policy-link {
  color: #888888;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.policy-link.light-theme,
body.light-theme .policy-link {
  color: #555;
}

.policy-link:hover {
  color: #ffffff;
}

body.light-theme .policy-link:hover {
  color: #000;
}

.theme-toggle-footer {
  position: absolute;
  right: -300px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
}

.theme-btn {
  background: none;
  border: none;
  font-size: 30px;
  color: #aaa;
  cursor: pointer;
  padding: 5px;
}

.theme-btn:hover {
  color: #fff;
}

body.light-theme .theme-btn ion-icon {
  color: #000;
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .projects-container {
    flex-direction: column;
    gap: 15px;
    transform: none !important;
  }

  .project {
    flex: 0 0 100%;
  }

  .arrow-btn {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .copyright,
  .policy-links {
    text-align: center;
  }

  .navbar {
    height: 60px;
    padding: 0 10px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links a {
    font-size: 16px;
  }

  .news-container {
    flex-direction: column;
  }

  .news-image-wrapper {
    max-width: 100%;
  }

  .news-content {
    max-width: 100%;
    text-align: center;
  }

  .theme-toggle-footer {
    position: static;
    margin-top: 10px;
    text-align: right;
    width: 100%;
  }
}