/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 弹窗容器 */
#popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
}

/* 弹窗基础样式 */
.heart-popup {
    position: absolute;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    min-width: 200px;
    max-width: 300px;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
    animation: fadeInSlideIn 0.6s ease-out forwards;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center; /* 垂直居中 */
    gap: 8px;
    flex-wrap: nowrap;
}

.heart-popup:hover {
    transform: translateY(-25px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 颜色系统 - 20种柔和背景色 */
.heart-popup.color-1 { background-color: #F8C8DC; }
.heart-popup.color-2 { background-color: #F5A9CB; }
.heart-popup.color-3 { background-color: #E9967A; }
.heart-popup.color-4 { background-color: #FFB6C1; }
.heart-popup.color-5 { background-color: #FFA07A; }
.heart-popup.color-6 { background-color: #FA8072; }
.heart-popup.color-7 { background-color: #F08080; }
.heart-popup.color-8 { background-color: #CD5C5C; }
.heart-popup.color-9 { background-color: #DC143C; }
.heart-popup.color-10 { background-color: #B22222; }
.heart-popup.color-11 { background-color: #FF69B4; }
.heart-popup.color-12 { background-color: #FF1493; }
.heart-popup.color-13 { background-color: #C71585; }
.heart-popup.color-14 { background-color: #DB7093; }
.heart-popup.color-15 { background-color: #D8BFD8; }
.heart-popup.color-16 { background-color: #DDA0DD; }
.heart-popup.color-17 { background-color: #EE82EE; }
.heart-popup.color-18 { background-color: #DA70D6; }
.heart-popup.color-19 { background-color: #FF6347; }
.heart-popup.color-20 { background-color: #FF4500; }

/* 字体系统 */
.heart-popup.font-1 { font-family: "Comic Sans MS", cursive; }
.heart-popup.font-2 { font-family: Arial, sans-serif; }
.heart-popup.font-3 { font-family: "Microsoft YaHei", sans-serif; }
.heart-popup.font-4 { font-family: "PingFang SC", sans-serif; }
.heart-popup.font-5 { font-family: "Helvetica Neue", sans-serif; }

/* 动画定义 */
@keyframes fadeInSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
}

/* 移除动画类 */
.heart-popup.removing {
    animation: fadeOut 0.5s ease-out forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .heart-popup {
        font-size: 16px;
        padding: 15px 20px;
        min-width: 150px;
        max-width: 250px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .heart-popup {
        font-size: 14px;
        padding: 12px 16px;
        min-width: 120px;
        max-width: 200px;
        border-radius: 12px;
    }
}

@media (min-width: 1024px) {
    .heart-popup {
        font-size: 20px;
        padding: 25px 35px;
        min-width: 220px;
        max-width: 320px;
    }
}

/* 性能优化 */
.heart-popup {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 行内爱心样式 */
.heart-emoji { opacity: 0.9; }
.love-text { white-space: nowrap; display: inline-block; }