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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header h1 i {
    color: #667eea;
    margin-right: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

/* 标签导航 */
.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    gap: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    cursor: pointer;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 标签内容 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* 过滤器 */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: #667eea;
}

#search-input {
    flex: 1;
    min-width: 200px;
}

/* 地点网格 */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

/* 地点卡片 */
.place-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.place-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.place-card.selected {
    border: 2px solid #667eea;
    transform: scale(1.01);
}

.place-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.1rem;
    position: relative;
}

.place-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片数量徽章 */
.image-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

.place-info {
    padding: 14px;
}

.place-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.place-location {
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.place-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tag {
    background: #667eea;
    color: white;
    padding: 3px 6px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.tag.price {
    background: #28a745;
}

.place-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.stars {
    color: #ffc107;
}

.place-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.place-actions {
    display: flex;
    gap: 8px;
}

.select-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.select-btn.unselected {
    background: #667eea;
    color: white;
}

.select-btn.selected {
    background: #28a745;
    color: white;
}

.select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* 按钮样式 */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* 表单样式 */
.add-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

/* 价格输入样式 */
.price-input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-range-display {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6c757d;
}

.price-range-display.has-value {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
    font-weight: 500;
}

/* 图片上传样式 */
.image-upload-section {
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.upload-tabs {
    display: flex;
    background: #f8f9fa;
}

.upload-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #666;
}

.upload-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-tab:hover {
    background: rgba(102, 126, 234, 0.1);
}

.upload-content {
    display: none;
    padding: 20px;
}

.upload-content.active {
    display: block;
}

/* URL输入相关样式 */
.url-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.url-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.place-image-url {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.place-image-url:focus {
    outline: none;
    border-color: #667eea;
}

.add-url-btn {
    padding: 12px;
    min-width: auto;
    aspect-ratio: 1;
}

.url-images-preview {
    margin-top: 15px;
}

.url-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.url-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #eee;
}

.url-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

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

.url-preview-item .remove-url:hover {
    background: rgba(255, 0, 0, 1);
}

.url-preview-item.error {
    border-color: #ff4757;
    background: #fff5f5;
}

.url-preview-item.error img {
    opacity: 0.5;
}

.url-preview-item.error::after {
    content: '加载失败';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4757;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

.file-upload-area {
    position: relative;
    min-height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-placeholder {
    text-align: center;
    color: #666;
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: #999;
    margin-bottom: 15px;
    display: block;
}

.upload-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.upload-placeholder small {
    color: #999;
    font-size: 0.9rem;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 200px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 多图片预览样式 */
.images-preview {
    margin-top: 15px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.preview-item {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.preview-item .remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.preview-item .image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 10px 5px 5px;
    font-size: 0.8rem;
}

.preview-item .image-name {
    display: block;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.add-more-images {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    background: transparent;
    border-radius: 8px;
    color: #667eea;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.add-more-images:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.upload-progress {
    margin-top: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    height: 6px;
}

.upload-progress-bar {
    height: 100%;
    background: #667eea;
    transition: width 0.3s ease;
    width: 0%;
}

/* 选择概览样式 */
.selection-overview {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.overview-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.timeline-toggle {
    margin-top: 10px;
}

.timeline-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timeline-section .timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.timeline-section h3 {
    color: #333;
    margin: 0;
}

/* 方案模态框样式 */
.modal-content.plan-modal-content {
    max-width: 95vw;
    width: 95%;
    max-height: 90vh;
    margin: 2% auto;
}

@media (min-width: 768px) {
    .modal-content.plan-modal-content {
        max-width: 1200px;
        width: 90%;
    }
}

@media (min-width: 1200px) {
    .modal-content.plan-modal-content {
        max-width: 1400px;
        width: 85%;
    }
}

.plan-detail-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.plan-detail-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.plan-detail-date {
    color: #666;
    font-size: 1rem;
}

.plan-detail-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.plan-detail-actions {
    text-align: center;
    margin: 25px 0;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* 时间调整样式 */
.place-info-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.place-info-header #adjust-place-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.place-info-header #adjust-place-location {
    color: #666;
    font-size: 0.9rem;
}

.adjust-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.time-adjust-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-adjust-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

/* 时间选择器样式 */
.time-selector {
    margin-top: 10px;
}

.time-periods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.time-period {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.time-period:hover,
.adjust-time:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.time-period.selected,
.adjust-time.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.time-period i,
.adjust-time i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.time-period span,
.adjust-time span {
    font-weight: bold;
    font-size: 0.9rem;
}

.time-period small,
.adjust-time small {
    font-size: 0.75rem;
    color: #666;
    opacity: 0.8;
}

/* 调整时间模态框中的时间选择器 */
.adjust-time {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.adjust-time:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
}

.adjust-time.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.adjust-time:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(102, 126, 234, 0.3);
}

.selected-times {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.selected-time-tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.selected-time-tag .remove-time {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    margin-left: 5px;
}

/* 保存方案样式 */
.save-plan-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.save-plan-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.save-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.save-form input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* 时间轴样式 */
.timeline-header {
    text-align: center;
    margin-bottom: 30px;
}

.timeline-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: bold;
}

.stat-item i {
    color: #667eea;
}

.timeline-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    display: flex;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 0 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 60px;
    margin-right: 20px;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 20px;
    margin-right: 60px;
}

.timeline-time {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-item:nth-child(even) .timeline-time {
    right: -80px;
}

.timeline-item:nth-child(odd) .timeline-time {
    left: -80px;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    background: #667eea;
    border: 4px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 3;
}

.timeline-place-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.timeline-place-info {
    color: #666;
    margin-bottom: 10px;
}

.timeline-place-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 保存的方案样式 */
.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.saved-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.saved-actions .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
}

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

.saved-plan-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.saved-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.saved-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.saved-plan-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.saved-plan-date {
    font-size: 0.9rem;
    color: #666;
}

.saved-plan-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.saved-plan-places {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.saved-plan-place {
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.saved-plan-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 选择页面样式 */
.selected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.export-section {
    text-align: center;
    margin-top: 30px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

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

.close:hover {
    color: #333;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: none;
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #2196F3;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* 帮助信息 */
.help-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 350px;
    animation: slideInUp 0.3s ease;
}

.help-content {
    padding: 20px;
}

.help-content h4 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-content p {
    margin: 0 0 10px 0;
    color: #666;
    line-height: 1.5;
}

.help-content ul {
    margin: 10px 0 15px 20px;
    color: #666;
}

.help-content li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-btn {
        justify-content: center;
        padding: 12px 20px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .places-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 12px;
    }
    
    .place-image {
        height: 140px;
    }
    
    .place-info {
        padding: 12px;
    }
    
    .selected-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-content.plan-modal-content {
        width: 98%;
        margin: 5% auto;
    }
    
    .timeline-container {
        padding: 0 10px;
    }
    
    .timeline-content {
        margin: 0 10px;
        padding: 15px;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 30px;
        margin-right: 10px;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 10px;
        margin-right: 30px;
    }
    
    .timeline-time {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .timeline-item:nth-child(even) .timeline-time {
        right: -60px;
    }

    .timeline-item:nth-child(odd) .timeline-time {
        left: -60px;
    }
}

@media (max-width: 480px) {
    .places-grid {
        grid-template-columns: 1fr;
    }
    
    .place-image {
        height: 120px;
    }
    
    .place-actions {
        flex-direction: column;
    }
    
    .filters select,
    .filters input {
        padding: 8px 12px;
    }
    
    .modal-content.plan-modal-content {
        width: 100%;
        margin: 2% auto;
        padding: 15px;
    }
    
    .timeline-container {
        padding: 0 5px;
    }
    
    .timeline-content {
        margin: 0 5px;
        padding: 12px;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 25px;
        margin-right: 5px;
    }

    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 5px;
        margin-right: 25px;
    }
    
    .timeline-time {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .timeline-item:nth-child(even) .timeline-time {
        right: -50px;
    }

    .timeline-item:nth-child(odd) .timeline-time {
        left: -50px;
    }
    
    .timeline-place-name {
        font-size: 1rem;
    }
}