@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --bg: #0b0d13;
  --card: #241223;
  --lilla: #dda0dd;
  --accent: #8b0d3c;
  --muted: #9ea0a8;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--main-bg);
  background: radial-gradient(
    circle at center,
    #3d1a2e 0%,
    #1a0f1f 50%,
    #0b0d13 100%
  );

  /* --- ADD THESE LINES TO CENTER --- */
  height: 100vh; /* Takes up full screen height */
  display: flex; /* Enables flexbox */
  justify-content: center; /* Centers horizontally */
  align-items: center; /* Centers vertically */
  overflow: hidden; /* Prevents scrollbars from the snow */
}

/* Minimal .wrap rules so canvas can be clipped to the card */
.wrap {
  position: relative;
  overflow: hidden;
}

/* Fullscreen background canvas (heart animation) */
#canvas {
  position: absolute; /* positioned relative to .wrap */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1; /* behind card content */
  pointer-events: none; /* clicks pass through */
  opacity: 0.88; /* subtle */
  mix-blend-mode: overlay;
}

.login-container {
  width: 90%;
  max-width: 320px;
  min-height: 300px;
  background: #241223;
  border: 1px solid rgba(221, 160, 221, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(139, 13, 60, 0.4),
    0 0 30px rgba(221, 160, 221, 0.15);
}

.login-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 13, 60, 0.08) 0%,
    rgba(221, 160, 221, 0.05) 100%
  );
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.username,
.password {
  display: flex;
  flex-direction: column;
  width: 85%;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

label {
  font-size: 0.75rem;
  padding-left: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  color: #dda0dd;
  opacity: 1;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(221, 160, 221, 0.12);
  border-radius: 8px;
  color: #fff;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  font-size: 16px;
}

input:focus {
  outline: none;
  border-color: #dda0dd;
  box-shadow: 0 0 10px rgba(221, 160, 221, 0.3);
  background: rgba(221, 160, 221, 0.05);
}

/* Styling the placeholder text */
input::placeholder {
  color: #4b4e5a;
  font-size: 0.85rem;
}

.login-btn {
  width: 85%;
  padding: 14px 32px;
  font-family: "Georgia", serif;
  border: 2px solid rgba(221, 160, 221, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, #8b0d3c 0%, #a01040 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  min-width: 180px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(139, 13, 60, 0.4),
    0 0 15px rgba(221, 160, 221, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  z-index: 1;
}

.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(221, 160, 221, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:hover {
  background: linear-gradient(135deg, #a01853 0%, #c22454 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 13, 60, 0.6),
    0 0 25px rgba(221, 160, 221, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(221, 160, 221, 0.5);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(139, 13, 60, 0.4),
    0 0 15px rgba(221, 160, 221, 0.2);
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.login-container::after,
.login-container::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: conic-gradient(
    from var(--angle),
    transparent 70%,
    #dda0dd 80%,
    #8b0d3c 90%,
    transparent 100%
  );
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 3px;
  border-radius: 12px;
  animation: 4s spin linear infinite;
}

.login-container::before {
  filter: blur(1.5rem);
  opacity: 0.6;
  z-index: -2;
}

@keyframes spin {
  from {
    --angle: 0deg;
  }

  to {
    --angle: 360deg;
  }
}

/* Container to keep snow behind your login box */
.snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* So you can still click your login buttons */
  z-index: 0;
}

.b {
  border-radius: 50%;
  position: absolute;
  top: -10px;
  pointer-events: none;
  will-change: transform;
}

@keyframes fall {
  0% {
    transform: translateY(0) translateX(0) scale(0);
  }
  10% {
    transform: translateY(10vh) translateX(10px) scale(1);
  }
  50% {
    transform: translateY(50vh) translateX(-15px);
  }
  100% {
    transform: translateY(105vh) translateX(5px) scale(0.5);
  }
}

.security-container {
  width: 90%;
  max-width: 320px;
  min-height: 300px;
  background: #241223;
  border: 1px solid rgba(221, 160, 221, 0.3);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(139, 13, 60, 0.4),
    0 0 30px rgba(221, 160, 221, 0.15);
  padding: 30px 20px;
}

.security-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 13, 60, 0.08) 0%,
    rgba(221, 160, 221, 0.05) 100%
  );
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

.security-container::after,
.security-container::before {
  content: "";
  position: absolute;
  height: 100%;
  width: 100%;
  background-image: conic-gradient(
    from var(--angle),
    transparent 70%,
    #dda0dd 80%,
    #8b0d3c 90%,
    transparent 100%
  );
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: -1;
  padding: 3px;
  border-radius: 12px;
  animation: 4s spin linear infinite;
}

.security-container::before {
  filter: blur(1.5rem);
  opacity: 0.6;
}

.security-container h2 {
  color: #dda0dd;
  font-size: 1.2rem;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 600;
}

.security-container p {
  color: #fff;
  margin-bottom: 20px;
  text-align: center;
}

.color-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.color-options label {
  display: flex;
  align-items: center;
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
}

.color-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #8b0d3c;
}

.security-btn {
  width: 85%;
  padding: 14px 32px;
  font-family: "Georgia", serif;
  border: 2px solid rgba(221, 160, 221, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, #8b0d3c 0%, #a01040 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  min-width: 180px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(139, 13, 60, 0.4),
    0 0 15px rgba(221, 160, 221, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.security-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(221, 160, 221, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.security-btn:hover::before {
  left: 100%;
}

.security-btn:hover {
  background: linear-gradient(135deg, #a01853 0%, #c22454 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 13, 60, 0.6),
    0 0 25px rgba(221, 160, 221, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(221, 160, 221, 0.5);
}

.security-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(139, 13, 60, 0.4),
    0 0 15px rgba(221, 160, 221, 0.2);
}
