html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  color: #00bfff;
}

body {
  font-family: 'Exo', sans-serif;
  background: #0e0e0e;
  color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.background {
  position: fixed;
  inset: 0;
  background: url('Spasmodic_Unlock.png') no-repeat center center / cover;
  
  z-index: -1;
}

header {
  background: #00000070;
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  top: 0;
  z-index: 10;
}

nav {
  position: relative;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  gap: 20px;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  background-color: #ffffff20;
}

.container {
  max-width: 800px;
  margin: 25px auto 40px;
  padding: 0 20px;
  text-align: center;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

.notice-container {
  max-width: 800px;
  margin: 25px auto 40px;
  padding: 0 20px;
  text-align: left;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

.centered-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 800px;
  min-height: 84vh;
  margin: 0 auto;
}


h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

p {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #dddddd;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.btn {
  display: inline-block;
  background: #2f80ed;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.btn:hover {
  background: #1c5ec9;
}

.btn.alt {
  background: #444;
}

.btn.alt:hover {
  background: #666;
}

footer {
  margin-top: auto;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  background: #00000070;
  color: #aaaaaa;
}

footer a.active {
  text-decoration: none;
  color: #ffffff;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }
}

.version-list {
   gap: 30px;
}

@media (min-width: 700px) {
  .version-list {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

.version-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: height 0.3s ease;
  min-height: 160px;
  scroll-margin: 20vh;
}

.version-card h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag_G {
  font-size: 0.75rem;
  background: #4186f6;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag_T {
  font-size: 0.75rem;
  background: #23B8BF;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.tag_UnOff {
  font-size: 0.75rem;
  background: #fc0303;
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.version-date {
  font-size: 0.85rem;
  color: #d9d9d9;
  margin-top: -8px;
  margin-bottom:8px;
  margin-left: 2px;
}

.changelog {
  color: #ccc;
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.version-card .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #2f80ed;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 5px;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.dropdown-toggle:hover {
  color: #4fa1ff;
}

.dropdown-toggle .arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}

.dropdown-toggle.open .arrow {
  transform: rotate(90deg);
}

.dropdown-content {
  display: none;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 15px;
  margin-top: 5px;
  font-size: 0.9rem;
  color: #ccc;
  overflow-x: auto; 
  word-break: break-word;  
  max-width: 100%;         
}

.dropdown-content p {
  margin-bottom: 6px;
  line-height: 1.4;
  font-size: 0.85rem;
}

.changelog-list {
  padding-left: 20px;
  margin: 5px 0 0 0;
  color: #ccc;
  font-size: 0.95rem;
}

.changelog-list li {
  margin-bottom: 6px;
}

.changelog-list a {
  color: #2f80ed;
  text-decoration: none;
}

.changelog-list a:hover {
  text-decoration: underline;
}

.changelog-list ul {
  padding-left: 20px;
  margin-top: 4px;
}

.install-list {
  text-align: left;
  font-size: 1rem;
  color: #ddd;
  padding-left: 20px;
  margin-top: 30px;
}

.install-list li {
  margin-bottom: 18px;
  line-height: 1.6;
}

.install-list a {
  color: #2f80ed;
  text-decoration: none;
}

.install-list a:hover {
  text-decoration: underline;
}

.install-list code {
  font-size: 0.85rem;
}

.install-list pre {
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 12px;
  color: #ccc;
  margin: 10px 0;
  overflow-x: auto;
  font-size: 0.9rem;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.btn-unavailable {
  display: inline-block;
  padding: 10px 18px;
  text-align: center;
  background: #444;
  color: #888;
  border: 1px solid #333;
  cursor: not-allowed;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
}

.sub-variant {
  margin-top: 20px;
  font-size: 1.05rem;
  color: #ccc;
  font-weight: 600;
}

.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  background: #111;
  border: 1px solid #333;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  border-radius: 8px;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  width: 100vw; 
  max-width: 100%;
}

.submenu li a {
  display: block;
  border-radius: 8px;
  padding: 8px 16px;
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}

.submenu li a:hover {
  background: #222;
  border-radius: 8px;
  color: #fff;
}

.has-submenu.open .submenu,
.has-submenu:hover .submenu {
  border-radius: 8px;
  display: block;
}

.back-buttons-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 20px; 
  gap: 10px;
}

a.back-button,
a.back-to-top {
  background: #2f80ed;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}

a.back-button:hover,
a.back-to-top:hover {
  background: #1e60c2;
}

@media screen and (max-width: 600px) {
  .back-buttons-container {
    flex-direction: column;
    align-items: center;
  }
}

#download-count {
  font-weight: bold;
  color: #0077cc;
  font-family: monospace;
}

.home-dropdown-toggle {
  background: none;
  border: none;
  color: #2f80ed;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: color 0.2s;
  border-radius: 8px;
}

.home-dropdown-toggle:hover {
  color: #4fa1ff;
}

.home-dropdown-toggle .arrow-left,
.home-dropdown-toggle .arrow-right {
  display: inline-block;
  transition: transform 0.22s ease;
  line-height: 1;
  font-size: 1rem;
}

.home-dropdown-toggle.open .arrow-left {
  transform: rotate(90deg);
}
.home-dropdown-toggle.open .arrow-right {
  transform: rotate(-90deg);
}

.home-dropdown-content {
  display: none;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  color: #ccc;
  margin: 5px auto 5px;
  font-size: 0.9rem;
  max-width: 540px;
  padding: 6px 12px;
  text-align: center;
  word-wrap: break-word;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 150, 255, 0.7); }
  70%  { box-shadow: 0 0 0 15px rgba(0, 150, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 150, 255, 0); }
}

.highlight {
  animation: pulse 1.5s ease-out;
}

.license-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.hidden {
  display: none;
}

.license-popup-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 25px 30px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow: hidden;
  color: #ddd;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: popupFade 0.22s ease-out;
}

.highlight {
  animation: pulse 1.5s ease-out;
}

.license-popup-content h2 {
  margin-bottom: 15px;
  font-size: 1.7rem;
  color: #fff;
  text-align: center;
}

.license-text {
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 15px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 22px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #ccc;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.license-text::-webkit-scrollbar {
  display: none;
}

.license-text p {
  margin-bottom: 12px;
  font-size: 14px;
}

.license-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
}

@keyframes popupFade {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 150, 255, 0.7); }
  70%  { box-shadow: 0 0 0 15px rgba(0, 150, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 150, 255, 0); }
}

.body-locked {
  overflow: hidden !important;
  pointer-events: none;
}

.body-locked #license-popup {
  pointer-events: auto;
}
