/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f3f3;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 头部样式 */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('photos/c.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.header-content {
    padding: 2rem;
    background-color: transparent;
    border-radius: 10px;
    max-width: 80%;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.2rem;
    font-style: italic;
}

/* 导航栏样式 */
nav {
    background-color: #66b3ff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background-color: white;
    color: #66b3ff;
}

/* 主要内容区域 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section {
    margin-bottom: 4rem;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 视频墙样式 */
.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    overflow-x: hidden;
}

.video-item {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    background: #000;
    overflow: hidden;
}

.video-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 嵌入式视频样式 */
.embedded-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* 自定义视频控制按钮 - 保留用于其他视频 */
.custom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.play-pause-btn,
.fullscreen-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.play-pause-btn:hover,
.fullscreen-btn:hover {
    background: rgba(102, 179, 255, 0.8);
    transform: scale(1.1);
}

/* 确保原生控件显示 */
video::-webkit-media-controls {
    display: flex !important;
    opacity: 1 !important;
}

video::-webkit-media-controls-panel {
    display: flex !important;
}

/* 视频错误提示样式 */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 20;
}

.video-error i {
    margin-right: 5px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .video-wrapper {
        padding-bottom: 56.25%; /* 保持16:9比例 */
    }
    
    .custom-controls {
        bottom: 5px;
        right: 5px;
    }
    
    .play-pause-btn,
    .fullscreen-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

.video-info {
    padding: 1rem;
}

.video-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 视频控制按钮样式 */
video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

video::-webkit-media-controls-play-button,
video::-webkit-media-controls-fullscreen-button {
    background-color: #66b3ff;
    border-radius: 50%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-item video {
        height: 180px;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    nav li {
        margin: 0.25rem;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #66b3ff;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #66b3ff;
}

/* 首页情侣信息样式 */
.couple-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.profile {
    text-align: center;
    width: 30%;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 5px solid #66b3ff;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.heart {
    text-align: center;
    color: #66b3ff;
    position: relative;
}

.heart i {
    font-size: 5rem;
    animation: pulse 1.5s infinite;
}

.days-together {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
}

#days-count {
    font-size: 1.5rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.love-story {
    text-align: center;
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.love-story h2 {
    color: #66b3ff;
    margin-bottom: 1rem;
}

.love-story p {
    line-height: 1.8;
}

/* 纪念日样式 */
.anniversary {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.date-card {
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 1.5rem;
    width: 30%;
    min-width: 250px;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.date-card:hover {
    transform: translateY(-5px);
}

.date-card.highlight {
    background-color: #e6f3ff;
    border: 2px solid #66b3ff;
}

.date-card h3 {
    color: #66b3ff;
    margin-bottom: 0.5rem;
}

.date {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.countdown {
    font-weight: bold;
}

.countdown .days {
    color: #66b3ff;
}

.add-date {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.add-date h3 {
    margin-bottom: 1rem;
    color: #66b3ff;
}

.add-date form {
    display: flex;
    flex-direction: column;
}

.add-date input {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.add-date button {
    padding: 0.8rem;
    background-color: #66b3ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-date button:hover {
    background-color: #4d9fff;
}

/* 照片墙样式 */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* 留言板样式 */
.message-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: center;
}

.message-form h3 {
    margin-bottom: 1rem;
    color: #66b3ff;
}

.message-form form {
    display: flex;
    flex-direction: column;
}

.message-form input,
.message-form textarea {
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.message-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.form-buttons button {
    padding: 10px 20px;
    background-color: #66b3ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-buttons button:hover {
    background-color: #4d9fff;
    transform: translateY(-2px);
}

.message-wall {
    max-width: 800px;
    margin: 0 auto;
}

.message {
    position: relative;
    background-color: #f8f8f8;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.message:hover {
    transform: translateX(-5px);
    box-shadow: 2px 4px 10px rgba(0,0,0,0.15);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
}

.message .name {
    font-weight: bold;
    color: #66b3ff;
}

.message .date {
    color: #999;
}

.message p {
    margin: 0;
    line-height: 1.6;
}

.message .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ff6666;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
    display: none;
}

.message:hover .delete-btn {
    display: block;
    opacity: 0.8;
}

.message .delete-btn:hover {
    background-color: #ff3333;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 移动设备适配 */
@media (max-width: 768px) {
    .message {
        padding-right: 15px;
    }
    
    .message .delete-btn {
        padding: 5px 10px;
        font-size: 14px;
        top: 8px;
        right: 8px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .form-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

#footer-days {
    color: #66b3ff;
    font-weight: bold;
}

/* 音乐控制按钮样式 */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #66b3ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
}

.music-control.playing i {
    animation: rotating 3s linear infinite;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 删除按钮样式 */
.delete-btn {
    display: none;
    background-color: #ff6666;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 13px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 100;
    min-width: 60px;
    min-height: 30px;
}

/* 保存按钮样式 */
.save-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 25px;
    background-color: #66b3ff;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.save-btn:hover {
    background-color: #4d9fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 保存提示弹窗样式 */
.save-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(102, 179, 255, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.delete-btn:hover {
    background-color: #ff3333;
    transform: scale(1.05);
}

/* 增加按钮的可点击区域 */
.delete-btn::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}

.date-card {
    position: relative;
    padding-bottom: 50px; /* 为删除按钮留出更多空间 */
}

.delete-date-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: #ff6666;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: 
        visibility 0.2s,
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-card:hover .delete-date-btn {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.delete-date-btn:hover {
    transform: scale(1.05);
    background-color: #ff4444;
}

.delete-date-btn:hover {
    background-color: #ff3333;
    transform: scale(1.05);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .delete-date-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .couple-info {
        flex-direction: column;
    }
    
    .profile {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .heart {
        margin: 1rem 0;
    }
    
    .date-card {
        width: 100%;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav li {
        margin: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
}

/* 留言删除按钮优化 - 避免与日期重合 */
.message {
    position: relative;
    padding-right: 50px; /* 为删除按钮留出空间 */
}

.message-header {
    position: relative;
    padding-right: 30px; /* 防止日期被遮挡 */
}

.message .delete-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: rgba(255, 102, 102, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.message:hover .delete-btn {
    opacity: 1;
}

.message .delete-btn:hover {
    background-color: #ff3333;
    transform: translateY(-50%) scale(1.1);
}

/* 删除按钮图标 */
.message .delete-btn::before {
    content: "×";
    font-size: 16px;
    line-height: 1;
}

/* 悬停时显示按钮 */
.message:hover .delete-btn {
    opacity: 1;
}

/* 按钮悬停效果 */
.message .delete-btn:hover {
    background-color: #ff3333;
    transform: scale(1.1);
}

/* 按钮图标 */
.message .delete-btn::before {
    content: "×";
    font-size: 18px;
    line-height: 1;
}

/* 移动设备上的删除按钮样式 */
@media (max-width: 768px) {
    .message {
        padding-right: 50px;
        padding-bottom: 50px;
    }
    .message .delete-btn {
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* 欢迎弹窗样式 */
.welcome-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-align: center;
    max-width: 80%;
    animation: fadeIn 0.5s ease-out;
}

.welcome-modal h2 {
    color: #ff69b4;
    margin-bottom: 15px;
    font-size: 24px;
}

.welcome-modal p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.welcome-modal button {
    background-color: #ff69b4;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.welcome-modal button:hover {
    background-color: #ff1493;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeInOverlay 0.2s ease-out;
    opacity: 1;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 红色像素爱心样式 */
.pixel-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 16px;
    height: 16px;
    opacity: 0;
    animation: heartFloat 3s ease-out forwards;
    image-rendering: pixelated;
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-150px);
    }
}

@keyframes cloudFloat {
    0% {
        opacity: 0.9;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.8);
    }
}

/* 自定义鼠标指针 */
body {
  cursor: url('鼠标指针/2526-backpack-and-skater-kitty-cursor.svg') 0 0, auto;
}
a, button, [onclick], [role="button"] {
  cursor: url('鼠标指针/2526-backpack-and-skater-kitty-pointer.svg') 0 0, pointer;
}