/* 生日网站主样式文件 */

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

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --background-color: #f8f9fa;
    --text-color: #2c3e50;
    --card-background: #ffffff;
    --gradient-start: #ff6b9d;
    --gradient-end: #4ecdc4;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    min-height: 100vh;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* 主要内容区域 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.page {
    display: none;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

/* 首页样式 */
.hero-section {
    position: relative;
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.birthday-container {
    text-align: center;
    background: var(--card-background);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.birthday-title {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.birthday-person {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.birthday-image {
    margin: 30px 0;
}

.main-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 30px 0;
    color: var(--text-color);
}

/* 弹幕祝福语样式 */
.danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
    overflow: hidden;
}

.danmaku-item {
    position: fixed;
    white-space: nowrap;
    font-size: 1.2rem;
    font-weight: 500;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(45deg,
        rgba(255, 107, 157, 0.8),
        rgba(78, 205, 196, 0.8),
        rgba(255, 230, 109, 0.8)
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: danmaku-move linear forwards;
    will-change: transform;
    /* 确保初始位置在屏幕右侧外 */
    left: 100vw;
    transform: translateX(0);
}

/* 弹幕移动动画 */
@keyframes danmaku-move {
    0% {
        left: 100vw;
    }
    100% {
        left: -300px;
    }
}

/* 不同颜色的弹幕样式 */
.danmaku-item.color-1 {
    background: linear-gradient(45deg,
        rgba(255, 107, 157, 0.9),
        rgba(255, 140, 171, 0.9)
    );
}

.danmaku-item.color-2 {
    background: linear-gradient(45deg,
        rgba(78, 205, 196, 0.9),
        rgba(110, 231, 221, 0.9)
    );
}

.danmaku-item.color-3 {
    background: linear-gradient(45deg,
        rgba(255, 230, 109, 0.9),
        rgba(255, 237, 138, 0.9)
    );
}

.danmaku-item.color-4 {
    background: linear-gradient(45deg,
        rgba(155, 89, 182, 0.9),
        rgba(174, 129, 199, 0.9)
    );
}

.danmaku-item.color-5 {
    background: linear-gradient(45deg,
        rgba(52, 152, 219, 0.9),
        rgba(85, 172, 238, 0.9)
    );
}

.danmaku-item.color-6 {
    background: linear-gradient(45deg,
        rgba(46, 204, 113, 0.9),
        rgba(88, 214, 141, 0.9)
    );
}

/* 弹幕大小变化 */
.danmaku-item.size-small {
    font-size: 1rem;
    padding: 6px 12px;
}

.danmaku-item.size-medium {
    font-size: 1.2rem;
    padding: 8px 16px;
}

.danmaku-item.size-large {
    font-size: 1.4rem;
    padding: 10px 20px;
    font-weight: 600;
}

/* 弹幕特殊效果 */
.danmaku-item.glow {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: danmaku-move linear, glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    }
}

/* 弹幕控制按钮 */
.danmaku-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 10px;
}

.danmaku-control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.danmaku-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.danmaku-control-btn.active {
    background: var(--primary-color);
}

/* 移动端弹幕优化 */
@media (max-width: 768px) {
    .danmaku-item {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .danmaku-item.size-small {
        font-size: 0.9rem;
        padding: 5px 10px;
    }

    .danmaku-item.size-medium {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .danmaku-item.size-large {
        font-size: 1.2rem;
        padding: 8px 16px;
    }

    .danmaku-controls {
        top: 10px;
        right: 10px;
    }

    .danmaku-control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

.birthday-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 157, 0.3);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 230, 109, 0.3);
}

/* 页面标题样式 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* 照片墙样式 */
.photo-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 600px;
}

/* 3D正方体容器 */
.cube-container {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    margin-bottom: 60px;
    transition: all 1s ease;
}

.photo-cube {
    position: relative;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    /* 默认不旋转，等待触发 */
}

.photo-cube.rotating {
    animation: cubeRotate 6s linear infinite;
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    transition: all 0.5s ease;
    background-color: #f0f0f0; /* 默认背景色 */
}

