
:root {
  --bg-start: #0a0a0f;
  --bg-end: #000;
  --accent-purple: rgba(138, 43, 226, 0.15);
  --accent-blue: rgba(0, 100, 255, 0.08);
  --text: #fff;
  --input-bg: #11111168;
  --input-border: #44444478;
  --input-focus: #50415966;
  --btn-bg-start: #1a1a1a;
  --btn-bg-end: #2d2a2f92;
  --btn-bg-end2: #2e1a2f80;
  --btn-text: #f0ebff;
  --result-color: #b890c8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  background: radial-gradient(ellipse at center, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: drift 10s linear infinite;
  opacity: 0.3;
}

@keyframes drift {
  0% { transform: translate(0,0); }
  100% { transform: translate(50px,50px); }
}

.accent-glow {
  position: absolute;
  top: 5%;
  right: 2%;
  width: 200px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite;
  filter: blur(50px);
}

.accent-glow-2 {
  position: absolute;
  bottom: 20%;
  left: 10%;
  width: 500px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite reverse;
  filter: blur(30px);
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.container {
  position: relative;
  text-align: center;
  z-index: 10;
  background: rgba(5,5,5,0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 60px 50px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  max-width: 500px;
  width: 90%;
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: drift 13s linear infinite;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

input {
  padding: 8px 12px;
  margin: 10px 0;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--input-focus);
}

button {
  padding: 8px 30px;
  margin: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 13px;
  background: linear-gradient(135deg, var(--btn-bg-start) 0%, var(--btn-bg-end) 100%, var(--btn-bg-end2) 100%);
  color: var(--btn-text);
  box-shadow: 0 10px 20px rgba(92,0,120,0.05), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.3s, box-shadow 0.9s, transform 0.3s;
}

button:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 15px 25px rgba(92,0,120,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
}

.res {
  font-size: 1.2rem;
  text-shadow: 0 2px 20px rgba(255,255,255,0.1);
  background: linear-gradient(100deg,#ffffff,#494949);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 300;
}

#result {
  margin-top: 20px;
  font-weight: bold;
  color: var(--result-color);
  font-size: 1.3em;
}

h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(255,255,255,0.1);
  background: linear-gradient(100deg, #ffffff, #6c6c6c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

strong {
  font-weight: 400;
}