/* --- your original look --- */
/* === Romantic Theme Background === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(120deg, #fbc7c7, #e56a6a);
    color: #fff;
    text-align: center;
    padding: 0;
    overflow-x: hidden;
    position: relative;
}
h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    text-shadow: 1px 1px 8px rgba(255, 70, 102, 0.6);
    margin-bottom: 20px;
}

/* Soft Glow for Flip Cards */
.flip-card .top,
.flip-card .bottom {
    box-shadow: 0 0 12px rgba(255, 74, 105, 0.6);
    border: 1px solid rgba(255, 99, 132, 0.4);
}

/* (legacy boxes kept; harmless if unused) */
.timer {
    font-size: 2.5rem;
    font-weight: bold;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 20px;
}
.age {
    font-size: 1.2rem;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 10px;
}

/* Buttons with romantic look */
button {
    padding: 12px 28px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff8a8a, #ff3d6a);
    color: white;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 70, 102, 0.5);
}
button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(255, 61, 106, 0.6);
}

/* --- flip clock styles (new) --- */
.flip-clock {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.flip-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.flip-card .top.hidden {
    visibility: hidden;
}
.flip-unit .label {
    font-size: 0.9rem;
    margin-top: 8px;
    color: rgba(255,255,255,0.85);
}

/* card halves */
.flip-card {
    position: relative;
    width: 92px;
    height: 112px;
    border-radius: 14px;
    perspective: 1000px;
}

.flip-card .top,
.flip-card .bottom {
    position: absolute;
    left: 0; right: 0;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 1px;
    background: #2a2a2a;
    color: #fff;
    backface-visibility: hidden;
    overflow: hidden;
}

.flip-card .top {
    top: 0;
    border-radius: 14px 14px 0 0;
    border-bottom: 2px solid rgba(0,0,0,0.45);
}

.flip-card .bottom {
    bottom: 0;
    /* More rounded corners on all edges of bottom half */
    border-radius: 12px 12px 12px 12px; /* top-left, top-right, bottom-right, bottom-left */
    background: #1b1b1b;
    border-top: 2px solid rgba(255,255,255,0.06);
    transition: border-radius 0.2s;
}
.flip-card .bottom.soft {
    border-radius: 14px 14px 40px 40px;
}

/* animated layers created dynamically */
.flip {
    position: absolute;
    inset: 0;
    pointer-events: none;
    perspective: inherit;
}

.top-flip,
.bottom-flip {
    position: absolute;
    left: 0; right: 0;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    backface-visibility: hidden;
}

.top-flip {
    top: 0;
    background: #2a2a2a;
    border-radius: 14px 14px 0 0;
    border-bottom: 2px solid rgba(0,0,0,0.45);
    transform-origin: bottom;
    animation: flipTop 0.5s ease-in forwards;
    z-index: 3;
}

.bottom-flip {
    bottom: 0;
    background: #1b1b1b;
    border-radius: 0 0 14px 14px;
    border-top: 2px solid rgba(255,255,255,0.06);
    transform-origin: top;
    transform: rotateX(90deg);
    animation: flipBottom 0.5s ease-out forwards;
    z-index: 2;
}

@keyframes flipTop {
    0%   { transform: rotateX(0); }
    100% { transform: rotateX(-90deg); }
}
@keyframes flipBottom {
    0%   { transform: rotateX(90deg); }
    100% { transform: rotateX(0); }
}
/* === Floating Hearts === */
#hearts-container {
    position: fixed;       /* stays in place while page scrolls */
    top: 0;
    left: 0;
    width: 100vw;          /* 100% of viewport width */
    height: 100vh;         /* 100% of viewport height */
    pointer-events: none;  /* allows clicking content through it */
    overflow: hidden;      /* hide hearts that go outside screen */
    z-index: 1000;         /* on top of everything */
    background: transparent !important; /* force transparency */
}
.heart {
    position: absolute;
    background: url('heart-icon.png') no-repeat center/contain;
    background-color: transparent;
    opacity: 0.8;
    pointer-events: none;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) scale(1); opacity: 0.9; }
    100% { transform: translateY(-10vh) scale(1.3); opacity: 0; }
}

/* === Responsive Fixes === */
@media (max-width: 500px) {
    h1 { font-size: 2.2rem; }
    .flip-card {
        width: 64px;
        height: 80px;
    }
    .flip-card .top,
    .flip-card .bottom,
    .top-flip,
    .bottom-flip {
        font-size: 28px;
    }
    button {
        padding: 10px 20px;
        font-size: 1rem;
    }
}
#pw-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(30, 14, 40, 0.60);
  display: flex; align-items: center; justify-content: center;
  z-index: 10001;
}
#pw-modal {
  background: linear-gradient(120deg, #fff6fa 60%, #ffdde7 100%);
  border-radius: 24px;
  box-shadow: 0 8px 42px #e91e6330;
  padding: 38px 30px 32px 30px;
  max-width: 360px; width: 90vw;
  text-align: center;
  color: #e91e63;
  font-family: 'Segoe UI', 'Great Vibes', cursive, sans-serif;
}
#pw-modal h2 {
  margin-top: 0; margin-bottom: 14px;
  font-size: 2rem;
}
#pw-modal input[type=password] {
  padding: 12px;
  border-radius: 9px;
  border: 1.5px solid #e91e63;
  margin-bottom: 14px;
  width: 85%;
  font-size: 1.1rem;
  outline: none;
  box-shadow: 0 2px 10px #fff1f830;
}
#pw-btn {
  padding: 10px 20px;
  background: linear-gradient(90deg, #e91e63 60%, #ff80aa);
  color: #fff; border: none; border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer; margin-bottom: 6px;
  box-shadow: 0 4px 16px #f8bbd034;
  transition: background 0.2s;
}
#pw-btn:hover {
  background: linear-gradient(90deg, #ff4e8d 70%, #e040fb);
}
#pw-error {
  min-height: 24px;
}
