/* ===== MODERN MINIMALISTIC DARK DESIGN ===== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Root Color Palette ===== */
:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --bg-tertiary: #252d47;
  --text-primary: #ffffff;
  --text-secondary: #b0b8cc;
  --accent-blue: #00d4ff;
  --accent-purple: #a78bfa;
  --accent-cyan: #06b6d4;
  --error: #ff6b6b;
  --success: #10b981;
}

/* ===== Body & Container ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

.container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0f1332 50%, var(--bg-primary) 100%);
  z-index: 0;
  overflow: hidden;
}

/* Animated background circles */
.container::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -100px;
  right: -100px;
  animation: floatCircle1 8s ease-in-out infinite;
  z-index: 0;
}

.container::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -50px;
  left: -50px;
  animation: floatCircle2 10s ease-in-out infinite;
  z-index: 0;
}

/* Floating Pills */
.container::before,
.container::after {
  pointer-events: none;
}

/* Red Pill Element */
.red-pill {
  position: absolute;
  width: 60px;
  height: 30px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3), inset -2px -2px 5px rgba(0, 0, 0, 0.3);
  z-index: 0;
  animation: floatPillRed 8s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
}

.red-pill:nth-child(1) {
  top: 15%;
  left: 10%;
  animation: floatPillRed 8s ease-in-out infinite;
}

.red-pill:nth-child(2) {
  top: 70%;
  right: 8%;
  width: 50px;
  height: 25px;
  animation: floatPillRed 10s ease-in-out 1s infinite;
}

.red-pill:nth-child(3) {
  top: 40%;
  right: 5%;
  width: 70px;
  height: 35px;
  animation: floatPillRed 12s ease-in-out 2s infinite;
  opacity: 0.4;
}

/* Blue Pill Element */
.blue-pill {
  position: absolute;
  width: 60px;
  height: 30px;
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3), inset -2px -2px 5px rgba(0, 0, 0, 0.3);
  z-index: 0;
  animation: floatPillBlue 8s ease-in-out infinite;
  opacity: 0.6;
  pointer-events: none;
}

.blue-pill:nth-child(1) {
  top: 25%;
  right: 15%;
  animation: floatPillBlue 9s ease-in-out infinite;
}

.blue-pill:nth-child(2) {
  bottom: 20%;
  left: 12%;
  width: 55px;
  height: 27px;
  animation: floatPillBlue 11s ease-in-out 1.5s infinite;
}

.blue-pill:nth-child(3) {
  top: 55%;
  left: 8%;
  width: 65px;
  height: 32px;
  animation: floatPillBlue 13s ease-in-out 2.5s infinite;
  opacity: 0.4;
}

@keyframes floatCircle1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

@keyframes floatCircle2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 20px); }
}

@keyframes floatPillRed {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) translateX(15px) rotate(15deg);
  }
  50% {
    transform: translateY(-40px) translateX(-10px) rotate(30deg);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-20px) translateX(20px) rotate(15deg);
  }
}

@keyframes floatPillBlue {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(20px) translateX(-15px) rotate(-15deg);
  }
  50% {
    transform: translateY(40px) translateX(10px) rotate(-30deg);
    opacity: 0.3;
  }
  75% {
    transform: translateY(20px) translateX(-20px) rotate(-15deg);
  }
}


/* ===== Main Box ===== */
.box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  padding: 60px 45px;
  background: rgba(26, 31, 58, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Logo Container ===== */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
  animation: logoFadeInScale 0.8s ease-out;
}

@keyframes logoFadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.logo {
  width: clamp(120px, 35vw, 280px);
  height: auto;
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.2));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.4));
}

/* ===== Title & Subtitle ===== */
.title {
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  animation: titleSlideIn 0.8s ease-out 0.1s backwards;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title span {
  display: block;
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: 0.5px;
  -webkit-text-fill-color: unset;
  background: none;
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Form ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  animation: formFadeIn 0.8s ease-out 0.2s backwards;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== Input Fields ===== */
.input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  font-size: 15px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: inputSlideIn 0.6s ease-out backwards;
}

.input:nth-of-type(1) { animation-delay: 0.3s; }
.input:nth-of-type(2) { animation-delay: 0.4s; }
.input:nth-of-type(3) { animation-delay: 0.5s; }

@keyframes inputSlideIn {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  transform: translateY(-2px);
}

.input:focus::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Button ===== */
.button-confirm {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-cyan) 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.25);
  animation: buttonSlideIn 0.6s ease-out 0.6s backwards;
  position: relative;
  overflow: hidden;
}

