/* 圈子页面样式 */
.circles-content {
    min-height: 100vh;
    background: #f5f5f5;
    padding-bottom: 60px;
}

.dark-mode .circles-content {
    background: #1a1a1a;
}

/* 页面头部 */
.circles-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 20px;
    text-align: center;
    color: #fff;
}

.header-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.header-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 25px;
    padding: 10px 15px;
    margin: -20px 15px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.dark-mode .search-bar {
    background: #2a2a2a;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #999;
    margin-right: 10px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.dark-mode .search-bar input {
    color: #fff;
}

.search-bar input::placeholder {
    color: #999;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    padding: 0 15px 10px;
    gap: 10px;
}

.category-tab {
    padding: 8px 16px;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.dark-mode .category-tab {
    background: #2a2a2a;
    color: #ccc;
}

.category-tab.active {
    background: #007AFF;
    color: #fff;
}

.dark-mode .category-tab.active {
    background: #007AFF;
}

/* 圈子列表 */
.circle-list {
    padding: 0 15px;
}

/* 圈子卡片 */
.circle-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode .circle-card {
    background: #2a2a2a;
}

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

.circle-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.circle-card-info {
    flex: 1;
    min-width: 0;
}

.circle-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark-mode .circle-card-name {
    color: #fff;
}

.circle-card-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark-mode .circle-card-desc {
    color: #666;
}

.circle-card-stats {
    font-size: 12px;
    color: #999;
}

.dark-mode .circle-card-stats {
    color: #666;
}

.stat-divider {
    margin: 0 6px;
}

.circle-card-action {
    margin-left: 15px;
}

.join-btn {
    padding: 8px 16px;
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.join-btn:hover {
    background: #0066CC;
}

.joined-badge {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #999;
    border-radius: 20px;
    font-size: 13px;
}

.dark-mode .joined-badge {
    background: #333;
    color: #666;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.dark-mode .empty-title {
    color: #fff;
}

.empty-desc {
    font-size: 14px;
    color: #999;
}

/* 圈子详情弹窗 */
.circle-detail-modal .modal-container {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
}

.circle-detail-header {
    position: relative;
}

.circle-cover {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.circle-info {
    padding: 0 20px 20px;
    margin-top: -30px;
    position: relative;
}

.circle-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    margin-bottom: 10px;
}

.circle-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.dark-mode .circle-name {
    color: #fff;
}

.circle-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.dark-mode .circle-desc {
    color: #999;
}

.circle-stats {
    font-size: 13px;
    color: #999;
}

.circle-detail-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.circle-detail-actions .btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary {
    background: #007AFF;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.dark-mode .btn-secondary {
    background: #333;
    color: #fff;
}

.btn-secondary:hover {
    opacity: 0.9;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 12px;
    font-size: 14px;
    color: #999;
}