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

body {
  font-family: 'sf', sans-serif;
  background-color: #ffffff;
  color: #222222;
  line-height: 1.6;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  z-index: 1;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

header.scrolled {
  padding: 15px 2%;
  background: rgba(255,255,255,0.99);
}

.logo {
  margin-left: 40px;
  position: absolute;
  align-items: center;
  display: flex;
}

.logo a {
  color: #222222;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  margin-top: -9px;
}

.site-icon {
  width: 30px;
  margin-right: 10px;
  position: relative;
  top: 8.5px;
}

.mobile-header {
  display: none;
}

.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  animation: bounce 2s infinite;
}

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

@media (max-width: 1270px) {
  header {
    display: none;
  }
  .mobile-header {
    display: block;
    background-color: #f8f9fa;
    color: #222222;
    padding: 15px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
  .mobile-header nav ul li a {
    color: #222222;
    background-color: #e9ecef;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }
}

.youtube-section {
  margin-top: 20px;
}

.youtube-section iframe {
  width: 700px;
  height: 393px;
  max-width: 100%;
  margin-bottom: -60px;
  border-radius: 15px;
}

nav {
  flex-grow: 1;
  justify-content: center;
  flex-direction: column;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 15px;
}

header nav ul li {
  margin: 0 15px;
}

header nav ul li a {
  color: #222222;
  text-decoration: none;
  font-weight: bold;
}

header nav ul li a:hover {
  text-decoration: underline;
  text-decoration: none;
  transform: scale(1.2);
}

nav a {
  position: relative;
  color: #222222;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: #007bff;
  transform: scaleX(0);
  transition: transform 0.3s;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a:hover {
  color: #007bff;
}

main {
  margin-top: 90px;
  text-align: center;
  padding-bottom: 70px;
  background: #fff;
}

.button-section {
  margin-top: 20px;
}

.button-section a {
  display: block;
  margin: 10px auto;
  padding: 10px 20px;
  background-color: #e9ecef;
  color: #222222;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 300px;
  transform: scale(1);
}

main h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

footer {
  background-color: #f8f9fa;
  color: #222222;
  text-align: center;
  padding: 10px 20px;
  position: fixed;
  width: 100%;
  bottom: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border-top: 1px solid #e9ecef;
}

.social-link {
  display: flex;
  align-items: center;
  color: #222222;
  text-decoration: none;
  font-weight: bold;
}

.social-link:hover {
  text-decoration: underline;
}

.social-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.telegram-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.palette-container {
  position: relative;
}

.palette-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 40px;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
}

.palette-icon {
  width: 100%;
  height: auto;
}

.color-picker {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 1px;
  padding: 11px;
  position: absolute;
  top: calc(100% + 32px);
  right: calc(0px + 40px);
  z-index: 1001;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.color-option {
  border: 1px solid #dddddd;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.hidden {
  display: none;
}

.color-picker h4 {
  color: #222222;
  margin: 0;
}

.container {
  max-width: 1200px;
  width: 100%;
}

.nav-button:hover {
  text-decoration: none;
  transform: scale(1.2);
}

.button-menu-section {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.row a {
  display: block;
  width: 270px;
  padding: 10px 15px;
  background-color: #e9ecef;
  color: #222222;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
}

.theme-panel {
  display: none;
  flex-direction: column;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  background-color: #fff;
  width: 220px;
  margin: auto;
  margin-top: 20px;
}

.theme-buttons {
  display: flex;
  justify-content: center;
  margin-top: 3px;
}

.theme-button {
  margin: 3px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #222222;
  width: 40px;
  height: 40px;
  background: #e9ecef;
}

.theme-title {
  font-size: 18px;
  margin-bottom: -2px;
  color: #222222;
}

.hero {
  margin-top: -26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
}

.hero h1 {
  font-size: 4em;
  color: #222222;
  text-shadow: 0 0 20px rgba(0,0,0,0.08);
}

.hero p {
  font-size: 1.2em;
  color: #222222;
  max-width: 800px;
  margin-bottom: 40px;
}

@media (max-width: 800px) {
  iframe {
    display: none;
  }
  .youtube-section {
    display: none;
  }
  .row {
    flex-direction: column;
    align-items: center;
  }
  .color-picker {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 1px;
    padding: 11px;
    position: absolute;
    top: calc(100% + 32px);
    right: calc(0px + 40px);
    z-index: 1001;
  }
  .color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
  }
  .color-option {
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 1px solid #dddddd;
  }
}

/* --- MOBILE FRIENDLY STYLES --- */
@media (max-width: 900px) {
  header {
    display: none !important;
  }
  .mobile-header {
    display: block !important;
    background-color: #191919;
    color: #fff;
    padding: 12px 0 8px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  .mobile-header nav ul.mobile-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0;
  }
  .mobile-header nav ul.mobile-menu li {
    margin: 0 2px;
    list-style: none;
  }
  .mobile-header nav ul.mobile-menu li a.nav-button {
    display: block;
    color: #fff;
    background: #2e2e2e;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
  }
  .mobile-header nav ul.mobile-menu li a.nav-button:hover {
    background: #007bff;
    color: #fff;
  }
  main {
    margin-top: 65px !important;
    padding: 10px 5px 80px 5px !important;
    text-align: center;
    background: #fff;
  }
  .hero {
    margin-top: 0 !important;
    padding: 0 2%;
  }
  .hero h1 {
    font-size: 2em !important;
    text-shadow: 0 0 8px rgba(0,0,0,0.08);
    margin-bottom: 10px;
  }
  .hero p {
    font-size: 1em;
    margin-bottom: 20px;
    padding: 0 2vw;
  }
  .button-menu-section .d-flex {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .button-menu-section a.btn {
    min-width: unset !important;
    width: 100% !important;
    font-size: 1em;
    margin: 0 0 8px 0;
    padding: 10px 0;
    box-shadow: none;
  }
  .youtube-section {
    margin-top: 10px;
    padding: 0;
  }
  .youtube-section h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
  }
  .youtube-section iframe {
    width: 100vw !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    height: 200px !important;
    border-radius: 8px;
    margin-bottom: 0;
  }
  .video-thumb {
    display: none;
  }
  .button-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }
  .button-section a {
    max-width: 100%;
    width: 100%;
    padding: 10px 0;
    font-size: 1em;
    background: #2e2e2e;
    color: #fff;
    border-radius: 6px;
    margin: 0;
  }
  .button-section a:hover {
    background: #007bff;
    color: #fff;
  }
  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    padding: 7px 0 7px 0;
    font-size: 0.95em;
    background: #191919;
    color: #fff;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #333;
  }
  footer p {
    margin: 0;
    color: #fff;
    font-size: 0.95em;
    text-align: center;
    width: 100%;
  }
  .social-link {
    color: #fff;
    margin: 0 2px;
  }
  .social-icon {
    width: 22px;
    height: 22px;
    margin-right: 2px;
    margin-left: 2px;
  }
  #scroll-to-top {
    right: 10px !important;
    bottom: 60px !important;
    width: 38px !important;
    height: 38px !important;
  }
  #scroll-to-top i {
    font-size: 18px !important;
    line-height: 38px !important;
  }
}

/* Extra small screens (portrait phones) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.3em !important;
  }
  .youtube-section iframe {
    height: 140px !important;
  }
  .button-menu-section a.btn {
    font-size: 0.95em;
    padding: 8px 0;
  }
  .button-section a {
    font-size: 0.95em;
    padding: 8px 0;
  }
  footer {
    font-size: 0.9em;
    padding: 5px 0 5px 0;
  }
}

