/* =========================================
   PUCC IT — Lilac & Butter Yellow Theme
   ========================================= */

:root {
  --lilac:        #c8a9d8;
  --lilac-light:  #e8d5f2;
  --lilac-dark:   #9b6fb5;
  --lilac-soft:   #f3eafa;
  --butter:       #f9e87a;
  --butter-light: #fdf5b3;
  --butter-dark:  #e0c832;
  --white:        #ffffff;
  --text-dark:    #3a2d50;
  --text-mid:     #6b5b80;
  --text-light:   #9e8fb0;
  --radius-xl:    24px;
  --radius-pill:  999px;
  --shadow-soft:  0 8px 30px rgba(155, 111, 181, 0.18);
  --shadow-card:  0 20px 60px rgba(155, 111, 181, 0.25);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, var(--lilac-soft) 0%, var(--butter-light) 60%, var(--lilac-light) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  color: var(--text-dark);
  position: relative;
}

/* ---- Background Blobs ---- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: var(--lilac);
  top: -120px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 350px;
  height: 350px;
  background: var(--butter);
  bottom: -80px;
  right: -80px;
  animation-delay: -3s;
}

.blob-3 {
  width: 250px;
  height: 250px;
  background: var(--lilac-light);
  top: 50%;
  right: 10%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

/* ---- Container ---- */
.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  width: 90%;
  text-align: center;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(200, 169, 216, 0.4);
  box-shadow: var(--shadow-card);
  margin: 40px auto;
}

/* ---- Hero / Header ---- */
.hero {
  margin-bottom: 40px;
}

.badge {
  display: inline-block;
  background: var(--butter);
  color: var(--text-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(224, 200, 50, 0.4);
  animation: pulse-badge 2.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

.title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(3.5rem, 12vw, 6rem);
  color: var(--lilac-dark);
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow:
    4px 4px 0px var(--butter),
    6px 6px 0px rgba(155, 111, 181, 0.2);
  margin-bottom: 20px;
  animation: title-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes title-pop {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0px);  }
}

.subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-mid);
  line-height: 1.7;
}

.highlight {
  background: linear-gradient(120deg, var(--lilac-dark), var(--lilac));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

/* ---- Form Section ---- */
.form-section {
  margin-bottom: 32px;
}

.email-form {
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-input {
  width: 100%;
  padding: 18px 24px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  background: var(--white);
  border: 2.5px solid var(--lilac);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  text-align: center;
}

.email-input::placeholder {
  color: var(--lilac);
  font-weight: 700;
  font-style: italic;
}

.email-input:focus {
  border-color: var(--lilac-dark);
  box-shadow: 0 0 0 4px rgba(155, 111, 181, 0.15), var(--shadow-soft);
  transform: translateY(-2px);
}

.email-input.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

.submit-btn {
  width: 100%;
  padding: 18px 32px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--butter) 0%, var(--butter-dark) 100%);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(224, 200, 50, 0.45), 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(224, 200, 50, 0.55), 0 4px 8px rgba(0,0,0,0.1);
  filter: brightness(1.05);
}

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

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  font-size: 1.2rem;
}

/* ---- Error Message ---- */
.error-msg {
  margin-top: 10px;
  min-height: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #c0567d;
  transition: opacity 0.3s;
}

/* ---- Success Card ---- */
.success-card {
  display: none;
  padding: 32px 24px;
  background: linear-gradient(135deg, var(--lilac-light), var(--butter-light));
  border: 2px solid var(--lilac);
  border-radius: var(--radius-xl);
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-card.visible {
  display: block;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1);   }
}

.success-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
}

.success-title {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem;
  color: var(--lilac-dark);
  margin-bottom: 8px;
}

.success-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-mid);
}

/* ---- Footer ---- */
.footer {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ---- Responsive ---- */
@media (min-width: 480px) {
  .input-group {
    flex-direction: row;
    gap: 12px;
  }

  .submit-btn {
    width: auto;
    white-space: nowrap;
    padding: 18px 30px;
    flex-shrink: 0;
  }

  .email-input {
    text-align: left;
  }
}

@media (max-width: 479px) {
  .container {
    padding: 44px 24px;
  }
}
