/* ===== 首页红色主题样式 ===== */
.home-page {
    background: #F6F7F9;
}

/* ===== 顶部红色区域 - 匹配App.tsx SVG设计 ===== */
.home-header-section {
    position: relative;
    padding: 0;
    /* 移除 overflow: hidden，避免裁剪下拉框 */
}

.home-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    z-index: 0;
    pointer-events: none;
}

.home-header-bg svg {
    width: 100%;
    height: 100%;
}

/* ===== iOS风格状态栏 ===== */
.ios-status-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 4px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #EB2620 0%, #D81712 100%);
}

.ios-status-bar .time {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

.ios-status-bar .status-icons {
    display: flex;
    gap: 5px;
    align-items: center;
}

.ios-status-bar .cellular-bars {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 12px;
}

.ios-status-bar .cellular-bars .bar {
    width: 3px;
    background: #FFFFFF;
    border-radius: 1px;
}

.ios-status-bar .cellular-bars .bar:nth-child(1) { height: 5px; }
.ios-status-bar .cellular-bars .bar:nth-child(2) { height: 7px; }
.ios-status-bar .cellular-bars .bar:nth-child(3) { height: 9px; }
.ios-status-bar .cellular-bars .bar:nth-child(4) { height: 11px; }

.ios-status-bar .wifi-icon {
    width: 15px;
    height: 11px;
}

.ios-status-bar .battery-icon {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.ios-status-bar .battery-body {
    width: 24px;
    height: 11px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 3px;
    padding: 1px;
}

.ios-status-bar .battery-level {
    background: #FFFFFF;
    width: 90%;
    height: 100%;
    border-radius: 1px;
}

.ios-status-bar .battery-cap {
    width: 1.5px;
    height: 4px;
    background: rgba(255,255,255,0.6);
    border-radius: 0 1px 1px 0;
    margin-left: 1px;
}

/* ===== 顶部操作栏 ===== */
.header-top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 16px;
}

.location-text {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.location-text i {
    font-size: 10px;
    margin-left: 4px;
}

.weather-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 2px;
    position: relative;
}

.weather-icon i:not(.weather-sun) {
    font-size: 18px;
    color: #FFFFFF;
}

.weather-icon-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-cloud {
    position: absolute;
    font-size: 16px;
    color: #FFFFFF;
    z-index: 2;
    left: 0;
    top: 6px;
}

.weather-sun {
    position: absolute;
    font-size: 20px;
    color: #FFD700;
    z-index: 1;
    top: -8px;
    right: -8px;
}

.weather-icon-overlay {
    position: relative;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.weather-sunny {
    position: absolute;
    font-size: 14px;
    color: #FFD700;
    z-index: 1;
    top: -2px;
    right: -2px;
}

.weather-cloudy {
    position: absolute;
    font-size: 16px;
    color: #FFFFFF;
    z-index: 2;
}

.weather-temp {
    font-size: 11px;
    color: #FFFFFF;
    margin-top: 1px;
    font-weight: 500;
}

.search-wrapper {
    flex: 1;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border-radius: 50px;
    padding: 0 14px;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.search-box i {
    color: #999999;
    font-size: 14px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333333;
}

.search-input::placeholder {
    color: #999999;
}

.header-icons {
    display: flex;
    gap: 12px;
    color: #FFFFFF;
    font-size: 20px;
    flex-shrink: 0;
}

.header-icons i,
.header-icons svg {
    cursor: pointer;
    width: 24px;
    height: 24px;
}

/* ===== Banner轮播图 - 匹配App.tsx设计 ===== */
.banner-carousel {
    position: relative;
    z-index: 10;
    margin: 4px 16px 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    background: #E8E8E8;
    width: calc(100% - 32px);
    max-width: 343px;
    height: 175px;
}

.banner-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 175px;
}

.banner-carousel-slide {
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    position: relative;
    height: 175px;
}

.banner-carousel-slide img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    display: block;
}

.banner-overlay {
    display: none;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 16px;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 0.15em;
    background: linear-gradient(to bottom, #FFF0C2, #D4A95D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: "STKaiti", "KaiTi", "华文楷体", "楷体", serif;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.6)) drop-shadow(0px 0px 2px rgba(255,255,255,0.2));
}

.banner-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot.active {
    background: #FFE5B4;
}

/* ===== 功能入口 ===== */
.features-section {
    background: linear-gradient(180deg, #FFF0F0 0%, #FFFFFF 100%);
    margin: -16px 12px 12px;
    border-radius: 16px;
    padding: 12px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.features-row {
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
}

.features-row + .features-row {
    border-top: 1px solid #F5F5F5;
    margin-top: 4px;
    padding-top: 12px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    min-width: 56px;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.feature-item span:last-child {
    font-size: 11px;
    color: #333333;
    text-align: center;
    font-weight: 500;
}

/* ===== 推荐区域 ===== */
.recommend-section {
    background: #FFFFFF;
    margin: 0 12px;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

.recommend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.recommend-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
}

.more-btn {
    font-size: 14px;
    color: #999999;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.recommend-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommend-scroll::-webkit-scrollbar {
    display: none;
}

.recommend-list {
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: max-content;
}

.recommend-item {
    flex-shrink: 0;
    width: 170px;
    opacity: 0;
    transform: translateX(-20px);
    animation: recommendSlideIn 0.4s ease forwards;
    cursor: pointer;
    transition: transform 0.2s;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.recommend-item:active {
    transform: scale(0.96);
}

@keyframes recommendSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.recommend-img-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #f8f8f8;
}

.recommend-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f0f0f0;
}

.recommend-img.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: imgLoading 1.5s infinite;
}

@keyframes imgLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.recommend-type-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 4px 10px;
    background: #FF6B00;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.recommend-info {
    padding: 0 2px;
}

.recommend-name {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.4;
}

.recommend-distance {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #999999;
}

.recommend-distance i {
    font-size: 10px;
    color: #CCCCCC;
}

.recommend-item.loading,
.recommend-item.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    width: 100% !important;
    max-width: none !important;
    height: 280px;
    min-width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.loading-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E8384F;
    font-size: 32px;
    margin-bottom: 16px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.loading-text {
    font-size: 14px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.empty-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-align: center;
}

.empty-hint {
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* ===== 定位下拉选择框 ===== */
.location-dropdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-dropdown-overlay.show {
    display: block;
    opacity: 1;
}

.location-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-height: 60%;
    background: #FFFFFF;
    z-index: 10000;
    display: none;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

.location-dropdown.show {
    display: block;
    transform: translateY(0);
}

.location-dropdown .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #F0F0F0;
}

.location-dropdown .dropdown-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-dropdown .nav-back {
    font-size: 18px;
    color: #333333;
    cursor: pointer;
}

.location-dropdown .dropdown-nav #dropdownTitle {
    font-size: 17px;
    font-weight: 600;
    color: #333333;
}

.location-dropdown .dropdown-close {
    font-size: 20px;
    color: #999999;
    cursor: pointer;
    padding: 8px;
}

.location-dropdown .dropdown-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px;
    padding: 10px 14px;
    background: #F5F5F5;
    border-radius: 20px;
}

.location-dropdown .dropdown-search i {
    font-size: 14px;
    color: #999999;
}

.location-dropdown .dropdown-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333333;
    outline: none;
}

.location-dropdown .dropdown-search input::placeholder {
    color: #CCCCCC;
}

.location-dropdown .search-clear {
    font-size: 14px;
    color: #999999;
    cursor: pointer;
    padding: 4px;
}

.location-dropdown .dropdown-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 12px;
    font-size: 12px;
    color: #999999;
}

.location-dropdown .dropdown-list {
    padding: 0 16px;
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.location-dropdown .dropdown-list::-webkit-scrollbar {
    display: none;
}

.location-dropdown .dropdown-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.location-dropdown .location-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.location-dropdown .location-item:hover,
.location-dropdown .location-item:active {
    background: #F5F5F5;
}

.location-dropdown .location-item i {
    font-size: 16px;
    color: #E8384F;
}

.location-dropdown .location-item span {
    font-size: 15px;
    color: #333333;
}

.location-dropdown .location-item.current-location i {
    color: #E8384F;
}

.location-dropdown .location-item.selected i {
    color: #E8384F;
}

.location-dropdown .location-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    color: #E8384F;
}
