/* 地图足迹组件样式 */
.map-widget-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 15px;
}

.map-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    color: #fff;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.map-title-section {
    flex: 1;
}

.map-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
    font-family: 'Noto Serif SC', serif;
    display: flex;
    align-items: center;
    gap: 15px;
}

.map-title i {
    font-size: 36px;
}

.map-description {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.map-stats {
    display: flex;
    gap: 30px;
}

.map-stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 12px;
    min-width: 100px;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    margin-top: 8px;
    opacity: 0.9;
}

.map-display-container {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.love-map {
    width: 100%;
    height: 500px;
    min-height: 400px;
}

.map-no-api-key {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.map-no-api-key i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.map-no-api-key p {
    font-size: 16px;
    margin: 0;
}

/* 足迹列表 */
.footprints-list {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.list-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Noto Serif SC', serif;
    color: #333;
}

.list-title i {
    color: #667eea;
}

.footprints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.footprint-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
    border: 2px solid transparent;
}

.footprint-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.footprint-card.favorite {
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 100%);
    border-color: #ff5295;
}

.footprint-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footprint-card.favorite .footprint-icon {
    color: #ff5295;
}

/* 足迹照片样式 */
.footprint-photo {
    position: relative;
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.footprint-photo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.footprint-card:hover .footprint-photo img {
    transform: scale(1.1);
}

.footprint-photo .photo-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.footprint-photo .photo-count i {
    font-size: 10px;
}

.footprint-info {
    flex: 1;
}

.footprint-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-icon {
    color: #ff5295;
    font-size: 16px;
}

.footprint-date {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footprint-date i {
    font-size: 14px;
}

.footprint-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 地图信息窗口样式 */
.map-info-window {
    padding: 10px;
    min-width: 200px;
}

.map-info-window h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #333;
}

.map-info-window p {
    font-size: 13px;
    margin: 5px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-info-window .info-desc {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .map-header {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .map-title {
        font-size: 24px;
        justify-content: center;
    }
    
    .map-title i {
        font-size: 28px;
    }
    
    .map-stats {
        justify-content: center;
    }
    
    .map-stat-item {
        min-width: 80px;
        padding: 12px 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .love-map {
        height: 350px;
    }
    
    .footprints-list {
        padding: 20px;
    }
    
    .footprints-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .map-header {
        padding: 20px;
    }
    
    .map-title {
        font-size: 20px;
        gap: 10px;
    }
    
    .map-stats {
        gap: 15px;
    }
    
    .love-map {
        height: 300px;
    }
    
    /* 手机端横向滑动布局 */
    .footprints-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 10px;
        grid-template-columns: none; /* 覆盖grid布局 */
    }
    
    /* 隐藏滚动条但保持可滚动 */
    .footprints-grid::-webkit-scrollbar {
        height: 3px;
    }
    
    .footprints-grid::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 10px;
    }
    
    .footprints-grid::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 10px;
    }
    
    .footprints-grid::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.5);
    }
    
    /* 每个卡片固定宽度，支持滑动 */
    .footprint-card {
        flex: 0 0 300px;
        min-width: 300px;
        max-width: 300px;
        padding: 12px;
        gap: 12px;
        scroll-snap-align: start;
        flex-direction: row;  /* 横向布局：图片左，文字右 */
        text-align: left;     /* 文字左对齐 */
        align-items: stretch; /* 上下拉伸对齐 */
    }
    
    /* 图片/图标左侧显示，高度撑满 */
    .footprint-icon,
    .footprint-photo {
        width: 90px;
        height: auto;
        min-width: 90px;
        max-width: 90px;
        min-height: 100%;    /* 高度撑满整个卡片 */
        margin: 0;
        font-size: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 文字内容右侧，左对齐 */
    .footprint-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;  /* 左对齐 */
        justify-content: center;  /* 垂直居中 */
        flex: 1;
        min-width: 0;
    }
    
    .footprint-name {
        font-size: 16px;
        margin-bottom: 5px;
        justify-content: flex-start;
    }
    
    .footprint-date {
        font-size: 12px;
        margin-bottom: 5px;
        justify-content: flex-start;
    }
    
    .footprint-desc {
        font-size: 12px;
        line-height: 1.4;
        -webkit-line-clamp: 3;
        text-align: left;  /* 左对齐 */
    }
    
    /* 照片数量标签 */
    .footprint-photo .photo-count {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .footprint-photo .photo-count i {
        font-size: 9px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

.fadeInUp {
    animation-name: fadeInUp;
}

