/* Reset و فونت اصلی */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100dvh;
  width: 100vw;
  font-family: 'Orbitron', 'Roboto Mono', monospace;
  overflow: hidden;
  html, body {
  background-color: transparent; /* یا مثلا #0d0d0d برای حالت تیره */
}
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  position: relative;
}

/* زمینه ماتریکسی */
canvas#matrixCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

/* جعبه شیشه‌ای اصلی */
#topGlassBox {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 460px;
  padding: 2rem 1.4rem;
  border-radius: 24px;
  text-align: center;

  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px) saturate(150%);
  -webkit-backdrop-filter: blur(6px) saturate(150%);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);

  margin: 2rem auto;
  transition: all 0.3s ease;
}
#topGlassBox img {
  max-width: 280px;
  margin: 0 auto 1rem;
  display: block;
}
.branding {
  font-size: 2.2rem;
  font-weight: bold;
  color: #222;
}
.subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1rem;
}
#welcomeText {
  font-size: 1rem;
  color: #333;
  margin-top: 1rem;
  line-height: 1.6;
}

/* دکمه کشویی */
#linkToggle {
  all: unset;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin: 1.4rem 0 0.8rem;
  color: #111;
  background: transparent;
  text-align: center;
  text-decoration: underline;
}

/* کشویی لینک‌ها */
#extraLinks {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.4s ease;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  border-radius: 16px;
  text-align: center;
  background: rgba(34, 34, 34, 0.4); /* حالت لایت پیش‌فرض */
  backdrop-filter: blur(10px);
  box-shadow: 0 0 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
#extraLinks.show {
  max-height: 420px;
  opacity: 1;
  transform: translateY(8px);
  padding: 1rem;
}
#extraLinks a {
  all: unset;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #f0f0f0;
  text-align: center;
  transition: color 0.3s ease;
}
#extraLinks a:hover {
  color: #66ff99;
}

/* پنل پایین ورود/ثبت‌نام */
#buttonPanel {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 0.8rem 1.6rem;
}
.text-button {
  all: unset;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  text-align: center;
}
.text-button:hover {
  color: #66ff99;
}

/* کپی‌رایت پایین */
#copyright {
  position: fixed;
  bottom: 14px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  font-family: 'Orbitron', 'Roboto Mono', monospace;
  color: #888;
  background: transparent;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

/* حالت دارک */
@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #0d0d0d;
    color: #eee;
  }
  #topGlassBox {
    background: rgba(0, 0, 0, 0.3);
    color: #eee;
  }
  #welcomeText { color: #ddd; }
  .branding { color: #fff; }
  .subtitle { color: #aaa; }
  #linkToggle {
    color: #ccc;
  }
  #extraLinks {
    background: rgba(255, 255, 255, 0.08);
  }
  #extraLinks a {
    color: #fff;
  }
  .text-button {
    color: #eee;
  }
  #buttonPanel {
    background: rgba(0, 0, 0, 0.2);
  }
  #copyright {
    color: #555;
  }
}

/* انیمیشن فید اوت */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
