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

:root {
  --bg:           #FFF0F5;
  --surface:      #FFD6E7;
  --accent:       #E91E63;
  --primary:      #FF85A1;
  --border:    #FFC2D4;
  --text-dark: #4A1030;
  --text-mid:     #c2185b;
  --white:     #ffffff;
}

html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  overflow: hidden;
}

/* ── Floating hearts background ── */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.heart-float {
  position: absolute;
  bottom: -60px;
  font-size: 1.2rem;
  opacity: 0;
  animation: floatUp linear infinite;
  user-select: none;
}

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-110vh) rotate(20deg) scale(1.1); opacity: 0; }
}

/* ── Main container ── */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  animation: pageFadeIn 0.7s ease both;
}

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

/* ── Cat peeking ── */
.cat-wrapper {
  position: relative;
  z-index: 2;
  margin-bottom: -38px;
  animation: catBob 3s ease-in-out infinite;
}

.cat-peeking {
  width: 160px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(233,30,99,0.18));
  display: block;
}

@keyframes catBob {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 2.5px solid var(--border);
  border-radius: 28px;
  padding: 2.4rem 2.8rem 2.2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(233,30,99,0.10);
  position: relative;
  z-index: 1;
  animation: cardSlideUp 0.75s cubic-bezier(.34,1.56,.64,1) 0.1s both;
}

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

/* ── Welcome text ── */
.welcome-text {
  font-family: 'Dancing Script', cursive;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 0.98rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 1.6rem;
  opacity: 0.85;
}

/* ── Form ── */
.form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.input-wrapper {
  width: 100%;
  transition: transform 0.1s;
}

.input-wrapper.shake {
  animation: shake 0.45s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90%  { transform: translateX(-3px); }
  20%, 80%  { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60%  { transform: translateX(6px); }
}

.password-input {
  width: 100%;
  padding: 0.85rem 1.4rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  background: var(--bg);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  letter-spacing: 3px;
  text-align: center;
}

.password-input::placeholder {
  letter-spacing: 4px;
  color: var(--border);
  font-size: 1.3rem;
}

.password-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(233,30,99,0.10);
  background: #fff;
}

.password-input.error {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(233,30,99,0.15);
}

/* ── Enter button ── */
.enter-btn {
  padding: 0.82rem 3rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(233,30,99,0.28);
  min-width: 160px;
}

.enter-btn:hover {
  background: #c2185b;
  box-shadow: 0 6px 24px rgba(233,30,99,0.38);
  transform: translateY(-1px);
}

.enter-btn:active {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 2px 10px rgba(233,30,99,0.25);
}

.enter-btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

/* ── Error message ── */
.error-msg {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
  min-height: 1.2em;
}

.error-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page exit transition ── */
.container.exit {
  animation: pageExit 0.5s ease forwards;
}

@keyframes pageExit {
  to { opacity: 0; transform: translateY(-20px) scale(0.97); }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card { padding: 2rem 1.6rem 1.8rem; }
  .welcome-text { font-size: 2.4rem; }
  .cat-peeking { width: 130px; }
}