/* 图片加载完成后的样式 */
.cube-face.image-loaded {
    background-color: transparent;
}

/* 正方体面内的图片样式 */
.face-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.cube-face.front {
    transform: rotateY(0deg) translateZ(150px);
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(150px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(150px);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(150px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(150px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(150px);
}

/* 正方体旋转动画 */
@keyframes cubeRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    16.66% {
        transform: rotateX(-15deg) rotateY(60deg);
    }
    33.33% {
        transform: rotateX(15deg) rotateY(120deg);
    }
    50% {
        transform: rotateX(-15deg) rotateY(180deg);
    }
    66.66% {
        transform: rotateX(15deg) rotateY(240deg);
    }
    83.33% {
        transform: rotateX(-15deg) rotateY(300deg);
    }
    100% {
        transform: rotateX(0deg) rotateY(360deg);
    }
}

/* 拆解动画 */
.photo-cube.exploding {
    animation: none;
}

.photo-cube.exploding .cube-face {
    animation: explodeFace 2s ease-out forwards;
}

.photo-cube.exploding .cube-face.front {
    animation: explodeFaceFront 2.5s ease-out forwards;
    animation-delay: 0s;
}

.photo-cube.exploding .cube-face.back {
    animation: explodeFaceBack 2.5s ease-out forwards;
    animation-delay: 0.1s;
}

.photo-cube.exploding .cube-face.right {
    animation: explodeFaceRight 2.5s ease-out forwards;
    animation-delay: 0.2s;
}

.photo-cube.exploding .cube-face.left {
    animation: explodeFaceLeft 2.5s ease-out forwards;
    animation-delay: 0.3s;
}

.photo-cube.exploding .cube-face.top {
    animation: explodeFaceTop 2.5s ease-out forwards;
    animation-delay: 0.4s;
}

.photo-cube.exploding .cube-face.bottom {
    animation: explodeFaceBottom 2.5s ease-out forwards;
    animation-delay: 0.5s;
}

/* 前面拆解动画 */
@keyframes explodeFaceFront {
    0% {
        opacity: 1;
        transform: rotateY(0deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateY(180deg) translateZ(500px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateY(360deg) translateZ(800px) scale(0.2);
    }
}

/* 后面拆解动画 */
@keyframes explodeFaceBack {
    0% {
        opacity: 1;
        transform: rotateY(180deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateY(0deg) translateZ(-500px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateY(-180deg) translateZ(-800px) scale(0.2);
    }
}

/* 右面拆解动画 */
@keyframes explodeFaceRight {
    0% {
        opacity: 1;
        transform: rotateY(90deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateY(270deg) translateX(500px) translateZ(300px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateY(450deg) translateX(800px) translateZ(0px) scale(0.2);
    }
}

/* 左面拆解动画 */
@keyframes explodeFaceLeft {
    0% {
        opacity: 1;
        transform: rotateY(-90deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateY(-270deg) translateX(-500px) translateZ(300px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateY(-450deg) translateX(-800px) translateZ(0px) scale(0.2);
    }
}

/* 上面拆解动画 */
@keyframes explodeFaceTop {
    0% {
        opacity: 1;
        transform: rotateX(90deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateX(270deg) translateY(-500px) translateZ(300px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateX(450deg) translateY(-800px) translateZ(0px) scale(0.2);
    }
}

/* 下面拆解动画 */
@keyframes explodeFaceBottom {
    0% {
        opacity: 1;
        transform: rotateX(-90deg) translateZ(150px) scale(1);
    }
    50% {
        opacity: 1;
        transform: rotateX(-270deg) translateY(500px) translateZ(300px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: rotateX(-450deg) translateY(800px) translateZ(0px) scale(0.2);
    }
}

/* 照片网格容器 */
.grid-container {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
    display: none;
}

.grid-container.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* 正方体容器显示控制 */
.cube-container.visible {
    opacity: 1;
    transform: scale(1);
    display: flex;
}

.cube-container.hidden {
    opacity: 0;
    transform: scale(0.8);
    display: none;
}

.showcase-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.control-button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    /* 使用CSS Grid的不规则布局 */
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
}

.photo-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) rotate(0deg);
    animation: photoSlideIn 0.8s ease-out forwards;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 不同尺寸的照片项 */
.photo-item.size-large {
    grid-row: span 2;
    grid-column: span 2;
}

.photo-item.size-tall {
    grid-row: span 2;
}

.photo-item.size-wide {
    grid-column: span 2;
}

.photo-item.size-small {
    grid-row: span 1;
    grid-column: span 1;
}

/* 不同的旋转角度 */
.photo-item.rotate-left {
    transform: translateY(30px) rotate(-2deg);
}

.photo-item.rotate-right {
    transform: translateY(30px) rotate(2deg);
}

.photo-item.rotate-slight-left {
    transform: translateY(30px) rotate(-1deg);
}

.photo-item.rotate-slight-right {
    transform: translateY(30px) rotate(1deg);
}

.photo-item:nth-child(1) { animation-delay: 0.1s; }
.photo-item:nth-child(2) { animation-delay: 0.2s; }
.photo-item:nth-child(3) { animation-delay: 0.3s; }
.photo-item:nth-child(4) { animation-delay: 0.4s; }
.photo-item:nth-child(5) { animation-delay: 0.5s; }
.photo-item:nth-child(6) { animation-delay: 0.6s; }

/* 照片从正方体飞到网格位置的动画 */
.photo-item.from-cube {
    animation: flyToGrid 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translate3d(0, -200px, 0) scale(1.5) rotateY(360deg);
}

.photo-item.from-cube:nth-child(1) {
    animation-delay: 0.2s;
    --target-x: -300px;
    --target-y: -100px;
}

.photo-item.from-cube:nth-child(2) {
    animation-delay: 0.4s;
    --target-x: 0px;
    --target-y: -100px;
}

.photo-item.from-cube:nth-child(3) {
    animation-delay: 0.6s;
    --target-x: 300px;
    --target-y: -100px;
}

.photo-item.from-cube:nth-child(4) {
    animation-delay: 0.8s;
    --target-x: -300px;
    --target-y: 200px;
}

.photo-item.from-cube:nth-child(5) {
    animation-delay: 1.0s;
    --target-x: 0px;
    --target-y: 200px;
}

.photo-item.from-cube:nth-child(6) {
    animation-delay: 1.2s;
    --target-x: 300px;
    --target-y: 200px;
}

@keyframes flyToGrid {
    0% {
        opacity: 0;
        transform: translate3d(0, -200px, 0) scale(1.5) rotateY(360deg);
    }
    30% {
        opacity: 1;
        transform: translate3d(var(--target-x, 0), var(--target-y, 0), 0) scale(1.8) rotateY(180deg);
    }
    60% {
        opacity: 1;
        transform: translate3d(calc(var(--target-x, 0) * 0.7), calc(var(--target-y, 0) * 0.7), 0) scale(1.2) rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1) rotateY(0deg);
    }
}

@keyframes photoSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8) rotate(var(--initial-rotation, 0deg));
    }
    60% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.05) rotate(calc(var(--initial-rotation, 0deg) * 0.5));
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(var(--initial-rotation, 0deg));
    }
}

/* 为不同旋转类型设置CSS变量 */
.photo-item.rotate-left {
    --initial-rotation: -2deg;
}

.photo-item.rotate-right {
    --initial-rotation: 2deg;
}

.photo-item.rotate-slight-left {
    --initial-rotation: -1deg;
}

.photo-item.rotate-slight-right {
    --initial-rotation: 1deg;
}

.photo-item:hover {
    transform: translateY(-15px) scale(1.05) rotate(0deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.photo-item.rotate-left:hover {
    transform: translateY(-15px) scale(1.05) rotate(-1deg);
}

.photo-item.rotate-right:hover {
    transform: translateY(-15px) scale(1.05) rotate(1deg);
}

.photo-item.rotate-slight-left:hover {
    transform: translateY(-15px) scale(1.05) rotate(-0.5deg);
}

.photo-item.rotate-slight-right:hover {
    transform: translateY(-15px) scale(1.05) rotate(0.5deg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 18px;
}

.photo-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1) contrast(1.05);
}

/* 不同尺寸照片的高度调整 */
.photo-item.size-large img {
    height: 100%;
}

.photo-item.size-tall img {
    height: 100%;
}

.photo-item.size-wide img {
    height: 100%;
}

.photo-item.size-small img {
    height: 100%;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-overlay h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.photo-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 80%;
    max-height: 80%;
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modal-content img {
    width: 100%;
    height: auto;
    display: block;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    opacity: 0.7;
}

.modal-caption {
    padding: 20px;
    text-align: center;
    background: var(--card-background);
}

.modal-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    pointer-events: none;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 祝福留言样式 */
.wishes-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.wish-form {
    background: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.wish-form h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.wish-form input,
.wish-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.wish-form input:focus,
.wish-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.wish-form textarea {
    height: 100px;
    resize: vertical;
}

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wish-item {
    background: var(--card-background);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wish-name {
    font-weight: bold;
    color: var(--primary-color);
}

.wish-time {
    font-size: 0.9rem;
    color: #666;
}

.wish-message {
    line-height: 1.6;
}

/* 祝福数据管理按钮 */
.wishes-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn.btn-outline {
    background: transparent;
    color: #ff6b9d;
    border: 2px solid #ff6b9d;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn.btn-outline:hover {
    background: #ff6b9d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--card-background);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .birthday-container {
        padding: 40px 20px;
        margin: 20px;
    }

    .birthday-title {
        font-size: 2rem;
    }

    .birthday-actions {
        flex-direction: column;
        align-items: center;
    }

    .wishes-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .birthday-title {
        font-size: 1.5rem;
    }

    .page-header h2 {
        font-size: 2rem;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    /* 移动端祝福语滑动优化 */
    .message-slider {
        margin: 20px 0;
        padding: 15px;
    }

    .message-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    .message-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .message-nav.prev {
        left: 5px;
    }

    .message-nav.next {
        right: 5px;
    }

    .message-dots {
        gap: 6px;
        margin-top: 15px;
    }

    .message-dot {
        width: 8px;
        height: 8px;
    }
}

/* 固定底部音乐播放器样式 */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg,
        rgba(255, 107, 157, 0.95),
        rgba(78, 205, 196, 0.95)
    );
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 2px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.control-btn.play-pause {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.9);
}

.control-btn.play-pause:hover {
    background: white;
    color: var(--secondary-color);
}

.progress-container {
    flex: 2;
    max-width: 300px;
    margin: 0 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-icon {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-icon:hover {
    color: white;
    transform: scale(1.1);
}

.volume-slider {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 为底部播放器留出空间 */
body {
    padding-bottom: 80px;
}



/* 移动端优化 */
@media (max-width: 768px) {
    /* 音乐播放器优化 */
    .music-player {
        padding: 12px 15px;
        gap: 15px;
    }

    .track-info {
        flex: 1;
    }

    .track-title {
        font-size: 0.9rem;
    }

    .track-artist {
        font-size: 0.8rem;
    }

    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .control-btn.play-pause {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .progress-container {
        max-width: 200px;
        margin: 0 10px;
    }

    .volume-container {
        display: none; /* 在移动端隐藏音量控制 */
    }

    body {
        padding-bottom: 70px;
    }

    /* 照片网格移动端优化 */
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
        grid-auto-rows: 150px;
    }

    /* 移动端简化尺寸变化 */
    .photo-item.size-large {
        grid-row: span 2;
        grid-column: span 2;
    }

    .photo-item.size-tall {
        grid-row: span 2;
        grid-column: span 1;
    }

    .photo-item.size-wide {
        grid-row: span 1;
        grid-column: span 2;
    }

    /* 移动端减少旋转角度 */
    .photo-item.rotate-left {
        --initial-rotation: -1deg;
    }

    .photo-item.rotate-right {
        --initial-rotation: 1deg;
    }

    .photo-item.rotate-slight-left {
        --initial-rotation: -0.5deg;
    }

    .photo-item.rotate-slight-right {
        --initial-rotation: 0.5deg;
    }
}
