body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', Arial, sans-serif;
    background-color: white;
    overflow: hidden; /* 禁止整个页面滚动 */
}

.header {
    color: white;
    padding: 0; /* 减少上下内边距 */
    display: flex;
    justify-content: flex-end; /* 修改为右对齐 */
    align-items: center;
    position: relative;
    z-index: 1001; /* 确保 header 在最上层 */
}

.header h1 {
    display: none;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #0076FF;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); /* 减小阴影的大小和透明度 */
    margin-right: 20%;
}

.dropdown-menu {
    border: none;
    display: none;
    position: absolute;
    top: 50px;
    right: 20%;
    background-color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    width: 280px;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.dropdown-menu.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-section {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(238, 238, 238, 0.5);
    transition: all 0.3s ease;
}

.dropdown-section:hover {
    background-color: rgba(53, 152, 255, 0.05);
}

.dropdown-section:last-of-type {
    border-bottom: none;
}

.dropdown-section h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dropdown-section p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

.dropdown-section button {
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, #0076FF 0%, #00C6FF 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 118, 255, 0.2);
}

.dropdown-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 118, 255, 0.3);
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.dropdown-item:before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: all 0.3s ease;
}


.dropdown-item:hover {
    background-color: rgba(53, 152, 255, 0.05);
    color: #0076FF;
    padding-left: 25px;
}

.dropdown-item:hover:before {
    opacity: 1;
}

#user-credits {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #0076FF;
}

#user-credits:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url('static/imgs/credit.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.chat-container {
    width: 65%;
    height: calc(100% - 85px);
    border-radius: 0;
    box-shadow: none;
    margin: 0 auto;
    margin-top: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 添加未登录状态下的样式 */
body:not(.logged-in) .chat-container {
    margin-top: 50px; /* 为未登录状态调整顶部边距 */
}

/* 修改渐变效果，使其更加自然 */
.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px; /* 稍微增加高度以获得更平滑的渐变效果 */
    background: linear-gradient(to bottom, white, rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 1;
}

#chatbox {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 180px;
    scrollbar-width: none; /* Firefox */
    /* -ms-overflow-style: none; IE and Edge */
}

#chatbox::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.message {
    display: none; /* 保持现有样式 */
    /* 移除以下内容
    float: right;
    float: left;
    display: flex;
    align-items: flex-start;
    */
}

.input-area {
    position: fixed;
    bottom: 23px;
    left: 50%;
    transform: translateX(-50%);
    width: 62%;
    height: 50px;
    padding: 15px;
    background-color: white;
    border: 1px solid #6a78f4;
    border-radius: 8px;
    margin-bottom: 5px;
    z-index: 100;
}

.credit-info {
    position: absolute;
    top: -35px;
    right: 0;
    display: flex;
    align-items: center;
    background: white;
    padding: 6px 12px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1;
}
/* 隐藏credit和upgrade按钮 */
.credit-info {
    display: none !important;
}
.credit-display {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 10px;
    border-right: 1px solid #eee;
    margin-right: 10px;
}

.credit-display img {
    width: 20px;
    height: 20px;
}

.credit-display span {
    font-size: 14px;
    color: #666;
}

.upgrade-btn {
    padding: 0 10px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #8B5CF6 0%, #EC4899 100%);
}

.upgrade-btn:hover {
    transform: translateY(-1px);
}

#user-input {
    width: calc(100% - 120px) !important;
    margin: 0 5px;
    padding: 2px; /* 减小内边距 */
    height: 40px; /* 设置固定高度 */
    border: none;
    font-size: 15px;
    resize: none;
    outline: none;
    background-color: white; /* 将背景色改为白色 */
    margin-top: 0px;  /* 添加顶部边距，避免遮挡边框 */
}

#send-btn {
    position: absolute;
    bottom: 20px;
    right: 25px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #44d1f4 0%, #333fe3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(113, 60, 236, 0.2);
}

#send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(113, 60, 236, 0.3);
    background: linear-gradient(90deg, #21c3ec 0%, #0f1de0 100%);
}

.message img, .message video {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    pointer-events: auto;
}

.close {
    pointer-events: auto;
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#modalVideo {
    max-width: 100%;
    max-height: 80vh;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    margin: 10px 0;
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
    margin-right: 10px; /* 添加右边距 */
}

.chat-message .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-message.user .icon {
    display: none;
}

