.main-wrapper {
    /* Kept upright to eliminate abrupt snapping and subpixel blur */
    transform: none;
}

#hearts-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#hearts-layer .floating-heart {
    position: absolute;
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.12));
    opacity: 0;
    bottom: -14%;
    animation-name: heartRise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

@keyframes heartRise {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(var(--heart-rot, 0deg));
    }
    12% {
        opacity: var(--heart-opacity, 0.55);
    }
    58% {
        opacity: var(--heart-opacity, 0.55);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--heart-drift, 0px), -115vh, 0) rotate(calc(var(--heart-rot, 0deg) + 20deg));
    }
}

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 30px 48px 24px;
    position: relative;
    z-index: 1;
}

.left-panel {
    width: min(44%, 420px);
    z-index: 2;
}

#clock {
    font-size: clamp(3.8rem, 9vw, 6.5rem);
    color: #32468f;
    line-height: 0.95;
    letter-spacing: -2px;
    margin-bottom: 22px;
}

.flower-field {
    background: linear-gradient(135deg, rgba(241, 118, 172, 0.35), rgba(157, 101, 233, 0.3), rgba(77, 113, 199, 0.28));
    border: 2px dashed rgba(255, 255, 255, 0.85);
    padding: 18px;
    border-radius: 20px;
    width: 100%;
    text-align: center;
    min-height: 120px;
    display: grid;
    place-items: center;
    color: #7b337f;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(78, 107, 173, 0.16);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.flower-field:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 26px rgba(78, 107, 173, 0.25);
    background: linear-gradient(135deg, rgba(241, 118, 172, 0.45), rgba(157, 101, 233, 0.38), rgba(77, 113, 199, 0.35));
}

.flower-field span {
    opacity: 0.92;
}

.valentine-section {
    margin-left: auto;
    margin-right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.valentine-title {
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    color: #7d3289;
    margin-bottom: 16px;
    max-width: 420px;
    text-align: center;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85), 0 0 24px rgba(241, 118, 172, 0.3);
}

.profile-circle {
    width: min(34vw, 220px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 7px solid rgba(255, 255, 255, 0.96);
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(38, 77, 119, 0.22);
    background: white;
    transform: translateZ(0);
    animation: profilePulse 4s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes profilePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.028); }
}

/* Authenticated Login Form */
.login-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(320px, 92%);
    z-index: 10;
}

.login-input-row {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    opacity: 0.75;
    pointer-events: none;
}

.login-field {
    width: 100%;
    padding: 12px 18px 12px 44px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    color: #2f2f63;
    font-size: 0.98rem;
    font-weight: 700;
    outline: none;
    box-shadow: 0 4px 14px rgba(65, 107, 181, 0.12);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-field:focus {
    background: rgba(255, 255, 255, 0.96);
    border-color: #f176ac;
    box-shadow: 0 0 0 4px rgba(241, 118, 172, 0.25);
}

.login-field::placeholder {
    color: #8385ad;
    font-weight: 500;
}

.login-error-msg {
    min-height: 22px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #d12771;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    text-align: center;
    transition: opacity 0.2s ease;
}

.login-btn {
    margin-top: 4px;
    background: linear-gradient(120deg, #f176ac, #9d65e9, #4d71c7);
    color: white;
    border: none;
    padding: 12px 42px;
    border-radius: 30px;
    font-size: 1.12rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    box-shadow: 0 8px 20px rgba(65, 107, 181, 0.26);
}

.login-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 26px rgba(65, 107, 181, 0.32);
}

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

.login-shake {
    animation: loginShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

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