/* Reset و فونت */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100dvh;
  width: 100vw;
  font-family: 'Orbitron', 'Roboto Mono', monospace;
  overflow: hidden;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

/* فرم شیشه‌ای مشابه index */
.glass-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: 24px;
  padding: 2rem 1.4rem;
  width: 92%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.8s ease;
}

/* فیلدهای ورودی */
.glass-card input {
  width: 100%;
  margin: 0.8rem 0;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,0.3);
  font-size: 1rem;
  font-family: 'Roboto Mono', monospace;
  color: #111;
}

/* دکمه لاگین گرد سبز */
.glass-card button {
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 999px;
  background-color: #66ff99;
  color: #000;
  font-size: 1rem;
  font-weight: bold;
  font-family: 'Orbitron', monospace;
  cursor: pointer;
  transition: background 0.3s ease;
}
.glass-card button:hover {
  background-color: #55dd88;
}

/* لینک ثبت‌نام */
.glass-card .small {
  margin-top: 1rem;
  font-size: 0.9rem;
}
.glass-card .small a {
  color: #111;
  text-decoration: none;
}
.glass-card .small a:hover {
  text-decoration: underline;
}

/* پیام خطا (شیشه‌ای وسط صفحه) */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 1;
  transition: opacity 0.4s ease;
}
#overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  border-radius: 18px;
  padding: 1.5rem 2rem;
  color: #fff;
  font-size: 1rem;
  font-family: 'Orbitron', monospace;
  text-align: center;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  animation: fadeIn 0.4s ease;
}
#modalText {
  color: #fff;
}

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

/* دارک مود */
@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #0d0d0d;
    color: #eee;
  }
  .glass-card {
    background: rgba(0, 0, 0, 0.4);
    color: #eee;
  }
  .glass-card input {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
  .glass-card .small a {
    color: #ddd;
  }
  .glass-card button {
    background-color: #66ff99;
    color: #000;
  }
  .glass-card button:hover {
    background-color: #44cc77;
  }
  #copyright {
    color: #555;
  }
}

/* انیمیشن */
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