.chat-message .message-content {
    max-width: 90%;
    border: none;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 15px;
    line-height: 1.7;
    background-color: white; /* 改为白色背景 */
}

.chat-message.user .message-content {
    background-color: #0076FF;
    color: white;
}

/* 修改图片和视频的大小 */
.message-content img, .message-content video {
    max-height: 200px; /* 调整为所需的最大高度 */
    width: auto;
    height: auto;
    border-radius: 30px;
    object-fit: contain;
    cursor: pointer;
}

.dropdown-header h3 {
    font-size: 18px; /* 调整标题字体大 */
}

.dropdown-header p,
.dropdown-info p,
.dropdown-item,
.dropdown-footer button {
    font-size: 16px; /* 调整内容字体大小 */
}

.logo-container {
    position: absolute;
    top: 5px;
    left: 18%;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo-container img {
    height: 32px; /* 从 40px 改为 32px */
    width: auto;
    margin-right: 10px;
}

.disclaimer {
    position: fixed;
    bottom: 0px; /* 从 0 改为 -5px，使其往下移动 */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 0px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #eee;
}

.beta-text {
    font-family: 'Great Vibes', cursive;
    font-size: 25px;
    font-weight: bold;
    color: #61779f;
    margin-top: 15px; /* 添加顶部边距使文字往下移 */
    position: relative;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.thinking-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

.thinking-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3498db; /* 改为蓝色 */
    margin: 0 2px;
    opacity: 0;
    animation: thinking 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.modal-content-wrapper {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
    pointer-events: none; /* 关键修改：让包装器不拦截点击事件 */
}

/* 移动端样式整合 */
@media (max-width: 768px) {
    /* 基础布局调整 */
    body, html {
        overflow: auto !important;
        position: relative;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
        /* touch-action: pan-y */
    }
    
    /* 头部样式 */
    .header {
        background: transparent !important; /* 移除白色背景 */
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        width: auto !important;
        height: auto !important;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000;
    }
    
    .user-avatar {
        display: flex;
        width: 35px;
        height: 35px;
        margin-right: 8px;

    }
    
    .dropdown-menu {
        top: 50px;
        right: 15px;
        width: 250px;
    }

    /* Logo相关 */
    .logo-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 3px 15px 0px;
        background-color: white;
        display: none;
        align-items: center;
        z-index: 800;
        border-bottom: 1px solid #eee;
    }
    
    .logo-container img {
        height: 15px;
        margin-top: 3px; /* 增加顶部边距使logo更明显地向下平移 */
    }
    
    
    .beta-text {
        font-size: 15px;
        margin-top: 8px;
    }

    /* 聊天容器 */
    .chat-container {
        width: 100%;
        height: auto !important;
        min-height: calc(100vh - 60px);
        margin: 0;
        padding: 0;
        position: relative;
        overflow: visible !important;
    }
    
    #chatbox {
        padding-top: 60px;
        height: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 130px;
        -webkit-overflow-scrolling: touch;
    }

    /* 输入区域 */
    .input-area {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        margin: 0 auto;
        border-radius: 8px;
        z-index: 100;
        height: 30px;
        padding: 10px;
        background-color: white;
        border: 1px solid #6a78f4;
    }
    
    #user-input {
        width: 80% !important;
        margin: none;
        padding: 0px;
        height: 20px;
        background-color: white;
        font-size: 16px !important;
        border: none;
    }
    
    #send-btn {
        bottom: 8px;
        padding: 8px 12px;
        font-size: 14px;
        min-width: 60px;
        margin-right: -10px;
    }

    /* 积分信息 */
    .credit-info {
        min-width: 70px;
        margin: 0 2px;
    }
    
    .upgrade-btn {
        padding: 3px 6px;
        font-size: 12px;
    }
    
    .credit-display {
        font-size: 11px;
    }

    /* 消息内容 */
    .chat-message .message-content {
        max-width: 80%;
        font-size: 16px;
        padding: 8px 12px;
    }

    /* 媒体内容 */
    .message-content img, 
    .message-content video,
    .video-wrapper,
    .map-container,
    .media-container {
        max-width: 200px !important;
        width: auto !important;
        height: auto !important;
    }
    
    .map-container {
        height: 120px !important;
    }

    /* 模态框 */
    .modal {
        padding-top: 0;
        background-color: #000;
        z-index: 1010; /* 增加z-index确保在刷新按钮之上 */
    }
    
    .modal-content {
        max-width: 130%; /* 增加图片宽度 */
        max-height: 100vh;
        margin: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    #modalImage {
        max-width: 130%; /* 增加图片宽度 */
        max-height: 100vh;
        width: auto;
        height: auto;
        margin: auto;
        display: block;
        object-fit: contain;
        
    }
    
    .close {
        top: 20px;
        right: 20px;
        font-size: 35px;
        color: #fff;
        z-index: 1011; /* 确保关闭按钮在最上层 */
    }

    
    .full-disclaimer {
        display: none;
    }
    
    .mobile-disclaimer {
        display: inline !important;
    }
    
    .footer-disclaimer {
        position: fixed;
        bottom: -2px !important;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 1) !important;
        text-align: center;
        padding: 0 0;
        font-size: 5px;
        color: #666;
        border-top: 1px solid #eee;
        z-index: 99 !important;
    }

    /* 导航链接 */
    .nav-links {
        margin-left: 15px;
        gap: 10px;
    }

    .nav-link {
        margin: 0 0.5rem;
        font-size: 13px;
    }

    /* 隐藏 Price 链接 */
    .nav-link[href="/price"] {
        display: none;
    }

    /* 登录链接调整 */
    .login-link {
        font-size: 14px !important;
        top: 5px !important;
        left: -75px !important;  /* 固定距离左边 10px */
        transform: none;        /* 移除 transform */
        position: fixed;
        z-index: 1001;
        padding: 6px 10px;      /* 保持小巧的内边距 */
    }

    /* 升级模态框 */
    .upgrade-modal-content {
        width: 85%;
        padding: 30px;
        margin: 30% auto;
    }

    .upgrade-message h2 {
        font-size: 24px;
    }

    .upgrade-message p {
        font-size: 16px;
    }

    .enjoy-text {
        font-size: 20px;
    }

    .got-it-btn {
        padding: 10px 25px;
        font-size: 14px;
    }

    /* 图片模态框样式 */
    #imageModal {
        cursor: pointer; /* 添加指针样式表明可点击 */
    }

    #imageModal .modal-content {
        pointer-events: auto; /* 图片不拦截点击事件，点击直接传递到模态框 */
    }


    /* 视频模态框样式 */
    #videoModal .modal-content {
        max-width: 80% !important; /* 减小视频宽度 */
        max-height: 80vh !important; /* 减小视频高度 */
    }

    #modalVideo {
        max-width: 90% !important;
        max-height: 80vh !important;
        object-fit: contain;
    }

    #videoModal .close {
        font-size: 45px;
        padding: 20px;
        top: 10px;
        right: 10px;
        color: #fff;
        text-shadow: 0 0 10px rgba(0,0,0,0.5);
    }

    /* 模态框样式 */
    .modal {
        -webkit-overflow-scrolling: touch !important;
    }

    body.modal-open {
        overflow: hidden !important;
        position: fixed !important; /* 需要这个来确保iOS也能禁止滚动 */
        width: 100% !important; /* 需要这个来防止iOS上的布局偏移 */
    }

    /* 移动端的横向滚动条也隐藏 */
    .quick-buttons {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .quick-buttons::-webkit-scrollbar {
        display: none;
    }

    /* 移动端导航栏优化 */
    .nav-links a[href="/"] {
        display: none;
    }
    
    /* 缩小 logo 图标 */
    .logo-container img {
        height: 26px;
        width: auto;
    }
    
    /* 调整导航链接样式 */
    .nav-links {
        margin-left: 8px;
        gap: 5px;
    }
    
    .nav-link {
        margin: 0 0.3rem;
        font-size: 12px;
        padding: 3px 5px;
    }
    
    /* 确保 Ehomie 徽标在移动端正确显示 */
    .partner-badge.header-partner {
        right: calc(15px + 75px); /* 微调位置 */
        top: 7px;
        transform: scale(0.8); /* 更小一点 */
    }
    
    .partner-badge img {
        height: 20px;
    }
    
    .partner-text span:first-child {
        font-size: 7px;
    }
    
    .partner-text span:last-child {
        font-size: 9px;
    }

    /* 移动端导航栏优化 - 隐藏Help链接 */
    .nav-links a[href="/#contact-info"] {
        display: none;
    }
}

