/* 
 * 灵感摆渡 - 旅行生活服务平台
 * 整合CSS文件 - 包含所有index.html页面样式
 * 创建时间: 2024
 */

/* ===== CSS变量定义 ===== */
:root {
    --eco-green: #4CAF50;
    --dark-green: #2E7D32;
    --light-green: #A5D6A7;
    --rock-gray: #757575;
    --vibrant-orange: #FF9800;
}

/* ===== 基础样式重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(to bottom, #6DD4F3 6%, #f4f4f4 30%);
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
    position: relative;
}

/* ===== 内容区域 ===== */
.content {
    padding-bottom: 90px; /* 为底部导航栏留出足够空间 */
}

/* ===== 状态栏样式 ===== */



/* ===== 搜索栏样式 ===== */
.search-bar {
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 40px;
    margin: 10px 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-bar i {
    color: #999;
    margin-right: 10px;
    font-size: 16px;
}

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

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

/* ===== 公告栏样式 ===== */
.notice-bar-container {
    background-color: #fff;
    padding: 8px 15px;
    margin: 10px 15px 0; /* Margin top to separate from banner, bottom 0 if button grid is next */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.notice-bar {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden; /* Crucial for scrolling effect */
}

.notice-icon {
    color: #FF9800; /* Orange color for announcement icon */
    margin-right: 8px;
    font-size: 16px;
}

.notice-content {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap; /* Prevent text from wrapping */
}

.notice-text {
    display: inline-block; /* Allows animation of transform */
    padding-left: 100%; /* Start off-screen to the right */
    animation: scroll-notice 15s linear infinite;
    font-size: 13px;
    color: #555;
    margin: 0;
}

@keyframes scroll-notice {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-200%); /* Adjust based on text length, ensures it scrolls completely off screen */
    }
}

/* ===== 按钮栏样式 ===== */
.button-grid {
    background-color: white;
    border-radius: 12px;
    margin: 10px 15px;
    padding: 10px 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.button-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    margin-bottom: 8px;
}

.button-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background-color: #e8f5e9; /* Will be covered by img, but good fallback */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.2);
    overflow: hidden; /* Ensure img corners are rounded if img itself is not */
}

.button-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Or 'cover', depending on desired look for non-square icons */
}

.button-icon i {
    font-size: 22px;
}

.button-name {
    font-size: 12px;
    color: #333;
    text-align: center;
}

/* ===== Banner样式 ===== */
.banner-container {
    padding: 0 15px;
    margin: 15px 0 15px 0; /* 添加上下边距 */
    position: relative;
}

.main-banner { /* Will be replaced by main-banner-slider, keep for now if other elements rely on it, or remove if not */
    width: 100%;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.main-banner img { /* Will be styled by .slide img, keep for now or remove */
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-object-fit: cover;
}

/* New Slider Banner Styles */
.main-banner-slider {
    width: 100%;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    touch-action: pan-y pinch-zoom;
    -webkit-touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
}

.slides-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s ease-out;
    -webkit-transition: -webkit-transform 0.3s ease-out;
    will-change: transform;
    -webkit-will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-object-fit: cover;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.slide.active {
    display: block;
}

/* 左右切换按钮样式 */
.slider-arrow {
    display: none;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 2;
}

.dot {
    height: 8px;
    width: 8px;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}

/* ===== 底部卡片样式 ===== */
.card-row {
    display: flex;
    padding: 0 15px;
    margin-bottom: 8px;
}

.feature-card {
    flex: 1;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 0 5px;
    height: 65px;
    display: flex;
    align-items: center;
    padding: 15px;
}

.feature-card:first-child {
    margin-left: 0;
}

.feature-card:last-child {
    margin-right: 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background-color: #e8f5e9;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.2);
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}



/* ===== 活动推荐区域 ===== */
.promotion-section {
    background-color: white;
    border-radius: 12px;
    margin: 15px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: #4CAF50;
    margin-right: 8px;
    border-radius: 2px;
}

.promotion-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0;
}

.promotion-card {
    padding: 6px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.promotion-card:hover {
    background: #e8f5e9;
    transform: translateY(-2px);
}

.activity-icon {
    font-size: 26px;
    margin-bottom: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* 为每个图标添加独特的颜色 */
.promotion-card:nth-child(1) .activity-icon {
    color: #FF6B6B;
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
}

.promotion-card:nth-child(2) .activity-icon {
    color: #4ECDC4;
    background: linear-gradient(135deg, #f0fff4, #dcffe4);
}

.promotion-card:nth-child(3) .activity-icon {
    color: #45B7D1;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.promotion-card:nth-child(4) .activity-icon {
    color: #96CEB4;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.promotion-card:nth-child(5) .activity-icon {
    color: #FF9F1C;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.promotion-card:nth-child(6) .activity-icon {
    color: #6C63FF;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

.promotion-card:nth-child(7) .activity-icon {
    color: #FF6B6B;
    background: linear-gradient(135deg, #fff5f5, #ffe3e3);
}

.promotion-card:nth-child(8) .activity-icon {
    color: #4ECDC4;
    background: linear-gradient(135deg, #f0fff4, #dcffe4);
}

.promotion-card:hover .activity-icon {
    transform: scale(1.1);
}

.activity-name {
    font-size: 12px;
    color: #333;
    margin-top: 4px;
    font-weight: 500;
}

.activity-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
    margin-top: 2px;
}

/* ===== 热门目的地样式 ===== */
.destination-cards {
    padding: 0 5px;
}

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

.destination-card {
    width: 48%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.destination-image {
    position: relative;
    height: 80px;
}

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

.destination-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* ===== 底部导航栏 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000 !important;
    box-sizing: border-box;
    overflow: hidden;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
    height: 100%;
    color: #999;
    font-size: 24px;
    transition: color 0.3s;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    min-width: 0;
    flex-shrink: 1;
}

.nav-item.active {
    color: var(--eco-green) !important;
}

.nav-item.active i,
.nav-item.active .label {
    color: var(--eco-green) !important;
}

.nav-item i {
    font-size: 22px;
    color: #999;
    transition: color 0.3s;
}

.nav-item .label {
    font-size: 12px;
    margin-top: 4px;
    color: #999;
    transition: color 0.3s;
}

/* ===== 公共标签样式 ===== */
.tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 5px;
}

.tag-promo {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--vibrant-orange);
}

.tag-hot {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.tag-new {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--eco-green);
}

/* ===== 通用导航栏 ===== */
.nav-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--eco-green);
    color: white;
    position: relative;
}

.nav-bar .back {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
}

.nav-bar .title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-right: 24px;
}

