/* 英雄轮播图样式 */
.hero-carousel {
    height: 600px;
    min-height: 600px;
    width: 100%;
    position: relative;
}

/* 确保Layui轮播组件占满整个容器 */
.hero-carousel .layui-carousel {
    width: 100% !important;
    height: 100% !important;
    z-index: 10;
    position: relative;
}

/* 轮播项容器 */
.carousel-item-container {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    overflow: hidden;
    display: block;
    cursor: pointer;
    z-index: 10;;
}

/* 轮播图片样式 */
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 轮播覆盖层 */
.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: rgba(0, 0, 0, 0.3);*/
    z-index: 1;
}

/* 轮播内容 */
.carousel-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 2;
    color: white;
    max-width: 500px;
}

.carousel-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.carousel-desc {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.carousel-btn {
    background: white;
    color: #00B42A;
    font-weight: bold;
    padding: 12px 32px;
    border-radius: 6px;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 修复Layui轮播样式 */
.layui-carousel > [carousel-item] > * {
    width: 100% !important;
    height: 100% !important;
}

.layui-carousel > [carousel-item] {
    height: 100% !important;
}

/* 轮播指示器样式 */
.layui-carousel-ind {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.layui-carousel-ind ul {
    background: transparent;
}

.layui-carousel-ind li {
    background: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
}

.layui-carousel-ind li:hover {
    background: rgba(255, 255, 255, 0.8);
}

.layui-carousel-ind li.layui-this {
    background: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-carousel {
        height: 400px;
        min-height: 400px;
    }

    .carousel-content {
        left: 5%;
        right: 5%;
        text-align: center;
    }

    .carousel-title {
        font-size: 2rem;
    }

    .carousel-desc {
        font-size: 1rem;
    }
}

/* 美化退出按钮样式 - 下拉菜单版本 */
.logout-btn {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
    width: 100% !important;
    text-align: center !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.logout-btn:hover {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.logout-btn:active {
    background-color: #fee2e2 !important;
}

/* 下拉菜单容器样式 */
.mobile-dropdown-container {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* 美化手机号显示样式 - 透明背景 */
.mobile-text {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    padding: 6px 12px !important;
    border-radius: 9999px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: visible !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    backdrop-filter: blur(6px) !important;
}

.mobile-text .mobile-number {
    max-width: 140px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.mobile-text .mobile-caret {
    width: 0 !important;
    height: 0 !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 6px solid rgba(255, 255, 255, 0.92) !important;
    opacity: 0.9 !important;
    transition: transform 0.2s ease !important;
    display: inline-block !important;
}

.mobile-dropdown-container:hover .mobile-text .mobile-caret {
    transform: rotate(180deg) !important;
}

/* 下拉菜单样式 */
.mobile-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(6px) !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
    padding: 8px !important;
    min-width: 160px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
}

/* 下拉菜单显示动画 */
.mobile-dropdown-container:hover .mobile-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* 下拉菜单箭头 */
.mobile-dropdown-menu::before {
    content: '' !important;
    position: absolute !important;
    top: -6px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(45deg) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 6px solid white !important;
    border-top: 6px solid white !important;
}

.logout-btn {
    line-height: 1.2 !important;
}

.logout-btn i {
    width: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 16px !important;
}

.mobile-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    display: inline-block !important;
}

.logout-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    display: inline-block !important;
}

/* 占位元素样式 - 确保占据相同空间 */
#user-info-placeholder {
    visibility: visible !important;
    pointer-events: none !important;
}

#user-info-placeholder .mobile-text,
#user-info-placeholder .logout-btn {
    opacity: 0 !important;
    visibility: visible !important;
    pointer-events: none !important;
}

/* 多行省略号样式 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 从右往左滚动动画 - 真正的无限循环 */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 无限循环滚动容器 */
.seamless-scroll-container {
    position: relative;
    overflow: hidden;
}

.seamless-scroll-content {
    display: flex;
    width: max-content;
    animation: scroll-left 30s linear infinite;
    animation-delay: 0s;
}

/* 复制内容实现真正的无缝循环 */
.seamless-scroll-content::after {
    content: '';
    display: none;
}

.seamless-scroll-content:hover {
    animation-play-state: paused;
}

/* 防止动画跳动 - 使用更平滑的过渡 */
.seamless-scroll-content {
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* 鼠标悬停时暂停动画 */
.animate-scroll-left:hover {
    animation-play-state: paused;
}

/* 兼容性写法 */
.hover\:pause-animation:hover {
    animation-play-state: paused !important;
}

.mobile-text:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18) !important;
    transform: translateY(-1px) !important;
}

.mobile-dropdown-container:hover .mobile-text .mobile-caret {
    transform: rotate(180deg) !important;
}

.nav-link {
    position: relative;
    padding: 6px 2px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* 美化Toast通知样式 */
.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    max-width: 400px !important;
}

.toast {
    background: white !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-left: 4px solid !important;
    animation: toastSlideIn 0.3s ease-out !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 300px !important;
}

.toast.success {
    border-left-color: #10b981 !important;
}

.toast.error {
    border-left-color: #ef4444 !important;
}

.toast.warning {
    border-left-color: #f59e0b !important;
}

.toast.info {
    border-left-color: #3b82f6 !important;
}

.toast-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: bold !important;
    color: white !important;
}