/* 视频容器样式 */
.video-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
}

/* 播放按键容器样式 */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 播放图标样式 */
.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

/* 悬停效果 */
.video-wrapper:hover .play-button {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.map-container {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 10px 0;
    border-radius: 10px;
    overflow: hidden;
}

.map-container iframe {
    width: 120%;
    height: 100%;
    border: none;
}

/* 首先在CSS部分添加一个通用的样式类 */
.media-container {
    width: 100%;
    height: auto;
    width: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.media-container img {
    width: 100%;
    height: auto;
    display: block;
}

.map-container {
    width: 100%;
    height: 200px; /* 固定高度 */
    max-width: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.footer-disclaimer {
    position: fixed;
    bottom: 0px; /* 从 0 改为 -5px，使其往下移动 */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #eee;
    z-index: 120;
}

.mobile-disclaimer {
    display: none;
}

/* 修改登录链接样式 */
.login-link {
    color: white;
    font-size: 14px;
    text-decoration: none;
    position: absolute;
    top: 10px;
    right: 20%;
    padding: 8px 24px;
    background: linear-gradient(135deg, #44d1f4 0%, #3333e3 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(67, 209, 244, 0.2);
}

.login-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(51, 51, 227, 0.3);
    background: linear-gradient(135deg, #21c3ec 0%, #2424d8 100%);
}

/* 修改导航链接样式，缩小间距 */
.nav-links {
    display: flex;
    gap: 10px;  /* 从 30px 减小到 20px */
    transform: translateY(-5px) !important; /* 使用transform上移 */
    margin-left: 10px;  /* 从 50px 减小到 30px */
}

.nav-link {
    top: -5px !important;
    margin: 0 1rem;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;  /* 从 16px 改为 14px */
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0066FF;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .logo-container img {
        height: 32px; /* 从 40px 改为 32px */
    }

    .nav-links {
        margin-left: 20px;
        gap: 15px;
    }

    .nav-link {
        margin: 0 0.8rem;
        font-size: 14px;
    }
}

.upgrade-modal {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.upgrade-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
    margin: auto;
    animation: modalSlideIn 0.5s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.upgrade-message {
    text-align: center;
}

.sparkles {
    font-size: 40px;
    margin-bottom: 20px;
    animation: sparkleRotate 2s infinite linear;
}

.upgrade-message h2 {
    color: #2d3436;
    font-size: 28px;
    margin: 0 0 20px 0;
    background: linear-gradient(90deg, #0076FF, #00C6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideIn 0.5s ease-out 0.2s both;
}

.upgrade-message p {
    font-size: 18px;
    color: #636e72;
    line-height: 1.5;
    margin: 0 0 25px 0;
    animation: slideIn 0.5s ease-out 0.4s both;
}

.highlight {
    color: #0076FF;
    font-weight: bold;
    padding: 2px 8px;
    background: linear-gradient(120deg, rgba(0, 118, 255, 0.1) 0%, rgba(0, 198, 255, 0.1) 100%);
    border-radius: 4px;
}

.enjoy-text {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(90deg, #0076FF, #00C6FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
    animation: slideIn 0.5s ease-out 0.6s both;
}

.got-it-btn {
    background: linear-gradient(90deg, #0076FF, #00C6FF);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 118, 255, 0.2);
    animation: slideIn 0.5s ease-out 0.8s both;
}

.got-it-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-15deg); }
    100% { transform: rotate(0deg); }
}

@media (max-width: 768px) {
    .upgrade-modal-content {
        width: 85%;
        padding: 30px;
        margin: 30% auto;
    }

    .upgrade-message h2 {
        font-size: 24px;
    }

    .upgrade-message p {
        font-size: 16px;
    }

    .enjoy-text {
        font-size: 20px;
    }

    .got-it-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* 修改 ehomie-link 样式 */
.ehomie-link {
    background: linear-gradient(90deg, #3b89ee 0%, #ed59d2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.ehomie-link:hover {
    opacity: 0.8;
}

.wechat-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.wechat-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 300px;
    max-height: 300px;
}

.blurred-text {
    color: transparent;
    text-shadow: 0 0 8px rgba(0,0,0,0.5);
    user-select: none;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 5px;
}

/* 添加小程序登录样式 */
body.miniprogram-login {
    padding-top: 0; /* 移除顶部内边距 */
}

/* 在小程序登录时隐藏头部区域 */
body.miniprogram-login .header,
body.miniprogram-login .logo-container,
body.miniprogram-login .nav-links {
    display: none;
}

/* 在小程序登录时调整聊天容器位置 */
body.miniprogram-login .chat-container {
    margin-top: 0;
    height: 100%; /* 占满整个高度 */
}

body.miniprogram-login #chatbox {
    padding-top: 20px; /* 重置顶部内边距 */
}

/* 更新刷新按钮样式 */
.refresh-btn {
    display: none; /* 默认隐藏 */
    width: 35px;
    height: 35px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: fixed;
    top: 50px;
    right: 4%;
    z-index: 1002; /* 增加z-index确保在最上层 */
    background-color: white; /* 添加白色背景 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* 添加阴影使按钮更明显 */
}

.refresh-btn svg {
    width: 20px;
    height: 20px;
    color: #666;
}

/* 在手机端隐藏刷新按钮 */
@media (max-width: 768px) {
    .refresh-btn {
        display: none !important; /* 移动端隐藏刷新按钮 */
    }
}

/* 在小程序中显示刷新按钮 */
body.miniprogram-login .refresh-btn {
    display: block !important; /* 使用 !important 确保显示 */
    top: 0px;
    z-index: 1002; /* 确保在小程序中也是最上层 */
}

/* 添加快捷按钮组样式 */
.quick-buttons {
    position: fixed;
    bottom: 105px;
    left: 54%;
    transform: translateX(-50%);
    width: 70%; /* 从 60% 增加到 80% */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px;
    background: white;
    border-radius: 8px;
    z-index: 99;
    justify-content: left;
    box-shadow: none;
    border: none;
}

.quick-buttons button {
    padding: 5px 12px;
    border: 1px solid #eee; /* 添加按钮边框 */
    border-radius: 4px;
    font-size: 14px;
    color: #0076FF;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 118, 255, 0.1); /* 为每个按钮添加柔和的阴影 */
}

.quick-buttons button:hover {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 118, 255, 0.2); /* 悬停时加深阴影 */
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .quick-buttons {
        /* display: none; */
        width: 100%;
        bottom: 70px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 5px;
        box-shadow: none;
    }
    
    .quick-buttons button {
        font-size: 12px;
        padding: 5px 10px;
        flex-shrink: 0;
        border: 1px solid #eee;
        box-shadow: 0 2px 4px rgba(0, 118, 255, 0.1);
    }
}

/* 欢迎按钮样式 */
.welcome-start-btn {
    background: linear-gradient(45deg, #6C5CE7, #3498DB);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    margin-top: 15px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    animation: welcome-pulse 1.5s infinite;
}

.welcome-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.3);
}

.welcome-start-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(108, 92, 231, 0.2);
}

@keyframes welcome-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(108, 92, 231, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

/* 修改 partner-badge 的定位方式和位置 */
.partner-badge.header-partner {
    position: absolute;
    right: calc(20% + 110px); /* 放置在login按钮左侧，计算login按钮的位置(20%)加上login按钮的宽度和一些间距 */
    top: 8px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 在登录状态下的样式 */
body.logged-in .partner-badge.header-partner {
    position: relative;
    right: auto;
    top: auto;
    margin-right: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .partner-badge.header-partner {
        right: calc(15px + 85px); /* 适应移动端login按钮位置 */
        top: 7px;
        transform: scale(0.9); /* 稍微缩小一点 */
        gap: 8px;
    }
    
    body.logged-in .partner-badge.header-partner {
        transform: none;
        margin-right: 8px;
    }
    
    .partner-badge .referral-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}


.chat-container,
.input-area,
.quick-buttons {
    transition: left 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.chat-container.tour-modal-open {
    margin-left: 3%;
    margin-right: auto !important;
}

.chat-container.tour-modal-open .input-area {
    left: 3.5% !important;
    transform: none !important;
}
.chat-container.tour-modal-open .quick-buttons {
    left: 3% !important;
    transform: none !important;
}

/* 添加申请表格打开时的样式 */
.chat-container.apply-modal-open {
    margin-left: 3%;
    margin-right: auto !important;
}

.chat-container.apply-modal-open .input-area {
    left: 3.5% !important;
    transform: none !important;
}

.chat-container.apply-modal-open .quick-buttons {
    left: 3% !important;
    transform: none !important;
}




/* 媒体链接容器样式 */
.media-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0;
}

.media-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f8faff;
    border: 1px solid #e0e6f0;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.media-link:hover {
    background-color: #edf0f5;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.media-link-icon {
    margin-right: 8px;
    font-size: 16px;
}

.media-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-link-expand {
    margin-left: 6px;
    transition: transform 0.3s ease;
}

/* 媒体类型特定样式 - 简化为统一颜色 */
.media-link.image-link,
.media-link.video-link,
.media-link.tour-link,
.media-link.map-link {
    border-left: 1px solid #d0d0d0;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .media-link {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .media-links-container {
        gap: 6px;
    }
}

/* 图片缩略图容器样式 */
.image-thumbnail-container {
    margin: 10px 0;
    position: relative;
    max-width: 280px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.image-thumbnail-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-thumbnail {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    cursor: pointer;
    display: block;
    background-color: #f8f9fa;
}

.image-fullscreen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.image-fullscreen-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

/* 响应式样式 */
@media (max-width: 768px) {
    .image-thumbnail-container {
        max-width: 220px;
    }
    
    .image-thumbnail {
        max-height: 160px;
    }
    
    .image-fullscreen-btn {
        width: 26px;
        height: 26px;
    }
}

/* 收藏按钮样式 */
.favorites-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.favorites-btn:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.favorites-btn svg {
    width: 16px;
    height: 16px;
}

/* 收藏面板样式 */
.favorites-panel {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.favorites-panel.show {
    left: 0;
}

.favorites-header {
    padding: 20px;
    background: #f8f9fa;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.favorites-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-favorites {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-favorites:hover {
    background-color: #e9ecef;
    color: #333;
}

.favorites-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.favorites-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.favorites-list {
    padding: 0;
}

.favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.favorites-empty p {
    margin: 8px 0;
    font-size: 16px;
}

.empty-subtitle {
    font-size: 14px !important;
    color: #999 !important;
    line-height: 1.4;
}

/* 收藏房源卡片样式 */
.favorite-item {
    margin: 16px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.favorite-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.favorite-content {
    padding: 16px;
}

.favorite-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.favorite-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.favorite-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.favorite-heart-btn {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.favorite-heart-btn:hover {
    background-color: rgba(255, 71, 87, 0.1);
    transform: scale(1.1);
}

.favorite-heart-btn svg {
    transition: all 0.3s ease;
}

.favorite-heart-btn:hover svg {
    transform: scale(1.1);
}

.favorite-price {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.favorite-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.favorite-available-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
}

.favorite-details {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.favorite-detail {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.favorite-location {
    font-size: 14px;
    color: #888;
    margin: 4px 0;
}

.favorite-actions {
    display: none;
}

/* 收藏图片样式 */
.favorite-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.favorite-image-placeholder {
    width: 100%;
    height: 120px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #dee2e6;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .favorites-panel {
        width: 100vw;
        left: -100vw;
    }
    
    .favorites-btn {
        left: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .favorites-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .favorites-header {
        padding: 16px;
    }
    
    .favorites-header h3 {
        font-size: 16px;
    }
    
    .favorite-item {
        margin: 12px;
    }
    
    .favorite-image,
    .favorite-image-placeholder {
        height: 100px;
    }
    
    .favorite-content {
        padding: 12px;
    }
    
    .favorite-title {
        font-size: 14px;
    }
    
    .favorite-price {
        font-size: 16px;
    }
    
    .favorite-heart-btn {
        padding: 2px;
    }
    
    .favorite-heart-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .favorite-details {
        font-size: 12px;
    }
    
    .favorite-address {
        font-size: 12px;
    }
}

/* 取消收藏确认对话框样式 */
.remove-favorite-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1060;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.remove-favorite-modal-overlay.show {
    opacity: 1;
}

.remove-favorite-dialog {
    background-color: white;
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-30px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.remove-favorite-dialog.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.remove-favorite-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.remove-favorite-icon svg {
    filter: drop-shadow(0 2px 8px rgba(68, 209, 244, 0.3));
}

.remove-favorite-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.remove-favorite-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 32px 0;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.remove-favorite-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.remove-favorite-cancel-btn,
.remove-favorite-confirm-btn {
    flex: 1;
    max-width: 140px;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: -0.3px;
}

.remove-favorite-cancel-btn {
    background-color: #f8f9fa;
    color: #666;
    border: 2px solid #e9ecef;
}

.remove-favorite-cancel-btn:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-favorite-confirm-btn {
    background: linear-gradient(135deg, #44d1f4, #3333e3);
    color: white;
    box-shadow: 0 4px 15px rgba(68, 209, 244, 0.3);
}

.remove-favorite-confirm-btn:hover {
    background: linear-gradient(135deg, #3333e3, #2929d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 209, 244, 0.4);
}

.remove-favorite-confirm-btn:active {
    transform: translateY(0);
}

/* 当收藏面板打开时，聊天容器的样式调整 */
.chat-container.favorites-open {
    margin-left: 30%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 当收藏面板打开时，其他元素也需要平移 */
.chat-container.favorites-open ~ .header,
.header.favorites-open {
    margin-left: 40%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.favorites-open ~ .nav-links,
.nav-links.favorites-open {
    margin-left: 20%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.favorites-open ~ .input-area,
.input-area.favorites-open {
    margin-left: 12%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.favorites-open ~ .quick-buttons,
.quick-buttons.favorites-open {
    margin-left: 12%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.favorites-open ~ .footer-disclaimer,
.footer-disclaimer.favorites-open {
    margin-left: 12%;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 收藏栏打开时隐藏收藏按钮 */
.chat-container.favorites-open ~ .favorites-btn,
.favorites-btn.favorites-open {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 移动端确认对话框适配 */
@media (max-width: 768px) {
    .remove-favorite-dialog {
        padding: 24px;
        max-width: 340px;
        border-radius: 16px;
    }
    
    .remove-favorite-title {
        font-size: 20px;
    }
    
    .remove-favorite-message {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .remove-favorite-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .remove-favorite-cancel-btn,
    .remove-favorite-confirm-btn {
        max-width: none;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .chat-container.favorites-open {
        margin-left: 0;
        opacity: 0.3;
        pointer-events: none;
    }
    
    /* 移动端收藏栏展开时，其他元素不平移，保持原位 */
    .header.favorites-open,
    .nav-links.favorites-open,
    .input-area.favorites-open,
    .quick-buttons.favorites-open,
    .footer-disclaimer.favorites-open {
        margin-left: 0;
    }
}

/* 推荐按钮样式 */
.referral-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 16px;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    margin-right: 12px;
}

/* 当推荐按钮在partner-badge内时的样式 */
.partner-badge .referral-btn {
    margin-right: 0;
    padding: 6px 12px;
    font-size: 13px;
}

.referral-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.referral-dollar {
    font-size: 16px;
    font-weight: 700;
    color: #ecaf12;
}

.referral-text {
    font-size: 13px;
    font-weight: 700;
    color: #ecaf12;
}



/* 推荐模态框样式 */
.referral-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.referral-modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 0;
    border-radius: 16px;
    width: 85%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.referral-close {
    color: #999;
    float: right;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: 12px;
    right: 16px;
    cursor: pointer;
    z-index: 10001;
}

.referral-close:hover,
.referral-close:focus {
    color: #333;
    text-decoration: none;
}

.referral-header {
    text-align: center;
    padding: 24px 20px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid #e2e8f0;
}

.referral-icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #0076FF;
}

.referral-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.referral-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

.referral-body {
    padding: 20px;
}

.referral-code-section,
.referral-input-section {
    margin-bottom: 18px;
}

.referral-code-section label,
.referral-input-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
}

.referral-code-display,
.referral-input-group {
    display: flex;
    gap: 8px;
}

.referral-code-display input,
.referral-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f9fafb;
    transition: border-color 0.2s ease;
}

.referral-code-display input:focus,
.referral-input-group input:focus {
    outline: none;
    border-color: #0076FF;
    box-shadow: 0 0 0 3px rgba(0, 118, 255, 0.1);
}

.referral-code-display button,
.referral-input-group button {
    padding: 10px 16px;
    background: #0076FF;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.referral-code-display button:hover,
.referral-input-group button:hover {
    background: #0056cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 118, 255, 0.2);
}



/* 移动端适配 */
@media (max-width: 768px) {
    .referral-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .referral-text {
        font-size: 11px;
    }
    
    .referral-arrow {
        width: 14px;
        height: 14px;
    }
    
    .referral-modal-content {
        margin: 15% auto;
        width: 92%;
        max-width: 320px;
    }
    
    .referral-header {
        padding: 20px 16px 16px;
    }
    
    .referral-header h2 {
        font-size: 18px;
    }
    
    .referral-header p {
        font-size: 13px;
    }
    
    .referral-body {
        padding: 16px;
    }
    
    .referral-code-display,
    .referral-input-group {
        flex-direction: column;
    }
    
    .referral-code-display button,
    .referral-input-group button {
        width: 100%;
    }
}
