/**
 * 行动者页面样式 - 现代化重构版
 * 基于 Tailwind + 自定义组件
 * 与田野首页、我的社区风格保持一致
 * 图标使用 Heroicons
 */

/* ==================== 页面布局 ==================== */
.actors-page {
    min-height: 100vh;
    background: #F5F5F7;
    padding-bottom: 60px;
}

.actors-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px;
}

@media (min-width: 640px) {
    .actors-container {
        padding: 32px 24px;
    }
}

@media (min-width: 1024px) {
    .actors-container {
        padding: 40px 32px;
    }
}

/* ==================== 页面头部 ==================== */
.actors-header {
    text-align: center;
    margin-bottom: 32px;
}

.actors-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .actors-title {
        font-size: 40px;
    }
}

.actors-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

/* ==================== 搜索框 ==================== */
.actors-search {
    max-width: 480px;
    margin: 0 auto 32px;
}

.actors-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 100px;
    padding: 4px 4px 4px 16px;
    transition: all 0.2s ease;
}

.actors-search-box:focus-within {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.actors-search-box .search-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}

.actors-search-box .search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 15px;
    color: #111827;
    background: transparent;
    min-width: 0;
}

.actors-search-box .search-input::placeholder {
    color: #9ca3af;
}

.actors-search-box .search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #9ca3af;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.actors-search-box .search-clear:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.actors-search-box .clear-icon {
    width: 16px;
    height: 16px;
}

.actors-search-box .search-btn {
    padding: 10px 20px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.actors-search-box .search-btn:hover {
    background: #1f2937;
}

/* 搜索结果提示 */
.actors-search-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #6b7280;
}

.actors-search-result strong {
    color: #111827;
}

.actors-search-result .result-count {
    color: #9ca3af;
}

/* ==================== 筛选标签 ==================== */
.actors-filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.actors-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.actors-filter:hover {
    color: #007aff;
    border-color: #007aff;
    background: rgba(0,122,255,0.06);
}

.actors-filter.active {
    color: #007aff;
    background: #e8f4fd;
    border-color: transparent;
}

.actors-filter .filter-icon {
    width: 16px;
    height: 16px;
}

/* ==================== 用户网格 ==================== */
.actors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .actors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 768px) {
    .actors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .actors-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }
}

/* ==================== 用户卡片 ==================== */
.actor-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.actor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* 头像 */
.actor-avatar {
    position: relative;
    margin-bottom: 16px;
}

.actor-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.actor-card:hover .actor-avatar img {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* 在线状态指示器（可选） */
.actor-avatar .online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid #fff;
    border-radius: 50%;
}

/* 用户名 */
.actor-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-name a {
    color: inherit;
    text-decoration: none;
}

.actor-name a:hover {
    color: #2563eb;
}

/* 统计信息 */
.actor-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.actor-stat {
    display: inline;
}

.actor-stat-dot {
    color: #d1d5db;
}

/* 关注按钮 */
.actor-follow-btn {
    width: 100%;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.actor-follow-btn:hover {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.actor-follow-btn.followed {
    background: #f3f4f6;
    border-color: transparent;
    color: #6b7280;
}

.actor-follow-btn.followed:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: transparent;
}

/* 按钮文字切换 */
.actor-follow-btn .btn-hover-text {
    display: none;
}

.actor-follow-btn.followed:hover .btn-text {
    display: none;
}

.actor-follow-btn.followed:hover .btn-hover-text {
    display: inline;
}

/* 编辑资料按钮 */
.actor-edit-btn {
    width: 100%;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.actor-edit-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #111827;
}

/* ==================== 空状态 ==================== */
.actors-empty {
    text-align: center;
    padding: 80px 20px;
}

.actors-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #d1d5db;
}

.actors-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.actors-empty-desc {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
}

/* ==================== 分页 ==================== */
.actors-pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    padding: 20px 0;
}

/* 兼容 ThinkSAAS 默认分页结构 */
.actors-pagination .anor_fn_pagination {
    display: flex;
    justify-content: center;
}

.actors-pagination .anor_fn_pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.actors-pagination .anor_fn_pagination ul li {
    display: inline-flex;
}

.actors-pagination .anor_fn_pagination ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.actors-pagination .anor_fn_pagination ul li a:hover {
    color: #111827;
    border-color: #111827;
}

.actors-pagination .anor_fn_pagination ul li a.current {
    color: #fff;
    background: #111827;
    border-color: #111827;
}

/* ==================== 首屏加载动画 ==================== */
@keyframes actorFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 首屏用户卡片渐入动画 */
.actors-grid > .actor-card {
    animation: actorFadeIn 0.4s ease forwards;
}

.actors-grid > .actor-card:nth-child(1) { animation-delay: 0.02s; }
.actors-grid > .actor-card:nth-child(2) { animation-delay: 0.04s; }
.actors-grid > .actor-card:nth-child(3) { animation-delay: 0.06s; }
.actors-grid > .actor-card:nth-child(4) { animation-delay: 0.08s; }
.actors-grid > .actor-card:nth-child(5) { animation-delay: 0.1s; }
.actors-grid > .actor-card:nth-child(6) { animation-delay: 0.12s; }
.actors-grid > .actor-card:nth-child(7) { animation-delay: 0.14s; }
.actors-grid > .actor-card:nth-child(8) { animation-delay: 0.16s; }
.actors-grid > .actor-card:nth-child(9) { animation-delay: 0.18s; }
.actors-grid > .actor-card:nth-child(10) { animation-delay: 0.2s; }
.actors-grid > .actor-card:nth-child(11) { animation-delay: 0.22s; }
.actors-grid > .actor-card:nth-child(12) { animation-delay: 0.24s; }

/* ==================== 无限滚动状态 ==================== */
.actors-loading,
.actors-no-more,
.actors-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 20px;
    color: #9ca3af;
    font-size: 14px;
}

.actors-loading.hidden,
.actors-no-more.hidden,
.actors-error.hidden {
    display: none;
}

.actors-loading .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e7eb;
    border-top-color: #111827;
    border-radius: 50%;
    animation: actorSpin 0.8s linear infinite;
}

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

.actors-no-more .line {
    width: 40px;
    height: 1px;
    background: #e5e7eb;
}

.actors-error {
    flex-direction: column;
    gap: 16px;
}

.actors-error .retry-btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.actors-error .retry-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* 新加载内容的渐入动画 */
@keyframes actorCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.actor-fade-in {
    animation: actorCardFadeIn 0.4s ease-out forwards;
}

/* ==================== SVG 图标 ==================== */
.actors-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: none;
    stroke: currentColor;
    flex-shrink: 0;
}
