* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background: #fff0f6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.bg-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 183, 213, 0.3);
    animation: float 8s infinite ease-in-out;
}

.circle:nth-child(1) {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 3s;
}

.circle:nth-child(3) {
    width: 220px;
    height: 220px;
    bottom: 10%;
    left: 30%;
    animation-delay: 5s;
}

@keyframes float {
    0%,100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.main-title {
    font-size: 36px;
    color: #ff5e96;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(255,94,150,0.2);
}

.subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* 3×3 9个盒子布局 */
.grid-boxes {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    gap: 12px;
    justify-content: center;
}

.box {
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.box.opened {
    background: #ffe6f0;
    cursor: default;
    transform: scale(0.95);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 420px;
    padding: 30px 20px;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.pink-text {
    color: #ff5e96;
    margin-bottom: 20px;
    font-size: 24px;
}

.letter-text {
    text-align: left;
    line-height: 1.8;
    color: #333;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.letter-text p {
    margin-bottom: 12px;
}

input {
    width: 80%;
    padding: 12px 15px;
    border: 2px solid #ffc0d8;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    outline: none;
    margin-bottom: 20px;
}

input:focus {
    border-color: #ff5e96;
}

.btn {
    background: #ff5e96;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    width: 70%;
}

.btn:hover {
    background: #ff3a7d;
    transform: scale(1.05);
}

.fullscreen-flex {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 999;
    background: #fff0f6;
}

.fullscreen-flex.hidden {
    display: none;
}

.love-text {
    font-size: 40px;
    color: #ff3a7d;
    margin-bottom: 20px;
    text-shadow: 0 3px 10px rgba(255,58,125,0.3);
}

.love-subtext {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

#heart-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
}

.floating-heart {
    position: absolute;
    font-size: 22px;
    animation: heartUp linear forwards;
    bottom: 0;
}

@keyframes heartUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}