/* ===================== 全局基础样式（通用重置与基础规则） ===================== */
/* 基础body样式（按页面场景通过类名覆盖） */
body {
    min-height: 100vh;
    background-color: #f8f9fa; /* 默认背景色 */
    box-sizing: border-box;
}

/* 不同页面的body定制样式 */
body.about-page {
    background-color: #fff8f0;
}
body.login-page {
    display: flex;
    flex-direction: column;
}

/* 全局通用工具类 */
.cursor-pointer {
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

.page-link {
    border-radius: 4px;
    margin: 0 2px;
    color: #007bff;
    border: 1px solid #dee2e6;
}
.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}
.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.filter-section .form-select,
.filter-section .form-control,
.filter-section .btn {
    height: calc(2.2rem + 2px);
    font-size: 0.85rem;
    border-radius: 1.5rem;
    padding: 0.375rem 0.75rem;
}

.single-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}


@media (max-width: 575.98px) {
    .filter-section { padding: 20px 0.25rem; }
    .filter-section .form-select,
    .filter-section .btn { font-size: 0.75rem; }
    .filter-section .btn i { font-size: 0.7rem; margin-right: 2px; }
}

/* 全局样式中添加 */
.custom-search-wrapper {
    display: flex;
    align-items: center;
}

.custom-search-input {
    border: none;
    border-radius: 24px 0 0 24px;
    padding: 0.5rem 1.25rem;
    height: 48px;
    font-size: 16px;
    color: #333;
}

.custom-search-btn {
    background-color: #000;
    border-radius: 0 24px 24px 0;
    padding: 0.5rem 1.25rem;
    height: 48px;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.custom-search-btn img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}


/* 排序按钮样式 - 圆形设计 */
.sort-btn {
    transition: background-color 0.3s ease; /* 平滑过渡效果 */
    width: 40px;          /* 固定宽度 */
    height: 40px;         /* 固定高度（和宽度一致，形成正圆） */
    border-radius: 50% !important; /* 强制圆形，覆盖bootstrap的rounded-pill */
    display: flex;        /* flex布局居中 */
    align-items: center;
    justify-content: center;
    padding: 0 !important; /* 移除默认内边距 */
    border: none !important; /* 移除边框（可选） */
}
/* 最新排序状态（默认）- 深色背景 */
.sort-btn.newest {
    background-color: #212529 !important; /* 灰色背景 */
    color: white; /* 确保SVG图标显示为白色 */
}
/* 最早排序状态 - 灰色背景 */
.sort-btn.oldest {
    background-color: white !important; /* 黑色背景（和搜索按钮一致） */
    color: #212529; /* 确保SVG图标显示为白色 */

}
/* 确保SVG图标在圆形按钮中居中显示 */
.sort-btn .detail-info-icon {
    filter: invert(1); /* 将SVG图标反色为白色，适配深色背景 */
    width: 20px;       /* 图标大小 */
    height: 20px;
    margin: 0;         /* 重置外边距 */
}

/* ===================== Home页面专属样式 ===================== */
/* 1. Daymate模块 */
.daymate-container {
    background-color: #fef3e9;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    z-index: 1; /* 修改：从2改为1，降低层级 */
    width: 100%;
    max-width: 100vw;
    margin-bottom: 20px; /* 新增：增加底部间距，远离下方内容 */
}

.daymate-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #222;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.daymate-btn-group-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
    overflow: hidden; /* 新增：隐藏内部溢出元素 */
}

.daymate-btn-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

/* 按钮基础样式 */
.daymate-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.daymate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 按钮颜色变体 */
.daymate-btn-red, .daymate-btn-red-solid {
    background-color: #e83f3f;
}
.daymate-btn-yellow {
    background-color: #ffc837;
}
.daymate-btn-blue {
    background-color: #167ce8;
}
.daymate-btn-orange {
    background-color: #ff8a3c;
}
.daymate-btn-pink {
    background-color: #ff7a9c;
}
.daymate-btn-outline {
    background-color: transparent;
    color: #222;
    border: 2px solid #222;
}
.daymate-btn-green {
    background-color: #36c985;
}

/* 右侧指针（PC端样式） */
.daymate-pointer {
    position: absolute;
    top: 40px;
    right: 10px; /* 修改：从-40px改为10px，避免超出视口 */
    width: 40px;
    height: 40px;
    color: #e83f3f;
    animation: daymate-pointer-bounce 1.5s infinite;
    z-index: 10;
}

@keyframes daymate-pointer-bounce {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(5px, -5px) rotate(10deg);
    }
}

/* 2. Pick Up模块 */
.pickup-section {
    background-color: #FFD151;
    position: relative;
    padding: 60px 10px 40px; /* 修改：top padding从40px改为60px，给标题留出空间 */
    overflow: hidden;
    z-index: 2; /* 修改：从2改为3，提升层级高于daymate-container */
    width: 100%;
    max-width: 100vw;
}