/* ===== 公告印章样式 ===== */
.notice-seal {
    position: absolute;
    bottom: -4vh;
    right: -40px;
    width: 150px;
    height: 150px;
    z-index: 2;
    opacity: 0.8;
    pointer-events: none;
    transform: rotate(15deg);
}

.notice-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== 动画效果 ===== */
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupFadeIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -60%);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%);
    }
}

@keyframes closeButtonPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.notice-popup-close {
    animation: closeButtonPop 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===== 安全区适配 - 针对刘海屏/全面屏手机 ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(60px + env(safe-area-inset-bottom));
    }
    
    .content {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* ===== 响应式布局 ===== */
@media screen and (max-width: 480px) {
    .main-banner-slider {
        height: 140px;
    }
}

@media screen and (max-width: 375px) {
    .button-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .button-name {
        font-size: 10px;
    }
    
    .promotion-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .activity-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }
    
    .activity-name {
        font-size: 11px;
    }
    
    .activity-desc {
        font-size: 9px;
    }
}

@media screen and (max-width: 320px) {
    .main-banner-slider {
        height: 130px;
    }
    
    .nav-item {
        font-size: 20px;
    }
    
    .nav-item .label {
        font-size: 10px;
    }
}

/* ===== 触摸反馈效果 ===== */
.button-item:active,
.feature-card:active,
.promotion-card:active {
    opacity: 0.8;
    transform: scale(0.98);
}

/* ===== 禁用状态样式 ===== */
.button-item[style*="cursor: not-allowed"],
.promotion-card[style*="cursor: not-allowed"] {
    opacity: 0.7;
    pointer-events: none;
}

/* ===== 链接样式重置 ===== */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* ===== 图片优化 ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* ===== 滚动条样式 ===== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== 倒计时样式 ===== */
.timer-label {
    margin-right: 6px;
    font-size: 12px;
    color: #666;
}

.timer-display {
    display: flex;
    gap: 4px;
    align-items: center;
}

.timer-item {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.timer-milliseconds {
    min-width: 24px;
    font-size: 10px;
    background: linear-gradient(135deg, #FF4444, #FF6666);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.timer-separator {
    color: #FF6B6B;
    font-weight: 600;
    font-size: 12px;
}

/* 纵向秒杀区域样式 */
.flash-sale-vertical-section {
    margin: 15px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flash-sale-vertical-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.flash-sale-vertical-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.flash-sale-vertical-title::before {
    content: "⚡";
    margin-right: 8px;
    font-size: 16px;
    color: #FF6B6B;
}

.flash-sale-vertical-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flash-sale-vertical-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flash-sale-vertical-item {
    background: white;
    border-radius: 12px;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    padding: 0;
    gap: 0;
    position: relative;
    min-height: 150px;
    border: 1px solid #f0f0f0;
}

.flash-sale-vertical-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.flash-sale-vertical-item-image {
    width: 150px;
    height: 150px;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.flash-sale-vertical-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flash-sale-vertical-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    height: 150px;
    padding: 12px 12px 12px 15px;
    overflow: visible;
}

.flash-sale-vertical-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 63px;
    flex-shrink: 0;
}

.flash-sale-vertical-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    flex-shrink: 0;
}

.flash-sale-vertical-progress-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.flash-sale-vertical-progress-bar {
    flex: 1;
    height: 24px;
    background: #ffe6e6;
    border-radius: 12px;
    overflow: hidden;
}

.flash-sale-vertical-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF4444, #FF6666);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.flash-sale-vertical-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    flex-shrink: 0;
}

.flash-sale-vertical-current-price {
    color: #FF4444;
    font-size: 18px;
    font-weight: bold;
}

.flash-sale-vertical-original-price {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
}

.flash-sale-vertical-buy-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FF4444, #FF6666);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
}

.flash-sale-vertical-buy-button:hover {
    background: linear-gradient(135deg, #FF3333, #FF5555);
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(255, 68, 68, 0.4);
}

.flash-sale-vertical-buy-button:active {
    transform: scale(0.95);
}

.flash-sale-vertical-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 查看更多按钮样式 */
.flash-sale-view-more {
    margin-top: 15px;
    text-align: center;
}

.view-more-btn {
    background: linear-gradient(135deg, #FF4444, #FF6666);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.view-more-btn:hover {
    background: linear-gradient(135deg, #FF3333, #FF5555);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.view-more-btn:active {
    transform: translateY(0);
}

.view-more-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.view-more-btn:hover i {
    transform: translateY(2px);
} 