/* travel-agency.css — 旅行社/看世界模块样式
   风格：温暖、插画感、卡片网格
*/

/* ===== 页面容器 ===== */
#travel-agency {
    display: none;
    padding: 28px 32px;
}
#travel-agency.active {
    display: block;
}

/* ===== 顶部按钮 ===== */
.travel-history-btn {
    padding: 8px 18px;
    border: 1px solid var(--brand-200);
    border-radius: var(--radius-md);
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}
.travel-history-btn:hover {
    background: var(--brand-100);
    border-color: var(--brand-300);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229,0.12);
}

/* ===== 分类标签 ===== */
.travel-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.travel-cat-tab {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-600);
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}
.travel-cat-tab:hover {
    background: var(--brand-50);
    color: var(--brand-600);
    border-color: var(--brand-200);
    transform: translateY(-1px);
}
.travel-cat-tab.active {
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #FFFFFF !important;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(79, 70, 229,0.3);
}

/* ===== 场景卡片网格 ===== */
.travel-scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ===== 场景卡片 ===== */
.travel-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    box-shadow: var(--shadow-card);
}
.travel-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-hover), 0 12px 40px rgba(0,0,0,0.08);
    border-color: var(--brand-200);
}
.travel-card:hover .travel-card-img {
    transform: scale(1.05);
}
.travel-card-img-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}
.travel-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

/* 卡片上的地名标签 */
.travel-card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.travel-card-badge::before {
    content: '📍';
    font-size: 12px;
}

/* 卡片底部信息 */
.travel-card-info {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.travel-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.travel-card-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text-secondary);
}
.travel-card-price strong {
    color: var(--brand-600);
    font-size: 16px;
}
.travel-card-price::after {
    content: '💰';
    font-size: 14px;
}

/* ===== 详情弹窗 ===== */
#travel-detail-content {
    animation: modalPop 0.25s ease;
}

/* ===== 知识列表项 ===== */
.travel-fact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.travel-fact-item::before {
    content: '✨';
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== 旅行历史记录项 ===== */
.travel-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.travel-history-item:last-child {
    border-bottom: none;
}
.travel-history-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.travel-history-info {
    flex: 1;
}
.travel-history-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.travel-history-date {
    font-size: 12px;
    color: var(--text-tertiary);
}
.travel-history-student {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.travel-history-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ===== 旅行计划入口卡片 ===== */
.travel-plan-portal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.travel-plan-portal:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 100%);
    border-color: var(--brand-200);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}
.travel-plan-portal-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.travel-plan-portal-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.travel-plan-portal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px;
}
.travel-plan-portal-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}
.travel-plan-portal-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--brand-600);
    font-weight: 600;
}
.travel-plan-portal-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--brand-600);
    transition: transform 0.2s;
}
.travel-plan-portal:hover .travel-plan-portal-arrow {
    transform: translateX(3px);
}

/* ===== 旅行计划弹窗 ===== */
.travel-plan-modal,
.travel-plan-picker-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 600;
    align-items: center;
    justify-content: center;
}
.travel-plan-modal.active,
.travel-plan-picker-modal.active {
    display: flex !important;
}
.travel-plan-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
}
.travel-plan-modal-box,
.travel-plan-picker-box {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 70px rgba(0,0,0,0.2);
    width: 900px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    animation: tpModalIn 0.25s var(--ease-out);
}
.travel-plan-picker-box {
    width: 720px;
}
@keyframes tpModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.travel-plan-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.travel-plan-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-subtle);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.travel-plan-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}
.travel-plan-modal-body {
    padding: 22px 24px 24px;
    overflow-y: auto;
    flex: 1;
}
.travel-plan-edit-tip {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===== 旅行计划（探险图） ===== */
.travel-plan-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 28px;
}
.travel-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.travel-plan-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.travel-plan-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}
.travel-plan-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
#travel-plan-student-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: white;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    min-width: 130px;
}
.travel-plan-refresh {
    padding: 8px 14px;
    border: 1px solid var(--brand-200);
    border-radius: var(--radius-md);
    background: white;
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
}
.travel-plan-refresh:hover {
    background: var(--brand-50);
    border-color: var(--brand-300);
    transform: translateY(-1px);
}

/* 探险图轨道 */
.travel-plan-map {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px 20px;
    overflow-x: auto;
}
.travel-plan-empty {
    text-align: center;
    padding: 36px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}
.travel-plan-track {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: max-content;
    padding: 8px 4px;
}