.toast.success .toast-icon {
    background: #10b981 !important;
}

.toast.error .toast-icon {
    background: #ef4444 !important;
}

.toast.warning .toast-icon {
    background: #f59e0b !important;
}

.toast.info .toast-icon {
    background: #3b82f6 !important;
}

.toast-content {
    flex: 1 !important;
}

.toast-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 4px !important;
    color: #1f2937 !important;
}

.toast-message {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.4 !important;
}

.toast-close {
    background: none !important;
    border: none !important;
    color: #9ca3af !important;
    cursor: pointer !important;
    padding: 4px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
}

.toast-close:hover {
    color: #374151 !important;
    background: #f3f4f6 !important;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease-in forwards !important;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 协议浮层样式 */
.protocol-modal {
    padding: 24px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.mobile-input-error {
    border-color: #f56c6c !important;
    box-shadow: 0 0 0 2px rgba(245, 108, 108, 0.12);
    background: #fff5f5;
}

.mobile-error-tip {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #f56c6c;
}

.protocol-modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.protocol-modal-content {
    width: min(920px, calc(100vw - 48px));
    height: min(86vh, 920px);
    background: linear-gradient(180deg, #ffffff 0%, #fcfefc 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.protocol-modal:not(.hidden) .protocol-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.protocol-modal-body {
    height: 100%;
    padding: 32px 36px;
    overflow-y: auto;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.85;
    color: #334155;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
}

.protocol-modal-close {
    color: #475569;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.protocol-modal-close:hover {
    color: #0f172a;
    background: #ffffff;
}

.protocol-text {
    max-width: 100%;
}

.protocol-text > h2:first-child {
    margin-top: 0;
}

.protocol-text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.protocol-text a {
    color: #00B42A;
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-all;
}

.protocol-text table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    display: block;
    overflow-x: auto;
}

.protocol-text th,
.protocol-text td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
}

.protocol-modal-body h1,
.protocol-modal-body h2,
.protocol-modal-body h3,
.protocol-modal-body h4,
.protocol-modal-body h5,
.protocol-modal-body h6 {
    margin-top: 1.6rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #0f172a;
}

.protocol-modal-body h1 {
    font-size: 1.75rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}

.protocol-modal-body h2 {
    font-size: 1.4rem;
}

.protocol-modal-body h3 {
    font-size: 1.18rem;
}

.protocol-modal-body p {
    margin-bottom: 1rem;
    color: #475569;
    word-break: break-word;
}

.protocol-modal-body ul,
.protocol-modal-body ol {
    margin-bottom: 1rem;
    padding-left: 1.6rem;
    color: #475569;
}

.protocol-modal-body li {
    margin-bottom: 0.5rem;
}

.protocol-modal-body strong {
    font-weight: 600;
    color: #0f172a;
}

.protocol-modal-body em {
    font-style: italic;
}

.protocol-modal-body blockquote {
    border-left: 4px solid #00B42A;
    margin-left: 0;
    margin-bottom: 1rem;
    padding: 1rem 1rem 1rem 1.1rem;
    background: rgba(240, 253, 244, 0.85);
    border-radius: 14px;
    color: #166534;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .protocol-modal {
        padding: 12px;
    }

    .protocol-modal-content {
        width: calc(100vw - 24px);
        height: calc(100vh - 24px);
        border-radius: 20px;
    }
    
    .protocol-modal-body {
        padding: 22px 18px;
        font-size: 14px;
    }
}

/* Flow页面图片容器样式优化 */
.bg-gray-50.rounded-lg.p-3.mb-4.overflow-hidden {
    height: 300px; /* 设置固定高度确保图片容器有足够空间 */
    position: relative;
}

.bg-gray-50.rounded-lg.p-3.mb-4.overflow-hidden img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 导航栏链接样式 */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 15px;
}

/* 鼠标悬停效果 */
.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 选中状态样式 */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 选中状态的下划线指示器 */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background-color: white;
    border-radius: 1px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-link {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .nav-link.active::after {
        bottom: -6px;
        width: 50%;
    }
}
