:root {
  --primary-color: #00ccff;
  --secondary-color: #9d4dff;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --glass-bg: rgba(20, 20, 25, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(255, 255, 255, 0.02);
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: #050505;
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  perspective: 1000px;
  z-index: 10;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  animation: cardEntry 0.8s var(--ease-out) forwards;
}

.card-header {
  text-align: center;
  margin-bottom: 40px;
}

.app-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #a0c4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.alert-box {
  background: rgba(255, 59, 59, 0.1);
  border: 1px solid rgba(255, 59, 59, 0.2);
  color: #ff5b5b;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  animation: shake 0.5s ease-in-out;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-group {
  position: relative;
  margin-bottom: 10px;
}

.input-group input {
  width: 100%;
  padding: 12px 0 12px 36px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s;
  border-radius: 0;
}

.input-group input:focus {
  outline: none;
  border-color: transparent;
}

.input-group label {
  position: absolute;
  left: 36px;
  top: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -12px;
  left: 0;
  font-size: 12px;
  color: var(--primary-color);
}

.input-icon {
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s;
}

.input-group input:focus ~ .input-icon {
  color: var(--primary-color);
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
  transition: all 0.4s var(--ease-out);
  transform: translateX(-50%);
}

.input-group input:focus ~ .input-line {
  width: 100%;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: -5px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: transparent;
}

.custom-checkbox input:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

.forgot-link {
  color: var(--text-muted);
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #fff;
  text-decoration: underline;
}

.submit-btn {
  position: relative;
  width: 100%;
  padding: 16px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}

.submit-btn:hover {
  transform: scale(1.02);
}

.submit-btn:active {
  transform: scale(0.98);
}

.btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.5s;
  pointer-events: none;
}

.submit-btn:hover .btn-glow {
  transform: scale(1);
}

.card-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.register-link {
  color: var(--primary-color);
  font-weight: 600;
  margin-left: 6px;
  position: relative;
}

.register-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: width 0.3s;
}

.register-link:hover::after {
  width: 100%;
}

@keyframes cardEntry {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 480px) {
  .glass-card { padding: 40px 24px; }
  .app-title { font-size: 28px; }
}
