/**
 * 狐狸云全站优化样式库 v2.0
 * 包含：H1-H6高优先级 + M1-M5中优先级 + L1-L5低优先级 所有优化
 */

/* ============================================
   H1: 热度指标组件
   ============================================ */
.heat-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #d97706;
    transition: all 0.3s ease;
}

.dark .heat-indicator {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: #fbbf24;
}

.heat-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.heat-indicator .fire-icon {
    animation: firePulse 1.5s ease-in-out infinite;
}

@keyframes firePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.heat-level-hot {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #dc2626;
}

.dark .heat-level-hot {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #f87171;
}

.heat-level-trending {
    background: linear-gradient(135deg, #fda4af 0%, #fb7185 100%);
    color: #e11d48;
    animation: trendingPulse 2s ease-in-out infinite;
}

.dark .heat-level-trending {
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.2) 0%, rgba(225, 29, 72, 0.2) 100%);
    color: #fb7185;
}

@keyframes trendingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
}

/* ============================================
   H2: 分类彩色圆点
   ============================================ */
.category-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    position: relative;
}

.category-dot::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.5); opacity: 0; }
}

/* 分类颜色 */
.category-dot-tech { background: #3b82f6; }
.category-dot-life { background: #10b981; }
.category-dot-question { background: #f59e0b; }
.category-dot-share { background: #8b5cf6; }
.category-dot-announce { background: #ef4444; }
.category-dot-activity { background: #ec4899; }
.category-dot-default { background: #6366f1; }

/* 分类标签增强 */
.category-tag-enhanced {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-tag-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   H3: 帖子卡片水平布局
   ============================================ */
.post-card-horizontal {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.post-card-horizontal:hover {
    transform: translateX(8px);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.15);
}

.post-card-horizontal .post-cover {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.post-card-horizontal .post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card-horizontal:hover .post-cover img {
    transform: scale(1.1);
}

.post-card-horizontal .post-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-card-horizontal .post-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark .post-card-horizontal .post-title {
    color: #f1f5f9;
}

.post-card-horizontal .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.post-card-horizontal .post-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

/* 响应式 */
@media (max-width: 640px) {
    .post-card-horizontal {
        flex-direction: column;
    }
    
    .post-card-horizontal .post-cover {
        width: 100%;
        height: 160px;
    }
}

/* ============================================
   H4: 评论区美化
   ============================================ */
.comment-item-enhanced {
    position: relative;
    padding: 20px 20px 20px 28px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    animation: commentSlideIn 0.4s ease-out;
}

@keyframes commentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dark .comment-item-enhanced {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.5);
}

.comment-item-enhanced:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 左侧指示条 */
.comment-item-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comment-item-enhanced:hover::before {
    opacity: 1;
}

/* 楼层号 */
.comment-floor-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.dark .comment-floor-badge {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.5), rgba(71, 85, 105, 0.3));
    color: #94a3b8;
}

/* 回复箭头 */
.comment-reply-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: #0ea5e9;
    transition: all 0.2s ease;
    cursor: pointer;
}

.comment-reply-arrow:hover {
    background: rgba(14, 165, 233, 0.2);
    transform: translateX(4px);
}

/* ============================================
   H5: 触摸反馈效果
   ============================================ */
.touch-ripple {
    position: relative;
    overflow: hidden;
}

.touch-ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s ease;
}

.touch-ripple:active::after {
    opacity: 1;
    transform: scale(2);
}

/* 点击缩放效果 */
.touch-scale {
    transition: transform 0.15s ease;
}

.touch-scale:active {
    transform: scale(0.95);
}

/* 触摸高亮 */
.touch-highlight {
    transition: background-color 0.15s ease;
}

.touch-highlight:active {
    background-color: rgba(14, 165, 233, 0.1);
}

/* ============================================
   H6: 安全区域适配
   ============================================ */
@supports (padding: max(0px)) {
    .safe-area-top {
        padding-top: max(16px, env(safe-area-inset-top));
    }
    
    .safe-area-bottom {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    
    .safe-area-left {
        padding-left: max(16px, env(safe-area-inset-left));
    }
    
    .safe-area-right {
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    /* 底部导航栏适配 */
    .bottom-nav-safe {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    
    /* 内容区域适配 */
    .content-safe {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

/* 刘海屏状态栏 */
.notch-safe {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: inherit;
    z-index: 9999;
}

/* ============================================
   M1: 推荐位轮播
   ============================================ */
.featured-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--glass-bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.carousel-slide .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.carousel-slide .slide-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.carousel-slide .slide-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    width: 24px;
    border-radius: 4px;
    background: white;
}

/* 轮播按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
    left: 16px;
}

.carousel-btn-next {
    right: 16px;
}

/* 触摸滑动 */
@media (pointer: coarse) {
    .carousel-container {
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        scrollbar-width: none;
    }
    
    .carousel-container::-webkit-scrollbar {
        display: none;
    }
    
    .carousel-slide {
        scroll-snap-align: start;
    }
}

/* ============================================
   M2: Tab导航增强
   ============================================ */
.tab-nav-enhanced {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(241, 245, 249, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-nav-enhanced::-webkit-scrollbar {
    display: none;
}

.tab-item-enhanced {
    position: relative;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-item-enhanced:hover {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

.tab-item-enhanced.active {
    color: white;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Tab计数器 */
.tab-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.tab-item-enhanced:not(.active) .tab-counter {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

/* 滑动指示器 */
.tab-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   M3: 骨架屏加载
   ============================================ */
@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #f1f5f9 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
}

.dark .skeleton {
    background: linear-gradient(
        90deg,
        #374151 25%,
        #4b5563 50%,
        #374151 75%
    );
    background-size: 200% 100%;
}

/* 骨架屏组件 */
.skeleton-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.skeleton-title {
    height: 20px;
    width: 75%;
    border-radius: 6px;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 12px;
    width: 60%;
    border-radius: 4px;
}

/* ============================================
   M4: 用户头像边框
   ============================================ */
.avatar-rainbow {
    position: relative;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(
        45deg,
        #ff0000,
        #ff7300,
        #fffb00,
        #48ff00,
        #00ffd5,
        #002bff,
        #7a00ff,
        #ff00c8,
        #ff0000
    );
    background-size: 400%;
    animation: rainbowGradient 8s linear infinite;
}

@keyframes rainbowGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.avatar-rainbow img {
    border-radius: 50%;
    border: 3px solid white;
}

.dark .avatar-rainbow img {
    border-color: #1e293b;
}

/* VIP边框 */
.avatar-vip {
    position: relative;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.avatar-vip img {
    border-radius: 50%;
    border: 3px solid white;
}

/* 等级边框 */
.avatar-level {
    position: relative;
    padding: 2px;
    border-radius: 50%;
    background: var(--primary-gradient);
}

.avatar-level img {
    border-radius: 50%;
    border: 2px solid white;
}

/* ============================================
   M5: 签到日历美化
   ============================================ */
.sign-calendar {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--glass-border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: rgba(241, 245, 249, 0.5);
    transition: all 0.3s ease;
}

.dark .calendar-day {
    background: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}

.calendar-day.signed {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.calendar-day.today {
    border: 2px solid #0ea5e9;
    font-weight: 700;
}

.calendar-day.future {
    opacity: 0.4;
}

/* 签到成功动画 */
@keyframes signSuccess {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sign-success-animation {
    animation: signSuccess 0.6s ease;
}

/* 连续签到奖励 */
.consecutive-bonus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
}

.dark .consecutive-bonus {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
}

/* ============================================
   L1: 数据可视化
   ============================================ */
.mini-chart {
    position: relative;
    height: 60px;
    padding: 8px 0;
}

.chart-bar {
    position: absolute;
    bottom: 0;
    width: 8px;
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chart-bar:hover {
    background: linear-gradient(180deg, #06b6d4, #14b8a6);
}

/* 环形进度 */
.circular-progress {
    position: relative;
    width: 80px;
    height: 80px;
}

.circular-progress svg {
    transform: rotate(-90deg);
}

.circular-progress .progress-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.dark .circular-progress .progress-bg {
    stroke: #475569;
}

.circular-progress .progress-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.circular-progress .progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.dark .circular-progress .progress-text {
    color: #f1f5f9;
}

/* ============================================
   L2: 成就徽章墙
   ============================================ */
.badge-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 16px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.badge-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.badge-name {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
}

.dark .badge-name {
    color: #94a3b8;
}

/* ============================================
   L3: 快速购买弹窗
   ============================================ */
.quick-buy-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-buy-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-buy-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.quick-buy-modal .modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.quick-buy-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* ============================================
   L4: 文章目录导航
   ============================================ */
.article-toc {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.toc-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

.dark .toc-title {
    color: #f1f5f9;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    padding: 8px 12px;
    margin-left: 0;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 0 8px 8px 0;
}

.toc-item:hover {
    color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

.toc-item.active {
    color: #0ea5e9;
    border-left-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

.toc-item[data-level="2"] { margin-left: 0; }
.toc-item[data-level="3"] { margin-left: 12px; }
.toc-item[data-level="4"] { margin-left: 24px; }

/* ============================================
   L5: 阅读进度条
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4, #14b8a6);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* 阅读时间估算 */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: #0ea5e9;
}

/* ============================================
   性能优化: 动画性能
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* GPU加速 */
.gpu-accelerated {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ============================================
   打印优化
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass, .glass-card {
        background: white !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ============================================
   后台管理: 移动端表格响应式
   ============================================ */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 移动端卡片式表格 */
@media (max-width: 768px) {
    .admin-table-responsive {
        display: block;
    }
    
    .admin-table-responsive thead {
        display: none;
    }
    
    .admin-table-responsive tbody {
        display: block;
    }
    
    .admin-table-responsive tr {
        display: block;
        margin-bottom: 16px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        padding: 16px;
        border: 1px solid #e2e8f0;
    }
    
    .admin-table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .admin-table-responsive td:last-child {
        border-bottom: none;
    }
    
    .admin-table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 12px;
        margin-right: 12px;
    }
    
    .admin-table-responsive td.actions {
        justify-content: flex-end;
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #e2e8f0;
    }
    
    .admin-table-responsive td.actions::before {
        display: none;
    }
}

/* 表格操作按钮组 */
.admin-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-table-actions .btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-table-actions .btn-edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-table-actions .btn-edit:hover {
    background: #bfdbfe;
}

.admin-table-actions .btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.admin-table-actions .btn-delete:hover {
    background: #fecaca;
}

.admin-table-actions .btn-view {
    background: #d1fae5;
    color: #059669;
}

.admin-table-actions .btn-view:hover {
    background: #a7f3d0;
}

/* ============================================
   后台管理: 状态徽章增强
   ============================================ */
.admin-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.admin-status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.admin-status-badge.approved, .admin-status-badge.active {
    background: #d1fae5;
    color: #059669;
}

.admin-status-badge.rejected, .admin-status-badge.inactive {
    background: #fee2e2;
    color: #dc2626;
}

.admin-status-badge.processing {
    background: #dbeafe;
    color: #2563eb;
}

/* ============================================
   后台管理: 搜索栏美化
   ============================================ */
.admin-search-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
}

.admin-search-bar input[type="text"],
.admin-search-bar select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
}

.admin-search-bar input[type="text"]:focus,
.admin-search-bar select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.admin-search-bar .btn-search {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-search-bar .btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ============================================
   后台管理: 分页美化
   ============================================ */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

.admin-pagination a,
.admin-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.admin-pagination a:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    background: #f0f9ff;
}

.admin-pagination .current {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border-color: transparent;
}

.admin-pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   后台管理: 消息通知样式
   ============================================ */
.admin-notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: notifyPulse 2s infinite;
}

@keyframes notifyPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.admin-notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ============================================
   后台管理: 加载状态
   ============================================ */
.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.admin-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.admin-loading-text {
    margin-top: 16px;
    color: #64748b;
    font-size: 14px;
}

/* 骨架屏加载 */
.admin-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.admin-skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.admin-skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.admin-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.admin-skeleton-image {
    width: 100%;
    height: 120px;
}