@keyframes buttonSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.button-confirm::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.button-confirm:hover::before {
  left: 100%;
}

.button-confirm:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.35);
}

.button-confirm:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.25);
}

.button-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: linear-gradient(135deg, #505060 0%, #606070 100%);
  box-shadow: none;
}

/* ===== Output Message ===== */
#output {
  min-height: 40px;
  padding: 12px 16px;
  margin-top: 15px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  animation: messageSlide 0.4s ease-out;
  transition: all 0.3s ease;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#output.error {
  color: var(--error);
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.3);
}

#output.success {
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  min-height: auto;
  padding: 30px 25px;
  margin-top: 30px;
  font-size: 16px;
}

/* ===== Success Container ===== */
.success-message {
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  min-height: auto;
  padding: 30px 25px;
  margin-top: 30px;
  font-size: 16px;
  animation: messageSlide 0.4s ease-out;
  transition: all 0.3s ease;
}


/* ===== Falling Flowers ===== */
#flowers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

.falling-flower {
  position: absolute;
  font-size: 32px;
  opacity: 0.9;
  animation: flowerFall var(--flower-duration, 6s) cubic-bezier(0.12, 0, 0.39, 0) forwards;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
}

@keyframes flowerFall {
  0% {
    top: -50px;
    opacity: 1;
    transform: translateX(var(--tx-start, 0px)) rotate(var(--rot-start, 0deg));
  }
  100% {
    top: 100vh;
    opacity: 0.5;
    transform: translateX(var(--tx-end, 0px)) rotate(var(--rot-end, 360deg));
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .box {
    padding: 45px 30px;
    max-width: 90vw;
  }

  .form {
    gap: 14px;
  }

  .title {
    font-size: clamp(24px, 6vw, 32px);
  }

  .input {
    height: 48px;
    padding: 0 15px;
  }

  .button-confirm {
    height: 50px;
  }

  /* Responsive pills for tablets */
  .red-pill {
    width: 50px;
    height: 25px;
  }

  .red-pill:nth-child(2) {
    width: 40px;
    height: 20px;
  }

  .red-pill:nth-child(3) {
    width: 55px;
    height: 27px;
  }

  .blue-pill {
    width: 50px;
    height: 25px;
  }

  .blue-pill:nth-child(2) {
    width: 45px;
    height: 22px;
  }

  .blue-pill:nth-child(3) {
    width: 55px;
    height: 27px;
  }
}

@media (max-width: 480px) {
  .box {
    padding: 40px 24px;
  }

  .logo-container {
    margin-bottom: 40px;
  }

  .title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 10px;
  }

  .title span {
    font-size: clamp(12px, 3vw, 14px);
  }

  .form {
    gap: 12px;
  }

  .input {
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 10px;
  }

  .button-confirm {
    height: 48px;
    font-size: 14px;
    margin-top: 12px;
  }

  .social-auth {
    margin-top: 25px;
  }

  .auth-divider {
    margin-bottom: 16px;
    font-size: 12px;
  }

  .social-buttons {
    gap: 8px;
  }

  .social-btn {
    padding: 11px 16px;
    font-size: 12px;
    min-width: 120px;
  }

  .social-logo {
    width: 18px;
    height: 18px;
  }

  #output {
    font-size: 13px;
    padding: 10px 14px;
    margin-top: 15px;
  }

  .falling-flower {
    font-size: 28px;
  }

  /* Responsive pills for mobile */
  .red-pill {
    width: 40px;
    height: 20px;
  }

  .red-pill:nth-child(1) {
    top: 12%;
    left: 8%;
  }

  .red-pill:nth-child(2) {
    width: 35px;
    height: 17px;
    bottom: 15%;
    right: 5%;
  }

  .red-pill:nth-child(3) {
    width: 45px;
    height: 22px;
    top: 50%;
    right: 3%;
    opacity: 0.3;
  }

  .blue-pill {
    width: 40px;
    height: 20px;
  }

  .blue-pill:nth-child(1) {
    top: 20%;
    right: 10%;
  }

  .blue-pill:nth-child(2) {
    width: 38px;
    height: 19px;
    bottom: 18%;
    left: 8%;
  }

  .blue-pill:nth-child(3) {
    width: 45px;
    height: 22px;
    top: 45%;
    left: 5%;
    opacity: 0.3;
  }
}
