* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    height: 100vh;
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 800px;
    min-height: 90vh;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    padding: 25px 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#rainCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: 30px;
}

.container > *:not(#rainCanvas) {
    position: relative;
    z-index: 1;
}

h1 {
    color: #5a4a3a;
    font-size: 28px;
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-align: center;
}

.subtitle {
    color: #999;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

.memorial-char {
    font-family: 'LiSu', '华文隶书', 'STLiti', serif;
    font-size: 100px;
    line-height: 1.2;
    color: #3d2b1f;
    opacity: 0.85;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin: 5px 0 10px 0;
    letter-spacing: 10px;
    text-align: center;
    width: 100%;
}

.photo-gallery {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    width: 100%;
}
.photo-gallery img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}
.photo-gallery img:hover {
    transform: scale(1.05);
}

#danmaku-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.03);
    min-height: 150px;
    width: 100%;
    /* ★ 新增：上下内边距，防止弹幕贴边 */
    padding: 20px 0;
    box-sizing: border-box;
}

/* 弹幕文字样式 */
.bullet-item {
    position: absolute;
    white-space: nowrap;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
    will-change: transform;
}

.input-area {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}
.input-area input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    background: #f0ebe6;
    outline: none;
    font-size: 16px;
}
.input-area button, #flower-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    background: #5a4a3a;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.input-area button:hover, #flower-btn:hover {
    background: #3d3227;
    transform: scale(1.02);
}
#flower-btn {
    background: #ff6b81;
    margin-top: 8px;
    width: 100%;
}