/* 节点 */
.travel-plan-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s var(--ease-out);
    flex-shrink: 0;
    width: 88px;
}
.travel-plan-node:hover {
    transform: translateY(-3px);
}
.travel-plan-node.start,
.travel-plan-node.treasure {
    width: 70px;
}
.tp-node-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: white;
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.25s var(--ease-out);
    position: relative;
    z-index: 2;
}
.tp-edit-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-500);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.travel-plan-node.start .tp-node-dot,
.travel-plan-node.treasure .tp-node-dot {
    width: 44px;
    height: 44px;
    font-size: 20px;
}
.tp-node-label,
.tp-node-name,
.tp-node-status {
    font-size: 11px;
    text-align: center;
    line-height: 1.3;
    max-width: 84px;
}
.tp-node-label {
    color: var(--text-secondary);
    font-weight: 600;
}
.tp-node-name {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 2px;
}
.tp-node-status {
    color: var(--text-tertiary);
    font-size: 10px;
}

/* 路径 */
.travel-plan-path {
    width: 34px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #cbd5e1 0,
        #cbd5e1 6px,
        transparent 6px,
        transparent 10px
    );
    border-radius: 2px;
    flex-shrink: 0;
    position: relative;
    margin-top: -24px;
}

/* 已完成节点 */
.travel-plan-node.done .tp-node-dot {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
    border-color: var(--brand-600);
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.travel-plan-node.done .tp-node-status {
    color: var(--brand-600);
    font-weight: 600;
}
.travel-plan-node.done + .travel-plan-path {
    background: linear-gradient(90deg, var(--brand-400), var(--brand-500));
}

/* 当前下一站 */
.travel-plan-node.current .tp-node-dot {
    background: var(--brand-50);
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), 0 4px 14px rgba(79, 70, 229, 0.2);
    animation: tpPulse 1.6s ease-in-out infinite;
}
.travel-plan-node.current .tp-node-status {
    color: var(--brand-600);
    font-weight: 700;
}

/* 可编辑站点 */
.travel-plan-node.editable {
    cursor: pointer;
}
.travel-plan-node.editable .tp-node-dot {
    border-style: dashed;
    border-color: var(--brand-400);
}
.travel-plan-node.editable:hover .tp-node-dot {
    background: var(--brand-50);
    border-style: solid;
    border-color: var(--brand-500);
}
.travel-plan-node.editable:hover .tp-node-name {
    color: var(--brand-600);
}
@keyframes tpPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12), 0 4px 14px rgba(79, 70, 229, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.06), 0 6px 18px rgba(79, 70, 229, 0.28); }
}

/* 终点宝箱 */
.travel-plan-node.treasure .tp-node-dot {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
    color: #92400e;
}
.travel-plan-node.treasure.open .tp-node-dot {
    background: linear-gradient(135deg, #fde047, #fbbf24);
    border-color: #d97706;
    animation: tpBounce 1s ease-in-out infinite;
}
@keyframes tpBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* 底部进度与奖励 */
.travel-plan-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
}
.travel-plan-progress {
    font-size: 13px;
    color: var(--text-secondary);
}
.travel-plan-progress strong {
    color: var(--brand-600);
    font-size: 16px;
}
.travel-plan-reward {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}
.travel-plan-reward span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--brand-50);
    border-radius: var(--radius-full);
    color: var(--brand-700);
    font-weight: 600;
}
.travel-plan-done-tip {
    margin-top: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    color: #065f46;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* ===== 站点选择器弹窗内容 ===== */
.travel-plan-picker-body {
    padding: 20px 24px 24px;
    max-height: 60vh;
    overflow-y: auto;
}
.travel-plan-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}
.travel-plan-picker-card {
    position: relative;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}
.travel-plan-picker-card:hover {
    border-color: var(--brand-400);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.14);
}
.travel-plan-picker-card.selected {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.travel-plan-picker-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-500);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tp-picker-img {
    height: 86px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.tp-picker-info {
    padding: 10px;
    text-align: center;
}
.tp-picker-emoji {
    font-size: 20px;
    margin-bottom: 4px;
}
.tp-picker-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tp-picker-price {
    font-size: 11px;
    color: var(--brand-600);
    font-weight: 600;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .travel-scene-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .travel-card-img-wrap {
        height: 140px;
    }
}
@media (max-width: 480px) {
    .travel-scene-grid {
        grid-template-columns: 1fr;
    }
    .travel-categories {
        gap: 6px;
    }
    .travel-cat-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}
