@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .timeline-dot {
        @apply absolute left-0 top-2 w-6 h-6 rounded-full bg-primary flex items-center justify-center text-white text-xs font-bold;
    }
    .tag {
        @apply bg-secondary text-primary text-xs px-2 py-1 rounded-full mr-2 mb-2;
    }
    .feature-card {
        @apply p-4 border border-gray-100 rounded-lg hover:shadow-md transition-shadow;
    }
    .resource-item {
        @apply flex items-start gap-3 p-3 hover:bg-secondary/30 rounded-lg transition-colors;
    }
}

/* 基础样式补充 */
.tab-content.hidden {
    display: none;
}

.tab-content.active {
    display: block;
}

.tag {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 9999px;
    --tw-bg-opacity: 1;
    background-color: rgb(255 245 240 / var(--tw-bg-opacity, 1));
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    --tw-text-opacity: 1;
    color: rgb(255 107 53 / var(--tw-text-opacity, 1));
}

.star-tab-button {
    transition: all 0.3s ease;
}

.star-tab-button:hover {
    color: var(--primary-color);
}

.star-tab-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

#starChart {
    max-width: 100%;
    height: 400px;
}

/* 假设 --primary-color 未定义，添加定义，可根据实际修改 */
:root {
    --primary-color: rgb(255, 107, 53);
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.info-label {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.info-label i {
    margin-right: 8px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
}

.section-title {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 16px;
}

/* 日、周、月趋势基础样式 */
.daily-trend,
.weekly-trend,
.monthly-trend {
    transition: all 0.3s ease;
}

.info-value a {
    color: #0066cc;
}

.info-value a:hover {
    color: #d75757; /*  hover 状态的深色蓝色，增强交互体验 */
    /*text-decoration: underline; !* 可选： hover 时移除下划线 *!*/
}


/* 小屏幕设备，如手机 */
@media (max-width: 767px) {
    .daily-trend {
        width: 90%;
        height: 200px;
    }
    .weekly-trend {
        width: 90%;
        height: 250px;
    }
    .monthly-trend {
        width: 90%;
        height: 300px;
    }
}

/* 中等屏幕设备，如平板 */
@media (min-width: 768px) and (max-width: 1023px) {
    .daily-trend {
        width: 80%;
        height: 250px;
    }
    .weekly-trend {
        width: 80%;
        height: 300px;
    }
    .monthly-trend {
        width: 80%;
        height: 350px;
    }
}

/* 大屏幕设备，如桌面电脑 */
@media (min-width: 1024px) {
    .daily-trend {
        width: 70%;
        height: 300px;
    }
    .weekly-trend {
        width: 70%;
        height: 350px;
    }
    .monthly-trend {
        width: 70%;
        height: 400px;
    }
}

/* 轮播容器样式 */
.border-box {
    max-width: 800px; /* 整体缩小后的宽度，不超红框 */
    max-height: 600px; /* 整体缩小后的高度，不超红框 */
    margin: 20px auto;
    padding: 10px;
    border: 2px solid rgb(146, 182, 234); /* 红色边框 */
    border-radius: 8px; /* 轻微圆角，更美观 */
    overflow: hidden; /* 超出部分隐藏 */
    position: relative;
}

/* 轮播容器样式 */
#imageSwiper {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}

/* 幻灯片样式 */
.swiper-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* 切换按钮样式 */
.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 16px;
}

.next-btn {
    right: 16px;
}

/* ========== 优化后的数字分页器样式 ========== */
#pagination {
    position: absolute;
    bottom: 20px; /* 靠下定位 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px; /* 按钮间距 */
    z-index: 10;
}

.pagination-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* 圆形 */
    background-color: rgba(255, 255, 255, 0.4); /* 未激活状态 */
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* 激活状态样式 - 更醒目 */
.pagination-dot.active {
    background-color: #ffffff;
    border-color: #007bff; /* 蓝色边框强调 */
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3); /* 发光效果 */
    transform: scale(1.1); /* 轻微放大 */
}

/* 鼠标悬停效果 */
.pagination-dot:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

/* 图片放大浮层样式 */
#zoomOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#zoomImg {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

#closeBtn {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#closeBtn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* 评分样式 */
/* 星星交互动画 */
.star-item {
    transition: all 0.2s ease;
}
.star-item:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 2px rgba(234, 179, 8, 0.6));
}
.star-item.text-3xl {
    font-size: 1.875rem !important; /* 紧急情况用 !important，优先优化选择器权重 */
    line-height: 2.25rem;
}
/* 弹窗淡入动画 */
.modal-content {
    animation: modalFadeIn 0.3s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* 自定义滚动条（可选） */
textarea::-webkit-scrollbar {
    width: 6px;
}
textarea::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}
/* 展示区星星添加鼠标指针，提示可点击 */
.display-star {
    cursor: pointer;
}
/* 评分统计卡片样式 */
.stats-card {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.rating-container {
    display: flex;
    align-items: flex-start;
    gap: 40px; /* 左侧评分与右侧进度条的间距 */
    font-family: Arial, sans-serif;
    padding: 20px;
}


