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

/* CSS变量定义 */
:root {
    --min-width: 375px;
    --max-width: 430px;
    --min-height: 667px;
    --max-height: 932px;
    --base-font-size: clamp(14px, 4vw, 16px);
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #FFFFFF;
    color: #333;
    overflow-x: hidden;
    line-height: 1.4;
    font-size: var(--base-font-size);
}

.app-container {
    width: 100vw;
    max-width: 100vw;
    min-height: 100vh;
    background: #FFFFFF;
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 宽度范围：375px-430px - 响应式调整 */
@media screen and (max-width: 375px) {
    .app-container {
        width: var(--min-width);
        font-size: 14px;
    }
}

@media screen and (min-width: 375px) and (max-width: 430px) {
    .app-container {
        width: 100vw;
    }
}

@media screen and (min-width: 430px) {
    .app-container {
        width: var(--max-width);
        font-size: 16px;
    }
}

/* 高度范围：667px-932px - 响应式调整 */
@media screen and (max-height: 667px) {
    .app-container {
        height: var(--min-height);
    }
}

@media screen and (min-height: 667px) and (max-height: 932px) {
    .app-container {
        height: 100vh;
    }
}

@media screen and (min-height: 932px) {
    .app-container {
        height: var(--max-height);
    }
}

/* 搜索栏部分 */
.search-section {
    background: #FFFFFF;
    padding: clamp(12px, 3.5vh, 16px) clamp(10px, 3vw, 13px);
    width: 100%;
    border-radius: 0 0 clamp(14px, 4vw, 18px) clamp(14px, 4vw, 18px);
    margin: 0 0 clamp(8px, 2vh, 12px) 0;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.top-bar {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2.5vw, 12px);
    margin-bottom: 8px;
    padding-bottom: 8px;
    min-height: 32px;
    position: relative;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: #FFFFFF;
    padding-right: clamp(6px, 2vw, 10px);
    cursor: pointer;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.location-info:hover {
    opacity: 0.7;
}

.location-info span {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 400;
    color: #000;
    user-select: none;
    white-space: nowrap;
}

.nav-container {
    flex: 1;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    min-width: 0;
    flex-shrink: 1;
}

.location-icon {
    width: clamp(20px, 6vw, 24px);
    height: clamp(20px, 6vw, 24px);
    flex-shrink: 0;
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: clamp(12px, 4.5vw, 20px);
    white-space: nowrap;
}

.nav-tab {
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 400;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-tab.active {
    color: #FF5F57;
}

.nav-tab.recommendation-active {
    color: #FF5F57;
    text-decoration: underline;
    text-decoration-color: #FF5F57;
    text-underline-position: from-font;
}

.search-bar {
    height: clamp(32px, 5vh, 36px);
    background: #FF9E9E;
    border-radius: clamp(14px, 4vw, 18px);
    display: flex;
    align-items: center;
    padding: 0 clamp(10px, 3vw, 12px);
    gap: clamp(6px, 2vw, 8px);
}

.search-icon, .voice-icon {
    width: clamp(20px, 6vw, 24px);
    height: clamp(20px, 6vw, 24px);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: clamp(14px, 4vw, 16px);
    color: #735E5E;
    placeholder-color: #735E5E;
}

.search-bar input::placeholder {
    color: #735E5E;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 16px 8px 24px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 轮播图 */
.banner-section {
    margin: clamp(8px, 2.5vh, 12px) 0 clamp(12px, 3.5vh, 16px) 0;
    position: relative;
}

.banner-container {
    width: 100%;
    height: clamp(140px, 25vh, 180px);
    border-radius: clamp(14px, 4vw, 18px);
    overflow: hidden;
    position: relative;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: clamp(14px, 4vw, 18px);
}

.banner-dots {
    position: absolute;
    bottom: clamp(10px, 2.5vh, 12px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 2vw, 8px);
    z-index: 10;
}

.dot {
    width: clamp(6px, 2vw, 8px);
    height: clamp(6px, 2vw, 8px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
}

.dot:hover {
    transform: scale(1.2);
}

.dot.active {
    background: rgba(255, 158, 158, 0.9);
    transform: scale(1.2);
}

/* 功能图标网格 */
.function-grid {
    background: #fff;
    border-radius: clamp(14px, 4vw, 18px);
    padding: clamp(12px, 3.5vw, 16px);
    margin: clamp(12px, 3.5vh, 16px) 0;
}

.grid-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.grid-row:last-child {
    margin-bottom: 8px;
}

.function-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.function-item:hover {
    transform: scale(1.1);
}

.function-icon {
    width: clamp(32px, 9vw, 36px);
    height: clamp(32px, 9vw, 36px);
    margin-bottom: clamp(3px, 1vw, 4px);
}

.function-item span {
    font-size: clamp(12px, 3.5vw, 14px);
    text-align: center;
    color: #000;
}

.grid-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.page-dot {
    width: 20px;
    height: 4px;
}

/* 通用section样式 */
.featured-section, .immersive-section, .travel-together-section {
    background: #EEEEEE;
    border-radius: clamp(14px, 4vw, 18px);
    padding: clamp(12px, 3.5vw, 16px);
    margin: clamp(12px, 3.5vh, 16px) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(8px, 2.5vh, 12px);
}

.section-header h3 {
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 400;
    color: #000;
}

.more-link {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-tab {
    padding: 4px 8px;
    background: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-tab.active {
    background: #FF9E9E;
}

/* 景点卡片 */
.attractions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.attraction-card {
    background: #DEDEDE;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.attraction-card:hover {
    transform: scale(1.02);
}

.attraction-image {
    width: 100%;
    height: 122px;
    object-fit: cover;
}

.attraction-info {
    padding: 8px;
}

.attraction-info h4 {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin-bottom: 4px;
}

.attraction-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating, .distance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
}

.star-icon, .distance-icon {
    width: 16px;
    height: 16px;
}

.level {
    color: #F22E2E;
}

/* 沉浸式导览 */
.immersive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.immersive-card {
    background: #DEDEDE;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.immersive-card:hover {
    transform: scale(1.02);
}

.immersive-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.immersive-info {
    padding: 8px;
}

.immersive-info h4 {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin-bottom: 4px;
}

.online-count {
    font-size: 12px;
    color: #FF1010;
}

.view-all {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    text-align: right;
    display: block;
}

/* 一起去疯吧 */
.tab-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-button {
    font-size: 16px;
    font-weight: 400;
    color: #FF5F57;
    cursor: pointer;
    white-space: nowrap;
}

.tab-button.active {
    color: #FF5F57;
}

.tab-button:not(.active) {
    color: #000;
}

.tab-more {
    font-size: 14px;
    color: #4E4E4E;
    cursor: pointer;
    margin-left: auto;
}

.travel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.travel-item {
    border-bottom: 1px solid #D0D0D0;
    padding-bottom: 16px;
    display: flex;
    gap: 12px;
}

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

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.travel-content {
    flex: 1;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.user-info h4 {
    font-size: 15px;
    font-weight: 400;
    color: #4E4E4E;
}

.date {
    font-size: 14px;
    color: #4E4E4E;
}

.stats {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-item {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
}

.interested {
    background: #FF9E9E;
    color: #4E4E4E;
}

.joined {
    background: #5DFF75;
    color: #4E4E4E;
}

.travel-desc {
    font-size: 18px;
    font-weight: 400;
    color: #000;
    line-height: 1.4;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    height: clamp(50px, 8vh, 57px);
    background: #FF9E9E;
    border-radius: clamp(20px, 6.5vw, 28px) clamp(20px, 6.5vw, 28px) 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 clamp(16px, 4.5vw, 20px);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-item:hover {
    transform: scale(1.1);
}

.nav-item.active {
    color: #FF5F57;
}

.nav-icon {
    width: clamp(20px, 6vw, 24px);
    height: clamp(20px, 6vw, 24px);
    margin-bottom: clamp(3px, 1vw, 4px);
}

.nav-item span {
    font-size: clamp(12px, 3.5vw, 14px);
    font-weight: 400;
    color: #000;
}

.nav-item.active span {
    color: #FF5F57;
}

/* 滚动样式优化 */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.top-bar::-webkit-scrollbar {
    height: 3px;
}

.top-bar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.top-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

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

.function-grid, .featured-section, .immersive-section, .travel-together-section {
    animation: fadeIn 0.6s ease-out;
}

/* 响应式调整 - 宽度范围 375px-430px */
@media screen and (max-width: 375px) {
    .function-item span {
        font-size: 12px;
    }
    
    .attractions-grid, .immersive-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        gap: 12px;
        font-size: 16px;
    }
    
    .search-section {
        padding: 12px 10px;
    }
}

@media screen and (min-width: 430px) {
    .app-container {
        font-size: 16px;
    }
    
    .nav-tabs {
        gap: 20px;
        font-size: 20px;
    }
}

/* 响应式调整 - 高度范围 667px-932px */
@media screen and (max-height: 667px) {
    .banner-container {
        height: 140px;
    }
    
    .banner-dots {
        margin-top: 8px;
    }
    
    .featured-section, .immersive-section, .travel-together-section {
        margin: 10px 0;
        padding: 12px;
    }
    
    .main-content {
        padding-bottom: 0;
    }
}

@media screen and (min-height: 932px) {
    .banner-container {
        height: 180px;
    }
    
    .banner-dots {
        margin-top: 12px;
    }
    
    .main-content {
        padding: 0 clamp(12px, 4vw, 16px) 24px;
    }
    
    .travel-list {
        gap: clamp(16px, 4vh, 20px);
    }
    
    .featured-section, .immersive-section, .travel-together-section {
        padding: clamp(14px, 3.5vw, 18px);
    }
}


/* 城市选择模态框 */
.city-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.city-modal-content {
    background: #FFFFFF;
    border-radius: clamp(14px, 4vw, 18px);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.city-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(16px, 4vh, 20px);
    border-bottom: 1px solid #E5E5E5;
    flex-shrink: 0;
}

.city-modal-header h3 {
    font-size: clamp(18px, 5vw, 20px);
    font-weight: 500;
    color: #000;
    margin: 0;
}

.city-modal-close {
    font-size: clamp(24px, 6vw, 28px);
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.city-modal-close:hover {
    color: #333;
}

.city-search {
    padding: clamp(12px, 3vw, 16px);
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
    background: #F8F8F8;
    flex-shrink: 0;
    position: relative;
}

.city-search .search-icon {
    width: clamp(18px, 5vw, 20px);
    height: clamp(18px, 5vw, 20px);
    flex-shrink: 0;
}

.city-search input {
    flex: 1;
    padding: clamp(8px, 2vw, 10px);
    border: 1px solid #E5E5E5;
    border-radius: clamp(6px, 1.5vw, 8px);
    font-size: clamp(14px, 4vw, 16px);
    outline: none;
    transition: border-color 0.3s ease;
    background: #FFFFFF;
}

.city-search input:focus {
    border-color: #FF9E9E;
}

.search-clear {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: clamp(18px, 5vw, 20px);
    line-height: 1;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.search-clear:hover {
    color: #333;
}

.city-select-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.province-section {
    width: 40%;
    border-right: 1px solid #E5E5E5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.city-section {
    width: 60%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section-title {
    padding: clamp(12px, 3vw, 16px);
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 500;
    color: #666;
    background: #F5F5F5;
    border-bottom: 1px solid #E5E5E5;
    flex-shrink: 0;
}

.province-list {
    flex: 1;
    overflow-y: auto;
    padding: clamp(4px, 1vw, 8px);
}

.city-list {
    flex: 1;
    overflow-y: auto;
    padding: clamp(4px, 1vw, 8px);
}

.city-placeholder {
    padding: clamp(20px, 5vw, 40px);
    text-align: center;
    color: #999;
    font-size: clamp(14px, 4vw, 16px);
}

.province-item {
    padding: clamp(12px, 3vw, 16px);
    border-radius: clamp(6px, 1.5vw, 8px);
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: clamp(2px, 0.5vw, 4px);
    font-size: clamp(14px, 4vw, 16px);
    color: #000;
}

.province-item:hover {
    background-color: #F5F5F5;
}

.province-item.active {
    background-color: #FFE5E5;
    color: #FF5F57;
    font-weight: 500;
}

.city-item {
    padding: clamp(12px, 3vw, 16px);
    border-radius: clamp(6px, 1.5vw, 8px);
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: clamp(2px, 0.5vw, 4px);
    font-size: clamp(14px, 4vw, 16px);
    color: #000;
}

.city-item:hover {
    background-color: #F5F5F5;
}

.city-item.active {
    background-color: #FFE5E5;
    color: #FF5F57;
    font-weight: 500;
}

/* 搜索结果样式 */
.search-results {
    width: 100%;
    padding: clamp(8px, 2vw, 12px);
}

.search-results-title {
    padding: clamp(8px, 2vw, 12px);
    font-size: clamp(13px, 3.5vw, 15px);
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid #E5E5E5;
    margin-bottom: clamp(8px, 2vw, 12px);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    padding: clamp(12px, 3vw, 16px);
    border-radius: clamp(6px, 1.5vw, 8px);
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: clamp(4px, 1vw, 6px);
}

.search-result-item:hover {
    background-color: #F5F5F5;
}

.result-icon {
    font-size: clamp(18px, 5vw, 20px);
    flex-shrink: 0;
}

.result-text {
    flex: 1;
    font-size: clamp(15px, 4vw, 17px);
    color: #000;
    font-weight: 500;
}

.result-text mark {
    background-color: #FFF3CD;
    color: #FF5F57;
    padding: 0 2px;
    border-radius: 2px;
}

.result-province {
    font-size: clamp(12px, 3vw, 14px);
    color: #999;
    flex-shrink: 0;
}


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

/* ==================== 智能推荐页面样式 ==================== */
.recommendation-section {
    flex: 1;
    overflow-y: auto;
    background: #FFFFFF;
    padding: 0 4px;
}

.recommendation-container {
    padding: 20px 10px 24px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* 说明文字 */
.recommendation-intro {
    padding: clamp(10px, 2.5vh, 14px) 0;
    color: #7b7b7b;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 1.5;
    border-bottom: 1px solid #e4e4e4;
}

.recommendation-intro p {
    margin: 0;
    padding: 0;
}

/* 表单区域 */
.recommendation-form {
    margin-top: 0;
}

.form-row {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 8px);
    padding: clamp(10px, 2.5vh, 14px) 0;
    border-bottom: 1px solid #e4e4e4;
    min-height: 40px;
}

.form-label {
    font-size: clamp(16px, 4.5vw, 18px);
    font-weight: 500;
    color: #000;
    white-space: nowrap;
    flex-shrink: 0;
    width: 90px;
}

/* 智能推荐表单内：标签在上，控件在下 */
.recommendation-form .form-row {
    flex-direction: column;
    align-items: flex-start;
}

.recommendation-form .form-label {
    width: auto;
    margin-bottom: 6px;
}

/* 日期选择 */
.date-select-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 200px;
}

.date-input {
    width: 100%;
    height: 28px;
    border: 1px solid #000;
    border-radius: 0;
    padding: 2px 25px 2px 6px;
    font-size: clamp(14px, 4vw, 16px);
    color: #8c8c8c;
    background: #fff;
    cursor: pointer;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.date-select-wrapper .chevron-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

/* 数字输入组 */
.form-group-inline {
    display: flex;
    align-items: flex-start;
    gap: clamp(4px, 1vw, 6px);
    flex-wrap: wrap;
    flex: 1;
}

/* 游玩天数行的特殊处理 */
.form-row:has(.form-group-inline .toggle-group) .form-group-inline {
    align-items: flex-start;
}

.form-row:has(.form-group-inline .toggle-group) .toggle-group {
    width: 100%;
    margin-left: 0;
    margin-top: clamp(6px, 1.5vh, 8px);
}

.number-input-group {
    display: flex;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
}

.number-btn {
    width: 24px;
    height: 26px;
    background: #dedede;
    border: none;
    border-right: 1px solid #bfbfbf;
    font-size: clamp(16px, 4.5vw, 18px);
    color: #8c8c8c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    user-select: none;
}

.number-btn:first-child {
    border-radius: 5px 0 0 5px;
    border-right: 1px solid #bfbfbf;
}

.number-btn:last-child {
    border-radius: 0 5px 5px 0;
    border-left: 1px solid #bfbfbf;
    border-right: none;
    width: 27px;
    color: #000;
}

.number-btn:active {
    background: #bfbfbf;
}

.number-input {
    width: 26px;
    height: 26px;
    background: #dedede;
    border: none;
    text-align: center;
    font-size: clamp(14px, 4vw, 16px);
    color: #000;
    padding: 0;
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.unit {
    font-size: clamp(14px, 4vw, 18px);
    color: #000;
    margin-right: 8px;
}

/* 人数类型下拉（成人/老年人/军人/其他优待人群） */
.adult-type-select {
    height: 28px;
    min-width: 130px;
    padding: 0 8px;
    border: 1px solid #000;
    border-radius: 6px;
    font-size: clamp(14px, 4vw, 16px);
    color: #333;
    background: #fff;
    cursor: pointer;
    margin-right: 4px;
}
.adult-type-select:focus {
    outline: none;
    border-color: #ff5f57;
}

/* 切换按钮组 */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* 在form-group-inline中的toggle-group强制换行 */
.form-group-inline .toggle-group {
    flex-basis: 100%;
    order: 10; /* 确保在最后显示 */
    margin-left: 0;
    margin-top: clamp(6px, 1.5vh, 8px);
}

.toggle-label {
    font-size: clamp(14px, 4vw, 16px);
    color: #585858;
    white-space: nowrap;
}

.toggle-options {
    display: flex;
    gap: clamp(4px, 1vw, 6px);
    align-items: center;
}

/* 仅「住宿」一行：选项多时自动换行 */
.form-row.accommodation-row {
    align-items: flex-start;
}
.form-row.accommodation-row .toggle-options {
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.toggle-btn {
    padding: 2px 5px;
    border-radius: 8px;
    border: none;
    background: #fff;
    font-size: clamp(14px, 4vw, 18px);
    color: #8c8c8c;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #ffd0d0;
    color: #ff5f57;
}

.toggle-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* 住宿类型中，当其他选项被选中时，"车里/帐篷"的视觉提示（但保持可点击） */
.accommodation-row .toggle-btn[data-type="accommodation"][data-value="car"]:not(.active) {
    /* 保持可点击，不添加特殊样式 */
}

.toggle-btn:active {
    opacity: 0.8;
}

/* 选择框 */
.select-wrapper {
    position: relative;
    flex: 1;
}

.budget-wrapper {
    position: relative;
    min-height: 56px;
}
.budget-wrapper .budget-text-input {
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    padding: 13px 36px 13px 9px;
    border: 1px solid #000;
    border-radius: 9px;
    background: #fff;
    font-size: clamp(16px, 4.5vw, 18px);
    color: #000;
}
.budget-wrapper .budget-arrow-trigger {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}
.budget-wrapper .budget-dropdown {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #000;
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}
.budget-wrapper .budget-dropdown.open {
    display: block;
}
.budget-wrapper .budget-option {
    padding: 12px 9px;
    font-size: clamp(16px, 4.5vw, 18px);
    color: #000;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.budget-wrapper .budget-option:last-child {
    border-bottom: none;
}
.budget-wrapper .budget-option:hover {
    background: #f5f5f5;
}

.form-select {
    width: 100%;
    height: 56px;
    border: 1px solid #000;
    border-radius: 9px;
    padding: 13px 30px 13px 9px;
    font-size: clamp(16px, 4.5vw, 18px);
    color: #000;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select-wrapper .chevron-icon {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.form-select:focus {
    outline: none;
    border-color: #ff5f57;
}

/* 标签按钮组 */
.tag-group {
    display: flex;
    gap: clamp(6px, 1.5vw, 8px);
    align-items: center;
    margin-left: auto;
}

/* 在form-group-inline中的tag-group另起一行并靠左对齐 */
.form-group-inline .tag-group {
    flex-basis: 100%;
    order: 10; /* 确保在最后显示 */
    margin-left: 0;
    margin-top: clamp(6px, 1.5vh, 8px);
}

.tag-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(4px, 1vw, 6px);
    flex: 1;
    margin-left: 1px;
}

/* 偏好标签折叠样式 */
/* 偏好行：允许多行、标签顶对齐，避免裁切 */
.form-row:has(.preference-wrap) {
    align-items: flex-start;
    flex-wrap: nowrap;
}
.form-row:has(.preference-wrap) .form-label {
    padding-top: 2px;
}
.preference-wrap {
    flex: 1;
    min-width: 0;
    margin-left: 1px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}
.tag-group-wrap.preference-tags {
    /* 单列显示：每类独占一行 */
    overflow: visible;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vh, 8px);
}

/* 偏好：每类后跟精简说明，单列一行 */
.pref-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    width: 100%;
}
.preference-desc {
    font-size: clamp(11px, 2.8vw, 12px);
    color: #888;
    white-space: nowrap;
}

.toggle-more-btn {
    margin-top: clamp(6px, 1.5vh, 8px);
    padding: clamp(4px, 1vh, 6px) clamp(8px, 2vw, 12px);
    background: transparent;
    border: none;
    color: #666;
    font-size: clamp(12px, 3.5vw, 14px);
    cursor: pointer;
    text-align: right;
    align-self: flex-end;
    transition: color 0.3s ease;
}

.toggle-more-btn:hover {
    color: #ff5f57;
}

.toggle-more-btn:active {
    opacity: 0.8;
}

.tag-btn {
    padding: 2px 5px;
    border-radius: 8px;
    border: none;
    background: #eaeaea;
    font-size: clamp(14px, 4vw, 15px);
    color: #b3b3b3;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tag-btn.active {
    background: #ffd0d0;
    color: #ff5f57;
}

.tag-btn:active {
    opacity: 0.8;
}

/* 人数：未成年人/老人区块（可多次添加） */
.special-section.form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 14px;
    margin-top: 4px;
}
.special-section .form-label {
    width: 100%;
    flex-shrink: 0;
    white-space: normal;
    font-size: clamp(15px, 4vw, 17px);
}
.special-add-block {
    flex: 1;
    min-width: 0;
    padding-left: 0;
}
.special-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}
/* 未成年人行：数量 + 人 + 年龄下拉 + 删除，同一行对齐 */
.special-row.child-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 8px;
}
/* 老人行：数量 + 人 + 删除，同一行对齐（无年龄下拉） */
.special-row.elderly-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 8px;
}
.special-row.child-row .number-input-group,
.special-row.child-row .unit,
.special-row.elderly-row .number-input-group,
.special-row.elderly-row .unit {
    flex-shrink: 0;
}
.special-row .number-input.special-count {
    width: 36px;
    min-width: 36px;
}
.special-row .child-age-select {
    min-width: 0;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #000;
    border-radius: 6px;
    font-size: clamp(14px, 4vw, 16px);
    background: #fff;
    color: #333;
}
.btn-add-special {
    display: inline-block;
    padding: 8px 14px;
    border: 1px dashed #999;
    border-radius: 8px;
    background: #fff;
    font-size: clamp(14px, 4vw, 16px);
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-add-special:active {
    opacity: 0.8;
}
.btn-remove-special {
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: clamp(13px, 3.5vw, 15px);
    color: #666;
    cursor: pointer;
    justify-self: end;
}
.btn-remove-special:active {
    background: #f5f5f5;
}

/* 文本输入框 */
.form-input {
    flex: 1;
    height: 35px;
    border: 1px solid #000;
    border-radius: 0;
    padding: 0 10px;
    font-size: clamp(14px, 4vw, 16px);
    color: #000;
    background: #fff;
}

.form-input::placeholder {
    color: #888;
    font-weight: normal;
}

.form-input:focus {
    outline: none;
    border-color: #ff5f57;
}

/* 提交按钮 */
.submit-wrapper {
    padding: clamp(20px, 5vh, 30px) 0;
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    padding: clamp(10px, 2.5vh, 12px) clamp(30px, 8vw, 40px);
    background: #ff5f57;
    color: #fff;
    border: none;
    border-radius: clamp(6px, 1.5vw, 8px);
    font-size: clamp(16px, 4.5vw, 18px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:active {
    background: #ff4a42;
    transform: scale(0.98);
}

.submit-btn:hover {
    background: #ff4a42;
}

/* 响应式调整 */
@media screen and (max-width: 375px) {
    .form-label {
        font-size: 16px;
        width: 80px;
    }
    .special-section .form-label {
        width: 100%;
    }
    .special-row.child-row .child-age-select {
        min-width: 80px;
    }
    
    .form-group-inline {
        flex-wrap: wrap;
        align-items: center;
    }
    
    /* 确保数字输入组和单位始终在同一行 */
    .form-group-inline .number-input-group,
    .form-group-inline .unit {
        flex-shrink: 0;
    }
    
    .toggle-group {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media screen and (min-width: 430px) {
    .recommendation-section {
        padding: 0 6px;
    }
}