/* 全局样式 - 4.0版本 */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&family=Great+Vibes&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Dancing Script', cursive;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* 密码保护界面样式 */
.password-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
}

.password-container {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.password-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.password-container input {
    width: 250px;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.password-container button {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
}

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

.password-error {
    color: #ff6b6b;
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* 信封开始界面样式 */
.envelope-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
    position: relative;
}

.envelope-container {
    text-align: center;
    color: white;
}

/* 优化的打字机动画样式 */
.recipient-info {
    font-family: 'Great Vibes', cursive;
    font-size: 48px;
    font-weight: 400;
    color: #C25BAF;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 2px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 光标样式 - 动画完成后隐藏 */
.cursor {
    animation: blink 1s infinite;
    font-weight: 400;
    margin-left: 2px;
}

.cursor.hidden {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.envelope {
    position: relative;
    width: 200px;
    height: 140px;
    margin: 0 auto 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-body {
    width: 200px;
    height: 120px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
}

.envelope-flap {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 80px solid #dee2e6;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 8px 8px 0 0;
    transform-origin: bottom;
    transition: transform 0.5s ease;
}

.heart-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    animation: fadeInHeart 1s ease-in-out forwards;
}

@keyframes fadeInHeart {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.heart {
    width: 40px;
    height: 36px;
    position: relative;
    transform: rotate(-45deg);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart:before,
.heart:after {
    content: '';
    width: 20px;
    height: 32px;
    position: absolute;
    left: 20px;
    transform: rotate(-45deg);
    background: #ff6b6b;
    border-radius: 20px 20px 0 0;
    transform-origin: 0 100%;
}

.heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

@keyframes heartbeat {
    0%, 100% { transform: rotate(-45deg) scale(1); }
    50% { transform: rotate(-45deg) scale(1.1); }
}

.envelope-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

/* 生日祝福界面样式 */
.birthday-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #d299c2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#fireworks-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.birthday-message {
    text-align: center;
    color: white;
    z-index: 1001;
    animation: fadeInUp 1s ease-out;
}

.birthday-message h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.birthday-message p {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.start-journey-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: 'Dancing Script', cursive;
    opacity: 0;
    animation: fadeInButton 1s ease-in-out forwards;
}

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

@keyframes fadeInButton {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 主菜单界面样式 */
.menu-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
    padding: 2rem;
}

.menu-content {
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.menu-title-with-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 3rem;
}

.menu-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.menu-title-with-icons .person {
    width: 40px;
    height: 50px;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.menu-title-with-icons .person::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffeaa7;
}

.menu-title-with-icons .cat {
    width: 20px;
    height: 16px;
    background: #fdcb6e;
    border-radius: 10px;
    position: relative;
    margin-top: 6px;
}

.menu-title-with-icons .cat::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 3px;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 5px solid #fdcb6e;
}

.menu-title-with-icons .cat::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 3px;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 5px solid #fdcb6e;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 优化的菜单项样式 */
.menu-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.menu-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.menu-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.menu-item h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.menu-item p {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
}

/* 封面样式 */
.cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: url('images/背景001.jpg') center/cover no-repeat, 
                linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
    position: relative;
}

.cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 154, 158, 0.3);
    z-index: 1;
}

.cover-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.cover-illustration {
    margin-bottom: 2rem;
}

.couple {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.person {
    width: 60px;
    height: 80px;
    border-radius: 30px 30px 0 0;
    position: relative;
}

.person-left {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
}

.person-right {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

.person::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffeaa7;
}

.cat {
    width: 30px;
    height: 25px;
    background: #fdcb6e;
    border-radius: 15px;
    position: relative;
    margin-top: 10px;
}

.cat::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #fdcb6e;
}

.cat::after {
    content: '';
    position: absolute;
    top: -8px;
    right: 5px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #fdcb6e;
}

.cover-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.cover-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.enter-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: 'Dancing Script', cursive;
}

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