.er-title {
    font-family: 'Arial Black', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #222;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
    position: relative; /* 新增：建立独立层级 */
    z-index: 4; /* 新增：确保标题层级最高 */
}


/* 3. 卡片模块（顶部+底部） */
.top-card-wrapper {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    z-index: 1;
    position: relative;
    width: 100%;
    flex-wrap: wrap; /* 修改：从nowrap改为wrap，适配移动端 */
    max-width: 100%; /* 新增：限制最大宽度 */
}

.top-img {
    flex: 6;
    height: 300px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    min-width: 0;
}
.top-text-card {
    flex: 4;
    background: #FFF;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

/* 底部卡片容器 */
.bottom-cards-wrapper {
    display: flex;
    gap: 15px; /* 增大间距，提升美观度 */
    margin-bottom: 30px;
    z-index: 1;
    position: relative;
    width: 100%;
    flex-wrap: wrap; /* 强制换行 */
    box-sizing: border-box;
    padding: 0 10px; /* 增加左右内边距 */
    max-width: 100%;
    justify-content: center; /* 卡片居中显示 */
}

/* 底部卡片基础样式 - 核心优化 */
.bottom-card {
    /* 每行固定2个卡片，计算宽度（总宽度/2 - 间距/2） */
    width: calc(50% - 7.5px);
    flex: none; /* 取消flex:1，避免宽度自适应 */
    height: 320px; /* 统一PC端高度，更协调 */
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 16px;
    /* 新增：卡片阴影，提升层次感 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


/* 底部图片 - 微调 */
.bottom-img {
    background-color: #fff;
    border-radius: 16px;
    background-image:
            linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
            linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
}


/* 底部文本卡片 - 微调 */
.bottom-text-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
    z-index: 2;
    height: 100px; /* 降低高度，更适配2列布局 */
    background: #fff9f0;
    margin: 0;
    border: none;
    outline: none;
}

/* 底部文本内容 */
.bottom-text-card .text-content {
    font-size: 20px;
    line-height: 1.5;
    color: #222;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-text-card .small {
    margin-bottom: 3px !important;
    line-height: 1.2;
    font-size: 14px;
}

/* 4. 箭头按钮 */
.arrow-btn {
    font-weight: 900;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    border: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.arrow-btn:hover {
    background-color: rgba(255,255,255,1);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.arrow-btn img {
    width: 18px;
    height: 18px;
    color: inherit;
    object-fit: contain;
    display: block;
}

/* 4. 箭头按钮 */
.arrow-btn-top {
    font-weight: 900;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    right: 10px;
    bottom: 0px;
    z-index: 3;
    border: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.arrow-btn-top:hover {
    background-color: rgba(255,255,255,1);
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.arrow-btn-top img {
    width: 18px;
    height: 18px;
    color: inherit;
    object-fit: contain;
    display: block;
}

/* 清除整个卡片链接的默认样式 */
.top-card-link {
    color: #000;
    text-decoration: none !important;
    color: inherit !important;
    display: block; /* 让a标签撑满卡片 */
}

/* 清除内部文字的默认链接样式 */
.top-card-link p,
.top-card-link .arrow-btn-top {
    color: #000;
    text-decoration: none !important;
    color: inherit !important;
}
/* 5. MORE按钮 */
.more-btn {
    background: #000;
    color: #FFF;
    padding: 10px 40px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    z-index: 1;
    position: relative;
}

/* 6. 内容卡片 */
.content-card {
    border: 1px solid #eee;
    padding: 10px;
    height: 100%;
}
.content-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: #f5f5f5; /* 占位背景 */
}
.content-card-text {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.4;
}

/* 复制按钮样式，可根据需要调整 */
/*.copy-url-btn {*/
/*    margin: 20px 0;*/
/*    padding: 8px 20px;*/
/*    background-color: #ffffff;*/
/*    color: #131313;*/
/*    border: none;*/
/*    border-radius: 50px;*/
/*    cursor: pointer;*/
/*    transition: background-color 0.3s;*/
/*}*/
/*.copy-url-btn:hover {*/
/*    background-color: #0b5ed7;*/
/*}*/
/*.copy-url-btn:active {*/
/*    background-color: #0a58ca;*/
/*}*/
/* 提示框样式 */
.copy-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}
.copy-toast.show {
    opacity: 1;
}

/* ===================== About页面专属样式 ===================== */
.about-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 15px;
}

.icon-box {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===================== UserCenter页面专属样式 ===================== */
.profile-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.collect-card {
    transition: transform 0.3s;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}
.collect-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.collect-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ad-banner {
    background-color: #e3f2fd;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

/* ===================== Login页面专属样式 ===================== */

/* 选项卡样式 */
.active-tab {
    color: #dc3545;
    font-weight: 600;
    border-bottom: 2px solid #dc3545;
}
.cursor-pointer:hover {
    color: #dc3545;
}

/* 登录卡片 */
.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
}

/* 登录按钮 */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    border: none;
    transition: all 0.2s ease;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
.btn-secondary {
    transition: all 0.2s ease;
}
.btn-secondary:hover:not(:disabled) {
    background-color: #5c636a;
    border-color: #565e64;
}

/* 输入框焦点 */
.form-control:focus {
    border-color: #ffca28;
    box-shadow: 0 0 0 0.2rem rgba(255, 202, 40, 0.25);
}

/* 提示信息 */
.alert-info {
    border-radius: 8px;
    border: none;
    background-color: #e8f4f8;
    color: #2c5282;
}

.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    display: none;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
.copy-toast.show {
    display: block;
    animation: fadeInOut 3s ease;
}
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
/* 复制页面URL按钮样式（移动端适配） */
/*.copy-url-btn {*/
/*    bottom: 20px;*/
/*    right: 20px;*/
/*    width: 50px;*/
/*    height: 50px;*/
/*    border-radius: 50%;*/
/*    border: none;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    z-index: 9998;*/
/*    !* 移动端点击优化 *!*/
/*    touch-action: manipulation;*/
/*    -webkit-tap-highlight-color: transparent;*/
/*    cursor: pointer;*/
/*}*/
/*.copy-url-btn img {*/
/*    width: 24px;*/
/*    height: 24px;*/
/*}*/

/* 收藏按钮样式增强 */
.collect-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.collect-btn.active {
    color: #E53935;
}
/* 复制地址按钮样式优化 */
.copy-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ===================== 全局响应式适配（按屏幕断点统一管理） ===================== */
/* 平板及移动端 (<=767.98px) */
@media (max-width: 767.98px) {
    /* Home页面移动端适配 */
    .daymate-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .daymate-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .daymate-pointer {
        top: 10px; /* 移动端调整指针位置 */
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .daymate-btn-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .er-title {
        font-size: 28px;
        margin-bottom: 30px;
        transform: none; /* 修改：从translateY(-40px)改为none */
        margin-top: 10px; /* 新增：增加顶部外边距 */

    }

    /* Pick Up模块移动端内边距优化 */
    .pickup-section {
        padding: 50px 10px 30px; /* 移动端top padding改为50px */
    }


    .top-img {
        aspect-ratio: 35/17;
        height: 150px;
        border-radius:15px;
        width: 200px
    }
    .top-text-card p {
        display: -webkit-box; /* 启用webkit的盒模型 */
        -webkit-line-clamp: 4; /* 限制显示4行 */
        -webkit-box-orient: vertical; /* 设置盒模型为垂直方向 */
        text-overflow: ellipsis; /* 显示省略号 */
        font-size: 20px;
        margin-bottom: 0;
        overflow: hidden;
    }

    .bottom-cards-wrapper {
        gap: 10px; /* 移动端减小间距 */
        padding: 0 8px;
    }


    .bottom-card {
        width: calc(50% - 5px); /* 对应gap:10px，计算宽度 */
        height: 180px; /* 移动端降低高度 */
        margin-bottom: 0; /* 取消底部margin，由gap控制间距 */
    }

    /* 移动端图片固定100px高度，居顶显示 */
    .bottom-img {
        height: 100%; /* 恢复100%高度，保证图片填充卡片 */
        border-radius: 16px !important;
        top: 0;
        bottom: 0;
    }

    /* 移动端文本卡片：紧贴100px图片的底部 */
    .bottom-text-card {
        height: 90px;
        padding: 10px;
        border-radius: 20px 20px 0 0;
        background: #fff9f0 !important;
        /* 恢复bottom定位，取消top定位 */
        top: auto !important;
        bottom: 0 !important;
        transform: translateY(0);
    }

    .bottom-text-card .text-content {
        font-size: 15px;
        white-space: normal;
        line-height: 1.3;
        max-height: 70px;
        display: -webkit-box;
        -webkit-line-clamp: 3; /* 限制2行，避免文字溢出 */
        -webkit-box-orient: vertical;
    }

    .bottom-text-card .small {
        font-size: 12px;
        margin-bottom: 2px !important;
    }
    .arrow-btn-top
    {
        font-size: 13px;
    }
    .arrow-btn {
        font-size: 13px;
        width: 20px;
        height: 20px;
        right: 8px;
        bottom: 8px;
    }
    .more-btn {
        padding: 8px 80px;
        font-size: 16px;
    }

    /* About页面移动端 */
    .about-img {
        max-width: 90%;
        margin: 0 auto 10px;
    }
    .right-img-custom, .third-img-custom {
        position: static;
        margin: 15px 0;
    }

    /* Login页面移动端 */
    .login-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .card-body {
        padding: 2rem 1.5rem;
    }
}