:root {
  --neon-blue: #00f2ff;
  --dark-bg: #0d1117;
  --panel-bg: #161b22;
  --border-color: #30363d;
  --error-red: #ff4d4f;
  --text-secondary: #8b949e;
  --text-primary: #ffffff;
}

body {
  background-color: var(--dark-bg);
  font-family: "Segoe UI", system-ui, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  color: var(--text-primary);
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(0, 242, 255, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(0, 242, 255, 0.03) 0%,
      transparent 50%
    );
}

.login-card {
  background: var(--panel-bg);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 242, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    transparent
  );
}

.login-card h2 {
  margin: 0 0 2rem 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--neon-blue);
  text-transform: uppercase;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
}

.login-card h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    transparent
  );
}

.input-group {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

input:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow:
    0 0 0 3px rgba(0, 242, 255, 0.1),
    0 0 20px rgba(0, 242, 255, 0.2);
  background: rgba(13, 17, 23, 0.8);
}

input[type="password"],
input[type="text"].pass-field {
  padding-right: 4.5rem;
}

.toggle-btn {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neon-blue);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-btn:hover {
  background: rgba(0, 242, 255, 0.1);
  border-color: var(--neon-blue);
  transform: translateY(-1px);
}

.toggle-btn:active {
  transform: translateY(0);
}

.btn-login {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--neon-blue) 0%, #00c6ff 100%);
  border: none;
  border-radius: 8px;
  color: var(--dark-bg);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-login:hover {
  box-shadow:
    0 10px 25px rgba(0, 242, 255, 0.4),
    0 0 0 1px rgba(0, 242, 255, 0.2);
  transform: translateY(-2px);
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:active {
  transform: translateY(0);
}

.extra-links {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.extra-links p {
  margin: 0.75rem 0;
}

.extra-links a {
  color: var(--neon-blue);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.extra-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--neon-blue);
  transition: width 0.3s ease;
}

.extra-links a:hover::after {
  width: 100%;
}

.extra-links a:hover {
  color: #00e5ff;
}

/* BYN Logo at bottom-left */
.byn-logo {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.byn-logo:hover {
  opacity: 1;
}

.byn-logo img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 2px rgba(0, 242, 255, 0.5));
}

.byn-text {
  font-size: 0.75rem;
  color: var(--neon-blue);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.byn-subtitle {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.neon-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid transparent;
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow:
    0 0 20px var(--neon-blue),
    inset 0 0 20px rgba(0, 242, 255, 0.2);
  position: relative;
}

.neon-spinner::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-radius: 50%;
  border-top-color: rgba(0, 242, 255, 0.3);
  animation: spin 2s linear infinite reverse;
}

.loader-overlay p {
  margin-top: 1.5rem;
  color: var(--neon-blue);
  font-size: 1rem;
  letter-spacing: 1px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.error-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--error-red);
  padding: 1rem 1.5rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  border-radius: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 77, 79, 0.1);
  z-index: 1001;
  animation: slideIn 0.3s ease-out;
  max-width: 350px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.error-toast i {
  color: var(--error-red);
  font-size: 1.25rem;
  flex-shrink: 0;
}

#errorMessage {
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.4;
}

.input-error {
  border-color: var(--error-red) !important;
  box-shadow:
    0 0 0 3px rgba(255, 77, 79, 0.1),
    0 0 15px rgba(255, 77, 79, 0.3) !important;
  animation: shake 0.3s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(2px);
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
  }

  .error-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }

  .byn-logo {
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .byn-text {
    font-size: 0.7rem;
  }

  .byn-subtitle {
    font-size: 0.6rem;
  }
}
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

/* Main popup card */
.popup-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 242, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: popupEntrance 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.popup-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--neon-blue),
    transparent
  );
}

/* Header */
.popup-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.icon-container {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
}

.icon-container i {
  font-size: 2.5rem;
  color: var(--neon-blue);
  position: relative;
  z-index: 2;
  background: var(--panel-bg);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

.pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid rgba(0, 242, 255, 0.4);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.popup-header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.warning-badge {
  display: inline-block;
  background: rgba(255, 204, 0, 0.1);
  color: #ffcc00;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 204, 0, 0.3);
  animation: glow 2s infinite alternate;
}

.popup-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Body */
.popup-body {
  margin-bottom: 2rem;
}

.message-card {
  background: rgba(13, 17, 23, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.message-card i {
  color: var(--neon-blue);
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.message-title {
  color: var(--text-primary);
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.message-desc {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Contact section */
.contact-section {
  background: rgba(13, 17, 23, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 242, 255, 0.1);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neon-blue);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-label i {
  font-size: 1.1rem;
}

.contact-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  background: var(--dark-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.contact-card:hover {
  border-color: var(--neon-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 242, 255, 0.15);
}

.contact-card:hover .contact-arrow {
  transform: translateX(3px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-card .contact-icon {
  background: rgba(255, 204, 0, 0.1);
  border: 1px solid rgba(255, 204, 0, 0.2);
}

.admin-card .contact-icon i {
  color: #ffcc00;
}

.dev-card .contact-icon {
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid rgba(0, 242, 255, 0.2);
}

.dev-card .contact-icon i {
  color: var(--neon-blue);
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-role {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}

.contact-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.contact-link:hover {
  color: var(--neon-blue);
}

.contact-link i {
  font-size: 1.1rem;
}

.contact-arrow {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.notice i {
  color: #00cc88;
}

/* Footer */
.popup-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.popup-footer button {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue) 0%, #00c6ff 100%);
  color: var(--dark-bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--neon-blue) !important;
  background: rgba(0, 242, 255, 0.05);
}

/* Animations */
@keyframes popupEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes glow {
  from {
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .popup-card {
    padding: 1.75rem;
  }

  .popup-footer {
    flex-direction: column;
  }

  .popup-footer button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .popup-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem;
    max-width: 400px;
  }
  .message-title {
    font-size: 0.9rem;
  }
}