/* 主应用样式 */
.app {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    flex-wrap: wrap;
    gap: 10px;
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.back-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-add, .btn-export {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.btn-add:hover, .btn-export:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* 地图容器和还原视图按钮 */
.map-wrapper {
    position: relative;
    height: 400px;
    margin: 1rem 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.map-container {
    width: 100%;
    height: 100%;
}

/* 还原视图按钮样式 */
.reset-view-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, #a8a4d6, #d299c2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid rgba(255,255,255,0.3);
}

.reset-view-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* 粉紫色地图标记样式 */
.custom-marker {
    background: linear-gradient(45deg, #F8BBD0, #CE93D8);
    border: 2px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 20px rgba(206, 147, 216, 0.6);
}

/* 时间轴样式 */
.timeline-container {
    margin: 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
}

.timeline-container h3 {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 0;
    max-height: 400px;
    overflow-y: auto;
}

.timeline-row {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 5px 0;
    min-height: 120px;
}

.timeline-item {
    min-width: 200px;
    background: rgba(168, 164, 214, 0.3);
    border: 2px solid rgba(168, 164, 214, 0.5);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    color: white;
    position: relative;
}

.timeline-item:hover {
    transform: translateY(-5px);
    background: rgba(168, 164, 214, 0.4);
    border-color: rgba(168, 164, 214, 0.7);
}

.timeline-date {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-location {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

.delete-memory-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,107,107,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-memory-btn {
    position: absolute;
    top: 5px;
    right: 35px;
    background: rgba(102,126,234,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-item:hover .delete-memory-btn,
.timeline-item:hover .edit-memory-btn {
    opacity: 1;
}

/* 照片墙样式 */
.photo-wall-container {
    margin: 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
}

.photo-wall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.photo-wall-header h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.btn-add-photo {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.btn-add-photo:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.photo-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px 0;
}

.photo-item {
    background: rgba(168, 164, 214, 0.3);
    border: 2px solid rgba(168, 164, 214, 0.5);
    border-radius: 10px;
    padding: 15px;
    color: white;
    display: flex;
    gap: 15px;
    height: 150px;
    position: relative;
}

.photo-item-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.photo-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.photo-item-date {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.photo-item-memo {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.3;
    flex: 1;
}

.photo-item-right {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    gap: 2px;
}

.photo-item-right img {
    flex: 1;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    border-radius: 4px;
}

.photo-item-right:hover img {
    transform: scale(1.05);
}

.delete-photo-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255,107,107,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-photo-btn {
    position: absolute;
    top: 5px;
    right: 35px;
    background: rgba(102,126,234,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .delete-photo-btn,
.photo-item:hover .edit-photo-btn {
    opacity: 1;
}

.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: rgba(102,126,234,0.1);
    border-radius: 8px;
    border: 1px solid rgba(102,126,234,0.3);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102,126,234,0.2);
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    text-align: center;
}

/* 世界足迹地图界面样式 */
.usa-map-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
}

.continents-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 2rem;
}

.continent-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.continent-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.continent-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.continent-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.countries-container {
    margin: 2rem;
}

.countries-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.back-to-continents {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.back-to-continents:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.countries-header h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.country-item {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 15px;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.country-item:hover {
    border-width: 4px;
    transform: scale(1.05);
    background: rgba(255,255,255,0.2);
}

.country-shape {
    width: 60px;
    height: 40px;
    margin: 0 auto 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    position: relative;
}

.country-name {
    font-size: 0.9rem;
    font-weight: 600;
}

/* 纪念日界面样式 */
.anniversary-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
}

.anniversary-content {
    padding: 2rem;
}

.anniversary-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.anniversary-item {
    background: rgba(168, 164, 214, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.2rem;
    color: white;
    border: 1px solid rgba(168, 164, 214, 0.6);
    opacity: 0.9;
    position: relative;
}

.delete-anniversary-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,107,107,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anniversary-item:hover .delete-anniversary-btn {
    opacity: 1;
}

.anniversary-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.anniversary-countdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 1rem;
}

.countdown-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 1rem;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 900;
    display: block;
}

.countdown-label {
    font-size: 1rem;
    opacity: 0.8;
}

.anniversary-description {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* 信件界面样式 */
.letters-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 30%, #d299c2 70%, #a8a4d6 100%);
}

.letters-content {
    padding: 2rem;
}

.letters-list {
    display: grid;
    gap: 20px;
}

.letter-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.letter-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.letter-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.letter-date {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.letter-preview {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 信件模态框样式 */
.letter-modal {
    max-width: 600px;
    max-height: 90vh;
}

.letter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.font-controls {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.font-controls label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.letter-textarea {
    min-height: 200px;
    font-family: 'Dancing Script', cursive;
    font-size: 18px;
    color: #C25BAF;
    line-height: 1.6;
    resize: vertical;
}

.letter-display {
    font-family: 'Dancing Script', cursive;
    line-height: 1.6;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.letter-display h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.letter-display .date {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 20px;
    color: #666;
}

.letter-display .content {
    font-size: 18px;
    color: #C25BAF;
    white-space: pre-wrap;
}

/* 地点搜索样式 */
.location-search {
    display: flex;
    gap: 10px;
}

.location-search input {
    flex: 1;
}

.location-search button {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
}

.location-results {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.location-result-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.location-result-item:hover {
    background: #f8f9fa;
}

.location-result-item:last-child {
    border-bottom: none;
}

/* 行程选择样式 */
.trip-selection {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.trip-selection label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

/* 批量文件上传样式 */
.file-upload-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-upload-section label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.file-preview-item img,
.file-preview-item video {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255,107,107,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框样式 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    animation: slideUp 0.3s ease-in-out forwards;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* 表单样式 */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, textarea, select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-actions button[type="submit"],
.form-actions button:not([type]):not(.delete-btn) {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.form-actions button[type="button"]:not(.delete-btn) {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.form-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.delete-btn {
    background: linear-gradient(45deg, #ff6b6b 0%, #ee5a52 100%) !important;
    color: white !important;
}

/* 详情内容样式 */
.detail-header {
    margin-bottom: 20px;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.detail-meta {
    color: #666;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}

.detail-description {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.detail-media {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.detail-media img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}

.photo-gallery-preview {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.photo-gallery-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.photo-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .recipient-info {
        font-size: 36px;
    }
    
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .map-wrapper {
        margin: 1rem;
        height: 300px;
    }
    
    .usa-map-container {
        margin: 1rem;
        height: 300px;
    }
    
    .timeline-container, .visited-states, .letters-content, .anniversary-content {
        margin: 1rem;
        padding: 1rem;
    }
    
    .menu-title, .cover-title, .envelope-title {
        font-size: 2rem;
    }
    
    .birthday-message h1 {
        font-size: 2rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .location-search {
        flex-direction: column;
    }
    
    .file-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .anniversary-countdown {
        grid-template-columns: 1fr;
    }
    
    .anniversary-list {
        grid-template-columns: 1fr;
    }
    
    .font-controls {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .reset-view-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* 自定义滚动条 */
.timeline::-webkit-scrollbar,
.file-preview::-webkit-scrollbar,
.location-results::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.timeline::-webkit-scrollbar-track,
.file-preview::-webkit-scrollbar-track,
.location-results::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb,
.file-preview::-webkit-scrollbar-thumb,
.location-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-thumb:hover,
.file-preview::-webkit-scrollbar-thumb:hover,
.location-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}