/* ============================================
   游贵州AI - 设计规范（文档要求）
   主色 #2E8B57 | 辅色 #FFD700 | 背景 #F5F5F5 | 文字 #333333
   ============================================ */
:root {
    /* 文档规范变量 */
    --primary: #2E8B57;
    --accent: #FFD700;
    --bg: #F5F5F5;
    --text: #333333;
    /* 兼容别名 */
    --primary-color: var(--primary);
    --secondary-color: var(--accent);
    --bg-color: var(--bg);
    --text-color: var(--text);
    --border-color: #E0E0E0;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    /* 统一间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    /* 统一圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    /* 统一阴影 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
}

/* ===== 统一按钮样式 ===== */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: #26834a; opacity: 0.95; }
.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: #e8e8e8; }
.btn-accent {
    background: var(--accent);
    color: var(--text);
}
.btn-accent:hover { opacity: 0.9; }

/* ===== 统一卡片样式 ===== */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ===== 统一返回按钮 ===== */
.back-btn, .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    border: none;
    background: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}
.back-btn:hover, .btn-back:hover { opacity: 0.85; }
body:not(.has-bottom-nav) {
    background: linear-gradient(180deg, #fdf9f3 0%, #f8f0e3 50%, #f2ebe0 100%);
}

.container { max-width: 600px; margin: 0 auto; padding: 0 0 80px; }

/* ===== Hero 区域：Logo 偏左、与下方内容宽度对齐 ===== */
.hero {
    background: linear-gradient(160deg, #1a5c4a 0%, #238b6a 30%, #2d9d7a 60%, #1e6b54 100%);
    padding: 16px 16px 20px;
    margin: 0 16px 0;
    border-radius: 16px;
    position: relative;
    overflow: visible;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(255,180,80,0.45) 0%, transparent 55%),
                radial-gradient(ellipse at 80% 85%, rgba(255,140,50,0.3) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 16px;
}
.hero-content { position: relative; z-index: 1; }
.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    text-align: left;
}
.hero-logo {
    width: 88px;
    min-width: 88px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.hero-text { flex: 1; min-width: 0; }
.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.hero-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.95);
    margin: 0;
}
.hero-actions { display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.btn-primary, .btn-outline {
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 17px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: #fff;
    color: #1a5c4a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.95);
}
.btn-outline:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* ===== 搜索区域：取消负边距，避免被 Hero 压住 ===== */
.search-section {
    background: linear-gradient(180deg, #fff 0%, #fefcf6 100%);
    border-radius: 16px;
    padding: 20px 16px;
    margin: 16px 16px 20px;
    box-shadow: 0 4px 16px rgba(26,92,74,0.12);
    border: 2px solid rgba(232,165,77,0.35);
    position: relative;
    z-index: 10;
}
.search-box { display: flex; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(232,165,77,0.4);
    border-radius: 14px;
    font-size: 16px;
    min-height: 48px;
}
.search-box input:focus {
    outline: none;
    border-color: #e8a54d;
    box-shadow: 0 0 0 3px rgba(232,165,77,0.2);
}
.search-box button {
    padding: 10px 16px;
    background: linear-gradient(135deg, #e8a54d 0%, #f0c050 50%, #e89540 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
    box-shadow: 0 2px 8px rgba(232,165,77,0.4);
    white-space: nowrap;
}
.search-box button:hover {
    background: linear-gradient(135deg, #f0b050 0%, #f5c85a 50%, #e8a040 100%);
    box-shadow: 0 4px 12px rgba(232,165,77,0.5);
}
.search-suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.suggestion-tag {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(26,107,92,0.15) 0%, rgba(232,165,77,0.25) 100%);
    border-radius: 24px;
    font-size: 16px;
    color: #1a5c4a;
    cursor: pointer;
    border: 2px solid rgba(232,165,77,0.45);
    font-weight: 500;
}
.suggestion-tag:hover {
    background: linear-gradient(135deg, rgba(26,107,92,0.25) 0%, rgba(232,165,77,0.4) 100%);
}

/* ===== 功能入口：引导式布局 ===== */
.features-section { padding: 20px 16px 24px; }
.features-intro {
    font-size: 15px;
    color: #666;
    margin-bottom: 16px;
    padding: 0 4px;
    text-align: center;
}
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature-card {
    background: linear-gradient(180deg, #fff 0%, #fefcf6 100%);
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 12px rgba(26,92,74,0.1);
    border: 2px solid rgba(232,165,77,0.3);
    border-top: 4px solid #e8a54d;
    transition: all 0.2s;
}
.feature-card {
    transition: all 0.3s ease;
}
.feature-card:hover {
    box-shadow: 0 6px 20px rgba(232,165,77,0.25);
    transform: translateY(-2px);
}
.feature-card .icon { font-size: 34px; display: block; margin-bottom: 10px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; color: #1a5c4a; font-weight: 700; }
.feature-card p { font-size: 15px; color: #555; line-height: 1.5; }

/* ===== 区块标题 ===== */
.section { padding: 0 16px 24px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.section-title { font-size: 22px; font-weight: 700; color: #1a5c4a; }
.section-more { font-size: 17px; color: #e8a54d; text-decoration: none; font-weight: 600; }
.section-more:hover { text-decoration: underline; }

/* ===== 景点网格 ===== */
.spots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.spot-card {
    background: linear-gradient(180deg, #fff 0%, #fefcf6 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,92,74,0.1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid rgba(232,165,77,0.2);
    transition: all 0.2s;
}
.spot-card:hover {
    box-shadow: 0 6px 20px rgba(232,165,77,0.2);
    transform: translateY(-2px);
}
.spot-image-wrapper {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #e8f5f1 0%, #f5ecd8 50%, #e8f5f1 100%);
    overflow: hidden;
}
.spot-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.spot-info { padding: 14px; }
.spot-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; display: block; color: #1a5c4a; line-height: 1.4; }
.spot-city { font-size: 15px; color: #666; display: block; }
.spot-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.spot-tags .tag {
    font-size: 14px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(26,107,92,0.15) 0%, rgba(232,165,77,0.25) 100%);
    border-radius: 14px;
    color: #1a5c4a;
    border: 1px solid rgba(232,165,77,0.35);
}

/* 景点列表页 */
.spots-list { padding: 16px; }
.spots-list .spot-card { margin-bottom: 18px; }
.spots-list .spot-image-wrapper { height: 180px; }
.spots-list .spot-name { font-size: 19px; }
.spots-list .spot-city { font-size: 16px; }
.spots-list .spot-tags .tag { font-size: 15px; }

/* 子页面 header */
.page-header {
    background: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.page-header-gradient {
    background: linear-gradient(135deg, #1a5c4a 0%, #2d8b6e 50%, #e8a54d 100%);
    box-shadow: 0 2px 12px rgba(232,165,77,0.3);
}
.page-header-gradient a, .page-header-gradient h2 { color: #fff !important; }
.page-header a { color: #1a5c4a; text-decoration: none; font-size: 17px; font-weight: 500; }
.page-header h2 { font-size: 20px; color: #333; flex: 1; font-weight: 700; }

/* 加载状态 */
.loading { text-align: center; padding: 28px; color: #666; font-size: 17px; }

/* 加载更多 */
.load-more { text-align: center; padding: 20px; }
.load-more button {
    padding: 16px 40px;
    background: linear-gradient(135deg, #1a5c4a, #e8a54d);
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}
.load-more button:hover { opacity: 0.95; }

/* 订单相关 */
.order-search { margin-bottom: 16px; }
.order-search input { padding: 14px 18px; border: 2px solid #e0e0e0; border-radius: 12px; width: 100%; margin-bottom: 10px; font-size: 17px; }
.order-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.order-status { padding: 6px 14px; border-radius: 8px; font-size: 14px; }
.status-pending { background: #fff3e0; color: #e65100; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-refunded { background: #ffebee; color: #c62828; }
.status-cancelled { background: #f5f5f5; color: #757575; }

/* ===== 移动端适配 ===== */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

.btn-primary, .btn-outline, .feature-card, .spot-card { min-height: 48px; }
.feature-card { min-height: 100px; display: flex; flex-direction: column; justify-content: center; }

input, select, textarea { font-size: 17px !important; min-height: 48px; }

/* ===== 酒店推荐模块 ===== */
.hotel-section { margin-top: 24px; animation: hotelFadeInUp 0.5s ease; }
@keyframes hotelFadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.hotel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.hotel-section-title { font-size: 18px; color: #1a5c4a; font-weight: 700; margin-bottom: 4px; }
.hotel-section-subtitle { font-size: 14px; color: #666; }
.hotel-more-link { font-size: 14px; color: #e8a54d; text-decoration: none; font-weight: 600; white-space: nowrap; }
.hotel-more-link:hover { text-decoration: underline; }
.hotel-cards-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 768px) {
    .hotel-cards-wrap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
    .hotel-cards-wrap { grid-template-columns: 1fr; }
}
.hotel-card {
    background: linear-gradient(180deg, #fff 0%, #fefcf6 100%);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,92,74,0.1);
    border: 2px solid rgba(232,165,77,0.2);
    transition: all 0.25s;
}
.hotel-card:hover {
    box-shadow: 0 6px 20px rgba(232,165,77,0.25);
    transform: translateY(-4px);
}
.hotel-card-img {
    position: relative;
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #e8f5f1 0%, #f5ecd8 100%);
    overflow: hidden;
}
.hotel-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hotel-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}
.hotel-badge-minsu { background: rgba(76,175,80,0.95); color: #fff; }
.hotel-badge-kezhan { background: rgba(255,152,0,0.95); color: #fff; }
.hotel-badge-hotel { background: rgba(33,150,243,0.95); color: #fff; }
.hotel-card-body { padding: 12px; }
.hotel-name { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hotel-rating { font-size: 13px; color: #666; margin-bottom: 4px; }
.hotel-recommendation { font-size: 12px; color: #888; margin-bottom: 8px; line-height: 1.4; }
.hotel-price { font-size: 18px; font-weight: 700; color: #e65100; margin-bottom: 6px; }
.hotel-distance { font-size: 12px; color: #666; margin-bottom: 12px; }
.hotel-actions { display: flex; gap: 8px; }
.hotel-btn-ctrip {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #e8a54d 0%, #f0c050 50%, #e89540 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(232,165,77,0.4);
    transition: all 0.2s;
}
.hotel-btn-ctrip:hover { opacity: 0.95; transform: scale(1.02); }
.hotel-btn-nav {
    padding: 10px 14px;
    border: 2px solid #1a5c4a;
    color: #1a5c4a;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}
.hotel-btn-nav:hover { background: rgba(26,92,74,0.1); }
.hotel-fallback {
    padding: 20px;
    background: linear-gradient(135deg, rgba(232,165,77,0.15) 0%, rgba(26,107,92,0.1) 100%);
    border-radius: 14px;
    border: 2px dashed rgba(232,165,77,0.5);
}
.hotel-fallback-link {
    font-size: 16px;
    color: #1a5c4a;
    font-weight: 600;
    text-decoration: none;
}
.hotel-fallback-link:hover { text-decoration: underline; }
.hotel-skeleton .hotel-card-img { height: 140px; }
.shimmer {
    animation: hotelShimmer 1.5s infinite;
    background: linear-gradient(90deg, #e8f5f1 25%, #f5ecd8 50%, #e8f5f1 75%);
    background-size: 200% 100%;
}
@keyframes hotelShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.hotel-skeleton-line {
    height: 12px;
    background: #e8e8e8;
    border-radius: 6px;
    margin-bottom: 8px;
}
.hotel-skeleton-line.short { width: 60%; }

/* 路线规划 - 住宿推荐区块 */
.route-hotel-section {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(232,165,77,0.12) 0%, rgba(26,107,92,0.08) 100%);
    border-radius: 14px;
    border: 2px solid rgba(232,165,77,0.3);
}
.route-hotel-section h3 { font-size: 18px; color: #1a5c4a; margin-bottom: 10px; }
.route-hotel-section p { font-size: 15px; color: #555; margin-bottom: 8px; }

/* 路线规划 - 景点导航与住宿链接 */
.route-nav-link, .route-hotel-link {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    font-size: 13px;
    border-radius: 16px;
    text-decoration: none;
    white-space: nowrap;
}
.route-nav-link {
    background: linear-gradient(135deg, #1a5c4a, #2d8b6e);
    color: #fff !important;
}
.route-hotel-link {
    background: linear-gradient(135deg, #e8a54d, #d4942e);
    color: #fff !important;
}
.route-nav-link:hover, .route-hotel-link:hover {
    opacity: 0.9;
}

/* ===== 底部导航 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    display: flex;
    background: #fff;
    border-top: 1px solid var(--border-color);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    transition: color 0.3s ease;
}
.bottom-nav .nav-item .icon { font-size: 22px; margin-bottom: 2px; }
.bottom-nav .nav-item.active { color: var(--primary); font-weight: 600; }
.bottom-nav .nav-item:hover { color: var(--primary); }
@media (min-width: 768px) {
    .bottom-nav { max-width: 600px; left: 50%; transform: translateX(-50%); border-radius: 16px 16px 0 0; box-shadow: 0 -2px 12px rgba(0,0,0,0.08); }
}
@media (min-width: 1024px) {
    .bottom-nav { max-width: 480px; }
}

/* 页面底部留白，避免被底部Tab遮挡 */
body.has-bottom-nav { padding-bottom: 70px; }
body.has-bottom-nav .container { padding-bottom: 90px; }

.hero-compact { padding: 12px 16px 16px; margin: 0 16px 0; }
.hero-compact .hero-actions { display: none; }

/* 小屏优化 - 保持大字体 */
@media (max-width: 480px) {
    .hero { padding: 16px; margin: 0 16px 0; }
    .hero-logo { width: 80px; min-width: 80px; }
    .hero-title { font-size: 26px; }
    .hero-subtitle { font-size: 15px; }
    .btn-primary, .btn-outline { padding: 12px 22px; font-size: 17px; }
    .search-section { margin: 16px 16px 20px; padding: 18px 16px; }
    .search-box input { font-size: 16px; padding: 14px 18px; }
    .search-box button { font-size: 14px; padding: 10px 14px; min-height: 46px; }
    .suggestion-tag { font-size: 15px; padding: 11px 18px; }
    .features { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px 24px; }
    .feature-card { padding: 18px 12px; }
    .feature-card .icon { font-size: 32px; }
    .feature-card h3 { font-size: 17px; }
    .feature-card p { font-size: 15px; }
    .section { padding: 0 16px 24px; }
    .section-title { font-size: 21px; }
    .section-more { font-size: 16px; }
    .spots-grid { gap: 14px; }
    .spot-image-wrapper { height: 120px; }
    .spot-info { padding: 14px; }
    .spot-name { font-size: 17px; }
    .spot-city { font-size: 15px; }
    .spot-tags .tag { font-size: 14px; padding: 7px 13px; }
}
