/* ============================================ */
/*  江苏文旅推介网站 — 完整样式                    */
/*  无外部框架依赖，纯手写 CSS，兼容所有浏览器      */
/* ============================================ */

/* ----- 全局重置 & 基础 ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #F5F0E6 0%, #E8F4F8 50%, #FFF8E7 100%);
    color: #333;
    line-height: 1.6;
}

/* ----- 辅助类 ----- */
.hidden {
    display: none !important;
}

/* ============================================
   开场区域 - 背景图片轮播
   ============================================ */
.intro-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.intro-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.intro-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2.5s ease-out;
    z-index: 0;
}

.intro-bg-image.active {
    opacity: 1;
}

.intro-fog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(232, 244, 248, 0.35) 0%,
            rgba(74, 144, 226, 0.15) 30%,
            rgba(44, 95, 141, 0.2) 60%,
            rgba(20, 60, 100, 0.25) 100%
        ),
        radial-gradient(ellipse at 20% 30%,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 50%
        ),
        radial-gradient(ellipse at 80% 70%,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 40%
        );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.intro-text {
    position: relative;
    z-index: 2;
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: clamp(6rem, 25vw, 15rem);
    font-weight: normal;
    color: #FFFFFF;
    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 8px 40px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(212, 175, 55, 0.5);
    animation: fadeInScale 2s ease-out forwards;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

.intro-subtitle {
    position: relative;
    z-index: 2;
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: clamp(1.2rem, 5vw, 2.5rem);
    color: rgba(255, 255, 255, 0.95);
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(212, 175, 55, 0.3);
    animation: fadeInScale 2s ease-out 0.5s forwards;
    opacity: 0;
    letter-spacing: 0.3em;
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounceSlow 2s infinite;
    cursor: pointer;
    text-align: center;
}

.scroll-indicator span {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    display: block;
}

.scroll-indicator p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
}

/* ----- 开场动画关键帧 ----- */
@keyframes fadeInScale {
    0%   { opacity: 0; transform: scale(0.9); }
    50%  { opacity: 0.8; }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(15px); }
}

/* ============================================
   主内容区
   ============================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 0 24px;
}

/* 标题区 */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title-lg {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: #2C5F8D;
    margin-bottom: 16px;
    letter-spacing: 3px;
}

.section-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #718096;
}

.section-heading {
    font-size: clamp(1.4rem, 3vw, 1.875rem);
    font-weight: 700;
    color: #2C5F8D;
    margin-bottom: 32px;
    text-align: center;
}

/* 间距工具 */
.mb-40 { margin-bottom: 40px; }
.mb-60 { margin-bottom: 60px; }

/* ============================================
   城市展示区 - 虚化背景
   ============================================ */
.city-showcase {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s, transform 0.3s;
}

.city-showcase:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.20);
    transform: scale(1.005);
}

/* 多个城市展示区之间的间距 */
.showcase-gap {
    margin-top: 36px;
}

.city-showcase-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.55);
    transform: scale(1.1);
    transition: filter 0.5s ease;
}

.city-showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(44, 62, 80, 0.50) 0%,
        rgba(74, 144, 226, 0.25) 50%,
        rgba(44, 62, 80, 0.40) 100%
    );
}

.city-showcase-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 40px;
    max-width: 800px;
    width: 100%;
}

.city-showcase-name {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    color: #FFF8E7;
    text-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(212, 175, 55, 0.3);
    margin-bottom: 12px;
    letter-spacing: 0.15em;
    animation: fadeInScale 1.5s ease-out forwards;
}

.city-showcase-tagline {
    font-size: clamp(0.9rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.90);
    letter-spacing: 0.3em;
    margin-bottom: 28px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.city-showcase-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.city-info-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.city-info-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.city-info-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.city-info-title {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: 1.3rem;
    color: #2C5F8D;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.city-info-desc {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   AI对话窗口
   ============================================ */
.chat-wrapper {
    max-width: 896px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(90deg, #2C5F8D, #4A90E2);
    color: #FFFFFF;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-header-title {
    font-weight: 700;
    font-size: 1rem;
}

.chat-header-status {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 2px;
}

.chat-clear-btn {
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.chat-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    height: calc(100vh - 280px);
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg-left {
    display: flex;
    justify-content: flex-start;
}

.chat-msg-right {
    display: flex;
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 80%;
    border-radius: 16px;
    padding: 16px;
    word-wrap: break-word;
    line-height: 1.6;
}

.chat-bubble.bot {
    background: #E8F4F8;
    color: #333;
    border-top-left-radius: 4px;
}

.chat-bubble.user {
    background: linear-gradient(90deg, #4A90E2, #2C5F8D);
    color: #FFFFFF;
    border-top-right-radius: 4px;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid #E2E8F0;
}

.chat-input-row {
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #CBD5E0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.chat-send-btn {
    background: linear-gradient(90deg, #4A90E2, #2C5F8D);
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.chat-send-btn:hover {
    opacity: 0.9;
}

/* 打字指示器 */
.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4A90E2;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-6px); }
}

/* ============================================
   底部导航
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
    border-top: 1px solid #F7FAFC;
    z-index: 100;
}

.nav-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #718096;
    transition: all 0.3s ease;
    gap: 4px;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-item.nav-active {
    color: #4A90E2;
}

.nav-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-label {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   城市详情弹窗
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    max-width: 672px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-img-area {
    width: 100%;
    height: 192px;
    background: linear-gradient(90deg, #4A90E2, #2C5F8D);
    border-radius: 16px 16px 0 0;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    color: #333;
}

.modal-close-btn:hover {
    background: #FFFFFF;
}

.modal-body {
    padding: 24px;
}

.modal-title {
    font-family: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    font-size: 1.5rem;
    color: #2C5F8D;
    margin-bottom: 16px;
}

.modal-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-section-title {
    font-weight: 700;
    color: #4A5568;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.modal-section-text {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   响应式适配
   ============================================ */

/* 手机端 - 城市信息卡片单列 */
@media (max-width: 640px) {
    .city-showcase-cards {
        grid-template-columns: 1fr;
    }
    .city-showcase-content {
        padding: 40px 20px;
    }
    .main-container {
        padding: 32px 16px 0 16px;
    }
    .chat-input-row {
        flex-direction: column;
    }
    .chat-send-btn {
        width: 100%;
    }
    .chat-messages {
        height: calc(100vh - 320px);
        max-height: 400px;
    }
}

/* 平板端 */
@media (min-width: 641px) and (max-width: 900px) {
    .city-showcase-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .city-info-card {
        padding: 18px 12px;
    }
}

/* 手机端 - 弹窗文字 */
@media (max-width: 768px) {
    .intro-text {
        font-size: clamp(4rem, 20vw, 10rem);
        letter-spacing: 0.1em;
    }
    .intro-subtitle {
        font-size: clamp(0.9rem, 4vw, 1.5rem);
    }
    .chat-messages {
        height: calc(100vh - 300px);
    }
}
